diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto index 1eaad2a3c54..eed6c35b238 100644 --- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto +++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1/document.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.documentai.v1; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/documentai/v1/barcode.proto"; import "google/cloud/documentai/v1/geometry.proto"; import "google/protobuf/timestamp.proto"; @@ -180,9 +181,9 @@ message Document { // Confidence of the current // [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - // context of the object this layout is for. e.g. confidence can be for a - // single token, a table, a visual element, etc. depending on context. - // Range `[0, 1]`. + // context of the object this layout is for. For example, confidence can + // be for a single token, a table, a visual element, etc. depending on + // context. Range `[0, 1]`. float confidence = 2; // The bounding polygon for the @@ -340,8 +341,8 @@ message Document { repeated DetectedLanguage detected_languages = 2; } - // Detected non-text visual elements e.g. checkbox, signature etc. on the - // page. + // Detected non-text visual elements, for example, checkbox, signature etc. + // on the page. message VisualElement { // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for // [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. @@ -400,7 +401,7 @@ message Document { message FormField { // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the // [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - // e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + // For example, `Address`, `Email`, `Grand total`, `Phone number`, etc. Layout field_name = 1; // [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the @@ -526,7 +527,7 @@ message Document { // A list of visually detected tokens on the page. repeated Token tokens = 8; - // A list of detected non-text visual elements e.g. checkbox, + // A list of detected non-text visual elements, for example, checkbox, // signature etc. on the page. repeated VisualElement visual_elements = 9; @@ -586,6 +587,8 @@ message Document { // Float value. float float_value = 8; + // A signature - a graphical representation of a person's name, + // often used to sign a document. bool signature_value = 10; } @@ -622,10 +625,11 @@ message Document { // [Document.text][google.cloud.documentai.v1.Document.text]. TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL]; - // Required. Entity type from a schema e.g. `Address`. + // Required. Entity type from a schema, for example, `Address`. string type = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`. + // Optional. Text value of the entity, for example, `1600 Amphitheatre + // Pkwy`. string mention_text = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Deprecated. Use `id` field instead. @@ -643,9 +647,9 @@ message Document { string id = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Normalized entity value. Absent if the extracted value could - // not be converted or the type (e.g. address) is not supported for certain - // parsers. This field is also only populated for certain supported document - // types. + // not be converted or the type (for example, address) is not supported for + // certain parsers. This field is also only populated for certain supported + // document types. NormalizedValue normalized_value = 9 [(google.api.field_behavior) = OPTIONAL]; @@ -854,7 +858,7 @@ message Document { message Revision { // Human Review information of the document. message HumanReview { - // Human review state. e.g. `requested`, `succeeded`, `rejected`. + // Human review state. For example, `requested`, `succeeded`, `rejected`. string state = 1; // A message providing more details about the current state of processing. @@ -912,6 +916,12 @@ message Document { repeated Provenance provenance = 3 [deprecated = true]; } + // Represents the annotation of a block or a chunk. + message Annotations { + // The description of the content with this annotation. + string description = 1; + } + // Represents the parsed layout of a document as a collection of blocks that // the document is divided into. message DocumentLayout { @@ -940,6 +950,9 @@ message Document { // A text block could further have child blocks. // Repeated blocks support further hierarchies and nested blocks. repeated DocumentLayoutBlock blocks = 3; + + // Annotation of the text block. + Annotations annotations = 4; } // Represents a table type block. @@ -952,6 +965,9 @@ message Document { // Table caption/title. string caption = 3; + + // Annotation of the table block. + Annotations annotations = 4; } // Represents a row in a table. @@ -990,6 +1006,37 @@ message Document { repeated DocumentLayoutBlock blocks = 1; } + // Represents an image type block. + message LayoutImageBlock { + // Source of the image. + oneof image_source { + // Optional. Asset id of the inline image. If set, find the image + // content in the blob_assets field. + string blob_asset_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Google Cloud Storage uri of the image. + string gcs_uri = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data uri of the image. + // It is composed of four parts: a prefix (data:), a MIME type + // indicating the type of data, an optional base64 token if + // non-textual, and the data itself: + // data:[][;base64], + string data_uri = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Mime type of the image. An IANA published [media type (MIME type)] + // (https://www.iana.org/assignments/media-types/media-types.xhtml). + string mime_type = 1; + + // Text extracted from the image using OCR or alt text describing the + // image. + string image_text = 2; + + // Annotation of the image block. + Annotations annotations = 3; + } + oneof block { // Block consisting of text content. LayoutTextBlock text_block = 2; @@ -999,6 +1046,9 @@ message Document { // Block consisting of list content/structure. LayoutListBlock list_block = 4; + + // Block consisting of image content. + LayoutImageBlock image_block = 7; } // ID of the block. @@ -1046,6 +1096,48 @@ message Document { ChunkPageSpan page_span = 2; } + // The image chunk field in the chunk. + message ImageChunkField { + // Source of the image. + oneof image_source { + // Optional. Asset id of the inline image. If set, find the image + // content in the blob_assets field. + string blob_asset_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Google Cloud Storage uri of the image. + string gcs_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data uri of the image. + // It is composed of four parts: a prefix (data:), a MIME type + // indicating the type of data, an optional base64 token if + // non-textual, and the data itself: + // data:[][;base64], + string data_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Annotation of the image chunk field. + Annotations annotations = 4; + } + + // The table chunk field in the chunk. + message TableChunkField { + // Annotation of the table chunk field. + Annotations annotations = 1; + } + + // The chunk field in the chunk. A chunk field could be one of the various + // types (for example, image, table) supported. + message ChunkField { + // The type of the chunk field. + oneof field_type { + // The image chunk field in the chunk. + ImageChunkField image_chunk_field = 1; + + // The table chunk field in the chunk. + TableChunkField table_chunk_field = 2; + } + } + // ID of the chunk. string chunk_id = 1; @@ -1063,12 +1155,31 @@ message Document { // Page footers associated with the chunk. repeated ChunkPageFooter page_footers = 6; + + // Chunk fields inside this chunk. + repeated ChunkField chunk_fields = 7; } // List of chunks. repeated Chunk chunks = 1; } + // Represents a blob asset. It's used to store the content of the inline blob + // in this document, for example, image bytes, such that it can be referenced + // by other fields in the document via asset ID. + message BlobAsset { + // Optional. The id of the blob asset. + string asset_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The content of the blob asset, for example, image bytes. + bytes content = 2 [(google.api.field_behavior) = OPTIONAL]; + + // The mime type of the blob asset. + // An IANA published [media type (MIME + // type)](https://www.iana.org/assignments/media-types/media-types.xhtml). + string mime_type = 3; + } + // The output of the validation given the document and the validation rules. message EntityValidationOutput { // Validation result for a single validation rule. @@ -1186,6 +1297,12 @@ message Document { // Document chunked based on chunking config. ChunkedDocument chunked_document = 18; + // Optional. The blob assets in this document. This is used to store the + // content of the inline blobs in this document, for example, image bytes, + // such that it can be referenced by other fields in the document via asset + // id. + repeated BlobAsset blob_assets = 19 [(google.api.field_behavior) = OPTIONAL]; + // The entity validation output for the document. This is the validation // output for `document.entities` field. EntityValidationOutput entity_validation_output = 21; @@ -1198,7 +1315,7 @@ message Document { // The entity revision ID that `document.entities` field is based on. // If this field is set and `entities_revisions` is not empty, the entities in // `document.entities` field are the entities in the entity revision with this - // ID and `document.entity_validation_output` field is the + // id and `document.entity_validation_output` field is the // `entity_validation_output` field in this entity revision. string entities_revision_id = 23; } diff --git a/packages/google-cloud-documentai/protos/protos.d.ts b/packages/google-cloud-documentai/protos/protos.d.ts index 8224cfcc0db..634e17cb4be 100644 --- a/packages/google-cloud-documentai/protos/protos.d.ts +++ b/packages/google-cloud-documentai/protos/protos.d.ts @@ -183,6 +183,9 @@ export namespace google { /** Document chunkedDocument */ chunkedDocument?: (google.cloud.documentai.v1.Document.IChunkedDocument|null); + /** Document blobAssets */ + blobAssets?: (google.cloud.documentai.v1.Document.IBlobAsset[]|null); + /** Document entityValidationOutput */ entityValidationOutput?: (google.cloud.documentai.v1.Document.IEntityValidationOutput|null); @@ -247,6 +250,9 @@ export namespace google { /** Document chunkedDocument. */ public chunkedDocument?: (google.cloud.documentai.v1.Document.IChunkedDocument|null); + /** Document blobAssets. */ + public blobAssets: google.cloud.documentai.v1.Document.IBlobAsset[]; + /** Document entityValidationOutput. */ public entityValidationOutput?: (google.cloud.documentai.v1.Document.IEntityValidationOutput|null); @@ -4662,6 +4668,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an Annotations. */ + interface IAnnotations { + + /** Annotations description */ + description?: (string|null); + } + + /** Represents an Annotations. */ + class Annotations implements IAnnotations { + + /** + * Constructs a new Annotations. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.Document.IAnnotations); + + /** Annotations description. */ + public description: string; + + /** + * Creates a new Annotations instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotations instance + */ + public static create(properties?: google.cloud.documentai.v1.Document.IAnnotations): google.cloud.documentai.v1.Document.Annotations; + + /** + * Encodes the specified Annotations message. Does not implicitly {@link google.cloud.documentai.v1.Document.Annotations.verify|verify} messages. + * @param message Annotations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.Document.IAnnotations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotations message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.Annotations.verify|verify} messages. + * @param message Annotations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.Document.IAnnotations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotations + * @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.documentai.v1.Document.Annotations; + + /** + * Decodes an Annotations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotations + * @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.documentai.v1.Document.Annotations; + + /** + * Verifies an Annotations 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 Annotations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotations + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Document.Annotations; + + /** + * Creates a plain object from an Annotations message. Also converts values to other types if specified. + * @param message Annotations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.Document.Annotations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotations + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a DocumentLayout. */ interface IDocumentLayout { @@ -4773,6 +4876,9 @@ export namespace google { /** DocumentLayoutBlock listBlock */ listBlock?: (google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutListBlock|null); + /** DocumentLayoutBlock imageBlock */ + imageBlock?: (google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock|null); + /** DocumentLayoutBlock blockId */ blockId?: (string|null); @@ -4801,6 +4907,9 @@ export namespace google { /** DocumentLayoutBlock listBlock. */ public listBlock?: (google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutListBlock|null); + /** DocumentLayoutBlock imageBlock. */ + public imageBlock?: (google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock|null); + /** DocumentLayoutBlock blockId. */ public blockId: string; @@ -4811,7 +4920,7 @@ export namespace google { public boundingBox?: (google.cloud.documentai.v1.IBoundingPoly|null); /** DocumentLayoutBlock block. */ - public block?: ("textBlock"|"tableBlock"|"listBlock"); + public block?: ("textBlock"|"tableBlock"|"listBlock"|"imageBlock"); /** * Creates a new DocumentLayoutBlock instance using the specified properties. @@ -5007,6 +5116,9 @@ export namespace google { /** LayoutTextBlock blocks */ blocks?: (google.cloud.documentai.v1.Document.DocumentLayout.IDocumentLayoutBlock[]|null); + + /** LayoutTextBlock annotations */ + annotations?: (google.cloud.documentai.v1.Document.IAnnotations|null); } /** Represents a LayoutTextBlock. */ @@ -5027,6 +5139,9 @@ export namespace google { /** LayoutTextBlock blocks. */ public blocks: google.cloud.documentai.v1.Document.DocumentLayout.IDocumentLayoutBlock[]; + /** LayoutTextBlock annotations. */ + public annotations?: (google.cloud.documentai.v1.Document.IAnnotations|null); + /** * Creates a new LayoutTextBlock instance using the specified properties. * @param [properties] Properties to set @@ -5116,6 +5231,9 @@ export namespace google { /** LayoutTableBlock caption */ caption?: (string|null); + + /** LayoutTableBlock annotations */ + annotations?: (google.cloud.documentai.v1.Document.IAnnotations|null); } /** Represents a LayoutTableBlock. */ @@ -5136,6 +5254,9 @@ export namespace google { /** LayoutTableBlock caption. */ public caption: string; + /** LayoutTableBlock annotations. */ + public annotations?: (google.cloud.documentai.v1.Document.IAnnotations|null); + /** * Creates a new LayoutTableBlock instance using the specified properties. * @param [properties] Properties to set @@ -5619,6 +5740,136 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a LayoutImageBlock. */ + interface ILayoutImageBlock { + + /** LayoutImageBlock blobAssetId */ + blobAssetId?: (string|null); + + /** LayoutImageBlock gcsUri */ + gcsUri?: (string|null); + + /** LayoutImageBlock dataUri */ + dataUri?: (string|null); + + /** LayoutImageBlock mimeType */ + mimeType?: (string|null); + + /** LayoutImageBlock imageText */ + imageText?: (string|null); + + /** LayoutImageBlock annotations */ + annotations?: (google.cloud.documentai.v1.Document.IAnnotations|null); + } + + /** Represents a LayoutImageBlock. */ + class LayoutImageBlock implements ILayoutImageBlock { + + /** + * Constructs a new LayoutImageBlock. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock); + + /** LayoutImageBlock blobAssetId. */ + public blobAssetId?: (string|null); + + /** LayoutImageBlock gcsUri. */ + public gcsUri?: (string|null); + + /** LayoutImageBlock dataUri. */ + public dataUri?: (string|null); + + /** LayoutImageBlock mimeType. */ + public mimeType: string; + + /** LayoutImageBlock imageText. */ + public imageText: string; + + /** LayoutImageBlock annotations. */ + public annotations?: (google.cloud.documentai.v1.Document.IAnnotations|null); + + /** LayoutImageBlock imageSource. */ + public imageSource?: ("blobAssetId"|"gcsUri"|"dataUri"); + + /** + * Creates a new LayoutImageBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns LayoutImageBlock instance + */ + public static create(properties?: google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock): google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock; + + /** + * Encodes the specified LayoutImageBlock message. Does not implicitly {@link google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.verify|verify} messages. + * @param message LayoutImageBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LayoutImageBlock message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.verify|verify} messages. + * @param message LayoutImageBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LayoutImageBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LayoutImageBlock + * @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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock; + + /** + * Decodes a LayoutImageBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LayoutImageBlock + * @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.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock; + + /** + * Verifies a LayoutImageBlock 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 LayoutImageBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LayoutImageBlock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock; + + /** + * Creates a plain object from a LayoutImageBlock message. Also converts values to other types if specified. + * @param message LayoutImageBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LayoutImageBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LayoutImageBlock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } @@ -5741,6 +5992,9 @@ export namespace google { /** Chunk pageFooters */ pageFooters?: (google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkPageFooter[]|null); + + /** Chunk chunkFields */ + chunkFields?: (google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkField[]|null); } /** Represents a Chunk. */ @@ -5770,6 +6024,9 @@ export namespace google { /** Chunk pageFooters. */ public pageFooters: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkPageFooter[]; + /** Chunk chunkFields. */ + public chunkFields: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkField[]; + /** * Creates a new Chunk instance using the specified properties. * @param [properties] Properties to set @@ -6158,9 +6415,439 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of an ImageChunkField. */ + interface IImageChunkField { + + /** ImageChunkField blobAssetId */ + blobAssetId?: (string|null); + + /** ImageChunkField gcsUri */ + gcsUri?: (string|null); + + /** ImageChunkField dataUri */ + dataUri?: (string|null); + + /** ImageChunkField annotations */ + annotations?: (google.cloud.documentai.v1.Document.IAnnotations|null); + } + + /** Represents an ImageChunkField. */ + class ImageChunkField implements IImageChunkField { + + /** + * Constructs a new ImageChunkField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField); + + /** ImageChunkField blobAssetId. */ + public blobAssetId?: (string|null); + + /** ImageChunkField gcsUri. */ + public gcsUri?: (string|null); + + /** ImageChunkField dataUri. */ + public dataUri?: (string|null); + + /** ImageChunkField annotations. */ + public annotations?: (google.cloud.documentai.v1.Document.IAnnotations|null); + + /** ImageChunkField imageSource. */ + public imageSource?: ("blobAssetId"|"gcsUri"|"dataUri"); + + /** + * Creates a new ImageChunkField instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageChunkField instance + */ + public static create(properties?: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField): google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField; + + /** + * Encodes the specified ImageChunkField message. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.verify|verify} messages. + * @param message ImageChunkField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageChunkField message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.verify|verify} messages. + * @param message ImageChunkField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageChunkField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageChunkField + * @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.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField; + + /** + * Decodes an ImageChunkField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageChunkField + * @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.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField; + + /** + * Verifies an ImageChunkField 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 ImageChunkField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageChunkField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField; + + /** + * Creates a plain object from an ImageChunkField message. Also converts values to other types if specified. + * @param message ImageChunkField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageChunkField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageChunkField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableChunkField. */ + interface ITableChunkField { + + /** TableChunkField annotations */ + annotations?: (google.cloud.documentai.v1.Document.IAnnotations|null); + } + + /** Represents a TableChunkField. */ + class TableChunkField implements ITableChunkField { + + /** + * Constructs a new TableChunkField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField); + + /** TableChunkField annotations. */ + public annotations?: (google.cloud.documentai.v1.Document.IAnnotations|null); + + /** + * Creates a new TableChunkField instance using the specified properties. + * @param [properties] Properties to set + * @returns TableChunkField instance + */ + public static create(properties?: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField): google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField; + + /** + * Encodes the specified TableChunkField message. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.verify|verify} messages. + * @param message TableChunkField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableChunkField message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.verify|verify} messages. + * @param message TableChunkField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableChunkField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableChunkField + * @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.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField; + + /** + * Decodes a TableChunkField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableChunkField + * @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.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField; + + /** + * Verifies a TableChunkField 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 TableChunkField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableChunkField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField; + + /** + * Creates a plain object from a TableChunkField message. Also converts values to other types if specified. + * @param message TableChunkField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableChunkField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableChunkField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChunkField. */ + interface IChunkField { + + /** ChunkField imageChunkField */ + imageChunkField?: (google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField|null); + + /** ChunkField tableChunkField */ + tableChunkField?: (google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField|null); + } + + /** Represents a ChunkField. */ + class ChunkField implements IChunkField { + + /** + * Constructs a new ChunkField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkField); + + /** ChunkField imageChunkField. */ + public imageChunkField?: (google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField|null); + + /** ChunkField tableChunkField. */ + public tableChunkField?: (google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField|null); + + /** ChunkField fieldType. */ + public fieldType?: ("imageChunkField"|"tableChunkField"); + + /** + * Creates a new ChunkField instance using the specified properties. + * @param [properties] Properties to set + * @returns ChunkField instance + */ + public static create(properties?: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkField): google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField; + + /** + * Encodes the specified ChunkField message. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.verify|verify} messages. + * @param message ChunkField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChunkField message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.verify|verify} messages. + * @param message ChunkField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChunkField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChunkField + * @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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField; + + /** + * Decodes a ChunkField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChunkField + * @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.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField; + + /** + * Verifies a ChunkField 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 ChunkField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChunkField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField; + + /** + * Creates a plain object from a ChunkField message. Also converts values to other types if specified. + * @param message ChunkField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChunkField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChunkField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } + /** Properties of a BlobAsset. */ + interface IBlobAsset { + + /** BlobAsset assetId */ + assetId?: (string|null); + + /** BlobAsset content */ + content?: (Uint8Array|Buffer|string|null); + + /** BlobAsset mimeType */ + mimeType?: (string|null); + } + + /** Represents a BlobAsset. */ + class BlobAsset implements IBlobAsset { + + /** + * Constructs a new BlobAsset. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.documentai.v1.Document.IBlobAsset); + + /** BlobAsset assetId. */ + public assetId: string; + + /** BlobAsset content. */ + public content: (Uint8Array|Buffer|string); + + /** BlobAsset mimeType. */ + public mimeType: string; + + /** + * Creates a new BlobAsset instance using the specified properties. + * @param [properties] Properties to set + * @returns BlobAsset instance + */ + public static create(properties?: google.cloud.documentai.v1.Document.IBlobAsset): google.cloud.documentai.v1.Document.BlobAsset; + + /** + * Encodes the specified BlobAsset message. Does not implicitly {@link google.cloud.documentai.v1.Document.BlobAsset.verify|verify} messages. + * @param message BlobAsset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.documentai.v1.Document.IBlobAsset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BlobAsset message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.BlobAsset.verify|verify} messages. + * @param message BlobAsset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.documentai.v1.Document.IBlobAsset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlobAsset message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BlobAsset + * @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.documentai.v1.Document.BlobAsset; + + /** + * Decodes a BlobAsset message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BlobAsset + * @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.documentai.v1.Document.BlobAsset; + + /** + * Verifies a BlobAsset 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 BlobAsset message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlobAsset + */ + public static fromObject(object: { [k: string]: any }): google.cloud.documentai.v1.Document.BlobAsset; + + /** + * Creates a plain object from a BlobAsset message. Also converts values to other types if specified. + * @param message BlobAsset + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.documentai.v1.Document.BlobAsset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BlobAsset to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BlobAsset + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an EntityValidationOutput. */ interface IEntityValidationOutput { @@ -40291,6 +40978,258 @@ export namespace google { IDENTIFIER = 8 } + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Http. */ interface IHttp { @@ -42143,258 +43082,6 @@ export namespace google { GA = 4, DEPRECATED = 5 } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @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.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @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.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @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.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @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.api.ResourceReference; - - /** - * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } } /** Namespace protobuf. */ diff --git a/packages/google-cloud-documentai/protos/protos.js b/packages/google-cloud-documentai/protos/protos.js index 87565fce214..6e6ef060695 100644 --- a/packages/google-cloud-documentai/protos/protos.js +++ b/packages/google-cloud-documentai/protos/protos.js @@ -339,6 +339,7 @@ * @property {Array.|null} [revisions] Document revisions * @property {google.cloud.documentai.v1.Document.IDocumentLayout|null} [documentLayout] Document documentLayout * @property {google.cloud.documentai.v1.Document.IChunkedDocument|null} [chunkedDocument] Document chunkedDocument + * @property {Array.|null} [blobAssets] Document blobAssets * @property {google.cloud.documentai.v1.Document.IEntityValidationOutput|null} [entityValidationOutput] Document entityValidationOutput * @property {Array.|null} [entitiesRevisions] Document entitiesRevisions * @property {string|null} [entitiesRevisionId] Document entitiesRevisionId @@ -359,6 +360,7 @@ this.entityRelations = []; this.textChanges = []; this.revisions = []; + this.blobAssets = []; this.entitiesRevisions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -486,6 +488,14 @@ */ Document.prototype.chunkedDocument = null; + /** + * Document blobAssets. + * @member {Array.} blobAssets + * @memberof google.cloud.documentai.v1.Document + * @instance + */ + Document.prototype.blobAssets = $util.emptyArray; + /** * Document entityValidationOutput. * @member {google.cloud.documentai.v1.Document.IEntityValidationOutput|null|undefined} entityValidationOutput @@ -584,6 +594,9 @@ $root.google.cloud.documentai.v1.Document.DocumentLayout.encode(message.documentLayout, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.chunkedDocument != null && Object.hasOwnProperty.call(message, "chunkedDocument")) $root.google.cloud.documentai.v1.Document.ChunkedDocument.encode(message.chunkedDocument, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.blobAssets != null && message.blobAssets.length) + for (var i = 0; i < message.blobAssets.length; ++i) + $root.google.cloud.documentai.v1.Document.BlobAsset.encode(message.blobAssets[i], writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); if (message.entityValidationOutput != null && Object.hasOwnProperty.call(message, "entityValidationOutput")) $root.google.cloud.documentai.v1.Document.EntityValidationOutput.encode(message.entityValidationOutput, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); if (message.entitiesRevisions != null && message.entitiesRevisions.length) @@ -699,6 +712,12 @@ message.chunkedDocument = $root.google.cloud.documentai.v1.Document.ChunkedDocument.decode(reader, reader.uint32()); break; } + case 19: { + if (!(message.blobAssets && message.blobAssets.length)) + message.blobAssets = []; + message.blobAssets.push($root.google.cloud.documentai.v1.Document.BlobAsset.decode(reader, reader.uint32())); + break; + } case 21: { message.entityValidationOutput = $root.google.cloud.documentai.v1.Document.EntityValidationOutput.decode(reader, reader.uint32()); break; @@ -844,6 +863,15 @@ if (error) return "chunkedDocument." + error; } + if (message.blobAssets != null && message.hasOwnProperty("blobAssets")) { + if (!Array.isArray(message.blobAssets)) + return "blobAssets: array expected"; + for (var i = 0; i < message.blobAssets.length; ++i) { + var error = $root.google.cloud.documentai.v1.Document.BlobAsset.verify(message.blobAssets[i]); + if (error) + return "blobAssets." + error; + } + } if (message.entityValidationOutput != null && message.hasOwnProperty("entityValidationOutput")) { var error = $root.google.cloud.documentai.v1.Document.EntityValidationOutput.verify(message.entityValidationOutput); if (error) @@ -969,6 +997,16 @@ throw TypeError(".google.cloud.documentai.v1.Document.chunkedDocument: object expected"); message.chunkedDocument = $root.google.cloud.documentai.v1.Document.ChunkedDocument.fromObject(object.chunkedDocument); } + if (object.blobAssets) { + if (!Array.isArray(object.blobAssets)) + throw TypeError(".google.cloud.documentai.v1.Document.blobAssets: array expected"); + message.blobAssets = []; + for (var i = 0; i < object.blobAssets.length; ++i) { + if (typeof object.blobAssets[i] !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.blobAssets: object expected"); + message.blobAssets[i] = $root.google.cloud.documentai.v1.Document.BlobAsset.fromObject(object.blobAssets[i]); + } + } if (object.entityValidationOutput != null) { if (typeof object.entityValidationOutput !== "object") throw TypeError(".google.cloud.documentai.v1.Document.entityValidationOutput: object expected"); @@ -1009,6 +1047,7 @@ object.entityRelations = []; object.revisions = []; object.textChanges = []; + object.blobAssets = []; object.entitiesRevisions = []; } if (options.defaults) { @@ -1076,6 +1115,11 @@ object.documentLayout = $root.google.cloud.documentai.v1.Document.DocumentLayout.toObject(message.documentLayout, options); if (message.chunkedDocument != null && message.hasOwnProperty("chunkedDocument")) object.chunkedDocument = $root.google.cloud.documentai.v1.Document.ChunkedDocument.toObject(message.chunkedDocument, options); + if (message.blobAssets && message.blobAssets.length) { + object.blobAssets = []; + for (var j = 0; j < message.blobAssets.length; ++j) + object.blobAssets[j] = $root.google.cloud.documentai.v1.Document.BlobAsset.toObject(message.blobAssets[j], options); + } if (message.entityValidationOutput != null && message.hasOwnProperty("entityValidationOutput")) object.entityValidationOutput = $root.google.cloud.documentai.v1.Document.EntityValidationOutput.toObject(message.entityValidationOutput, options); if (message.entitiesRevisions && message.entitiesRevisions.length) { @@ -12750,6 +12794,211 @@ return TextChange; })(); + Document.Annotations = (function() { + + /** + * Properties of an Annotations. + * @memberof google.cloud.documentai.v1.Document + * @interface IAnnotations + * @property {string|null} [description] Annotations description + */ + + /** + * Constructs a new Annotations. + * @memberof google.cloud.documentai.v1.Document + * @classdesc Represents an Annotations. + * @implements IAnnotations + * @constructor + * @param {google.cloud.documentai.v1.Document.IAnnotations=} [properties] Properties to set + */ + function Annotations(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotations description. + * @member {string} description + * @memberof google.cloud.documentai.v1.Document.Annotations + * @instance + */ + Annotations.prototype.description = ""; + + /** + * Creates a new Annotations instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Document.Annotations + * @static + * @param {google.cloud.documentai.v1.Document.IAnnotations=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Document.Annotations} Annotations instance + */ + Annotations.create = function create(properties) { + return new Annotations(properties); + }; + + /** + * Encodes the specified Annotations message. Does not implicitly {@link google.cloud.documentai.v1.Document.Annotations.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.Document.Annotations + * @static + * @param {google.cloud.documentai.v1.Document.IAnnotations} message Annotations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + return writer; + }; + + /** + * Encodes the specified Annotations message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.Annotations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Document.Annotations + * @static + * @param {google.cloud.documentai.v1.Document.IAnnotations} message Annotations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotations message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Document.Annotations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Document.Annotations} Annotations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotations.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Document.Annotations(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Document.Annotations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Document.Annotations} Annotations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotations message. + * @function verify + * @memberof google.cloud.documentai.v1.Document.Annotations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotations.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an Annotations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Document.Annotations + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Document.Annotations} Annotations + */ + Annotations.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Document.Annotations) + return object; + var message = new $root.google.cloud.documentai.v1.Document.Annotations(); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an Annotations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Document.Annotations + * @static + * @param {google.cloud.documentai.v1.Document.Annotations} message Annotations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.description = ""; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this Annotations to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Document.Annotations + * @instance + * @returns {Object.} JSON object + */ + Annotations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotations + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Document.Annotations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Document.Annotations"; + }; + + return Annotations; + })(); + Document.DocumentLayout = (function() { /** @@ -12982,6 +13231,7 @@ * @property {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutTextBlock|null} [textBlock] DocumentLayoutBlock textBlock * @property {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutTableBlock|null} [tableBlock] DocumentLayoutBlock tableBlock * @property {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutListBlock|null} [listBlock] DocumentLayoutBlock listBlock + * @property {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock|null} [imageBlock] DocumentLayoutBlock imageBlock * @property {string|null} [blockId] DocumentLayoutBlock blockId * @property {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutPageSpan|null} [pageSpan] DocumentLayoutBlock pageSpan * @property {google.cloud.documentai.v1.IBoundingPoly|null} [boundingBox] DocumentLayoutBlock boundingBox @@ -13026,6 +13276,14 @@ */ DocumentLayoutBlock.prototype.listBlock = null; + /** + * DocumentLayoutBlock imageBlock. + * @member {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock|null|undefined} imageBlock + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + * @instance + */ + DocumentLayoutBlock.prototype.imageBlock = null; + /** * DocumentLayoutBlock blockId. * @member {string} blockId @@ -13055,12 +13313,12 @@ /** * DocumentLayoutBlock block. - * @member {"textBlock"|"tableBlock"|"listBlock"|undefined} block + * @member {"textBlock"|"tableBlock"|"listBlock"|"imageBlock"|undefined} block * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock * @instance */ Object.defineProperty(DocumentLayoutBlock.prototype, "block", { - get: $util.oneOfGetter($oneOfFields = ["textBlock", "tableBlock", "listBlock"]), + get: $util.oneOfGetter($oneOfFields = ["textBlock", "tableBlock", "listBlock", "imageBlock"]), set: $util.oneOfSetter($oneOfFields) }); @@ -13100,6 +13358,8 @@ $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan.encode(message.pageSpan, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox")) $root.google.cloud.documentai.v1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.imageBlock != null && Object.hasOwnProperty.call(message, "imageBlock")) + $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.encode(message.imageBlock, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -13148,6 +13408,10 @@ message.listBlock = $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock.decode(reader, reader.uint32()); break; } + case 7: { + message.imageBlock = $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.decode(reader, reader.uint32()); + break; + } case 1: { message.blockId = reader.string(); break; @@ -13224,6 +13488,16 @@ return "listBlock." + error; } } + if (message.imageBlock != null && message.hasOwnProperty("imageBlock")) { + if (properties.block === 1) + return "block: multiple values"; + properties.block = 1; + { + var error = $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.verify(message.imageBlock); + if (error) + return "imageBlock." + error; + } + } if (message.blockId != null && message.hasOwnProperty("blockId")) if (!$util.isString(message.blockId)) return "blockId: string expected"; @@ -13267,6 +13541,11 @@ throw TypeError(".google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.listBlock: object expected"); message.listBlock = $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock.fromObject(object.listBlock); } + if (object.imageBlock != null) { + if (typeof object.imageBlock !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.imageBlock: object expected"); + message.imageBlock = $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.fromObject(object.imageBlock); + } if (object.blockId != null) message.blockId = String(object.blockId); if (object.pageSpan != null) { @@ -13321,6 +13600,11 @@ object.pageSpan = $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan.toObject(message.pageSpan, options); if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) object.boundingBox = $root.google.cloud.documentai.v1.BoundingPoly.toObject(message.boundingBox, options); + if (message.imageBlock != null && message.hasOwnProperty("imageBlock")) { + object.imageBlock = $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.toObject(message.imageBlock, options); + if (options.oneofs) + object.block = "imageBlock"; + } return object; }; @@ -13588,6 +13872,7 @@ * @property {string|null} [text] LayoutTextBlock text * @property {string|null} [type] LayoutTextBlock type * @property {Array.|null} [blocks] LayoutTextBlock blocks + * @property {google.cloud.documentai.v1.Document.IAnnotations|null} [annotations] LayoutTextBlock annotations */ /** @@ -13630,6 +13915,14 @@ */ LayoutTextBlock.prototype.blocks = $util.emptyArray; + /** + * LayoutTextBlock annotations. + * @member {google.cloud.documentai.v1.Document.IAnnotations|null|undefined} annotations + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock + * @instance + */ + LayoutTextBlock.prototype.annotations = null; + /** * Creates a new LayoutTextBlock instance using the specified properties. * @function create @@ -13661,6 +13954,8 @@ if (message.blocks != null && message.blocks.length) for (var i = 0; i < message.blocks.length; ++i) $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.encode(message.blocks[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + $root.google.cloud.documentai.v1.Document.Annotations.encode(message.annotations, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -13711,6 +14006,10 @@ message.blocks.push($root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.decode(reader, reader.uint32())); break; } + case 4: { + message.annotations = $root.google.cloud.documentai.v1.Document.Annotations.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -13761,6 +14060,11 @@ return "blocks." + error; } } + if (message.annotations != null && message.hasOwnProperty("annotations")) { + var error = $root.google.cloud.documentai.v1.Document.Annotations.verify(message.annotations); + if (error) + return "annotations." + error; + } return null; }; @@ -13790,6 +14094,11 @@ message.blocks[i] = $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.fromObject(object.blocks[i]); } } + if (object.annotations != null) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock.annotations: object expected"); + message.annotations = $root.google.cloud.documentai.v1.Document.Annotations.fromObject(object.annotations); + } return message; }; @@ -13811,6 +14120,7 @@ if (options.defaults) { object.text = ""; object.type = ""; + object.annotations = null; } if (message.text != null && message.hasOwnProperty("text")) object.text = message.text; @@ -13821,6 +14131,8 @@ for (var j = 0; j < message.blocks.length; ++j) object.blocks[j] = $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.toObject(message.blocks[j], options); } + if (message.annotations != null && message.hasOwnProperty("annotations")) + object.annotations = $root.google.cloud.documentai.v1.Document.Annotations.toObject(message.annotations, options); return object; }; @@ -13862,6 +14174,7 @@ * @property {Array.|null} [headerRows] LayoutTableBlock headerRows * @property {Array.|null} [bodyRows] LayoutTableBlock bodyRows * @property {string|null} [caption] LayoutTableBlock caption + * @property {google.cloud.documentai.v1.Document.IAnnotations|null} [annotations] LayoutTableBlock annotations */ /** @@ -13905,6 +14218,14 @@ */ LayoutTableBlock.prototype.caption = ""; + /** + * LayoutTableBlock annotations. + * @member {google.cloud.documentai.v1.Document.IAnnotations|null|undefined} annotations + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock + * @instance + */ + LayoutTableBlock.prototype.annotations = null; + /** * Creates a new LayoutTableBlock instance using the specified properties. * @function create @@ -13937,6 +14258,8 @@ $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableRow.encode(message.bodyRows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.caption); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + $root.google.cloud.documentai.v1.Document.Annotations.encode(message.annotations, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -13989,6 +14312,10 @@ message.caption = reader.string(); break; } + case 4: { + message.annotations = $root.google.cloud.documentai.v1.Document.Annotations.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -14045,6 +14372,11 @@ if (message.caption != null && message.hasOwnProperty("caption")) if (!$util.isString(message.caption)) return "caption: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + var error = $root.google.cloud.documentai.v1.Document.Annotations.verify(message.annotations); + if (error) + return "annotations." + error; + } return null; }; @@ -14082,6 +14414,11 @@ } if (object.caption != null) message.caption = String(object.caption); + if (object.annotations != null) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock.annotations: object expected"); + message.annotations = $root.google.cloud.documentai.v1.Document.Annotations.fromObject(object.annotations); + } return message; }; @@ -14102,8 +14439,10 @@ object.headerRows = []; object.bodyRows = []; } - if (options.defaults) + if (options.defaults) { object.caption = ""; + object.annotations = null; + } if (message.headerRows && message.headerRows.length) { object.headerRows = []; for (var j = 0; j < message.headerRows.length; ++j) @@ -14116,6 +14455,8 @@ } if (message.caption != null && message.hasOwnProperty("caption")) object.caption = message.caption; + if (message.annotations != null && message.hasOwnProperty("annotations")) + object.annotations = $root.google.cloud.documentai.v1.Document.Annotations.toObject(message.annotations, options); return object; }; @@ -15124,6 +15465,363 @@ return LayoutListEntry; })(); + DocumentLayoutBlock.LayoutImageBlock = (function() { + + /** + * Properties of a LayoutImageBlock. + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + * @interface ILayoutImageBlock + * @property {string|null} [blobAssetId] LayoutImageBlock blobAssetId + * @property {string|null} [gcsUri] LayoutImageBlock gcsUri + * @property {string|null} [dataUri] LayoutImageBlock dataUri + * @property {string|null} [mimeType] LayoutImageBlock mimeType + * @property {string|null} [imageText] LayoutImageBlock imageText + * @property {google.cloud.documentai.v1.Document.IAnnotations|null} [annotations] LayoutImageBlock annotations + */ + + /** + * Constructs a new LayoutImageBlock. + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock + * @classdesc Represents a LayoutImageBlock. + * @implements ILayoutImageBlock + * @constructor + * @param {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock=} [properties] Properties to set + */ + function LayoutImageBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LayoutImageBlock blobAssetId. + * @member {string|null|undefined} blobAssetId + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @instance + */ + LayoutImageBlock.prototype.blobAssetId = null; + + /** + * LayoutImageBlock gcsUri. + * @member {string|null|undefined} gcsUri + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @instance + */ + LayoutImageBlock.prototype.gcsUri = null; + + /** + * LayoutImageBlock dataUri. + * @member {string|null|undefined} dataUri + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @instance + */ + LayoutImageBlock.prototype.dataUri = null; + + /** + * LayoutImageBlock mimeType. + * @member {string} mimeType + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @instance + */ + LayoutImageBlock.prototype.mimeType = ""; + + /** + * LayoutImageBlock imageText. + * @member {string} imageText + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @instance + */ + LayoutImageBlock.prototype.imageText = ""; + + /** + * LayoutImageBlock annotations. + * @member {google.cloud.documentai.v1.Document.IAnnotations|null|undefined} annotations + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @instance + */ + LayoutImageBlock.prototype.annotations = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LayoutImageBlock imageSource. + * @member {"blobAssetId"|"gcsUri"|"dataUri"|undefined} imageSource + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @instance + */ + Object.defineProperty(LayoutImageBlock.prototype, "imageSource", { + get: $util.oneOfGetter($oneOfFields = ["blobAssetId", "gcsUri", "dataUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LayoutImageBlock instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @static + * @param {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock} LayoutImageBlock instance + */ + LayoutImageBlock.create = function create(properties) { + return new LayoutImageBlock(properties); + }; + + /** + * Encodes the specified LayoutImageBlock message. Does not implicitly {@link google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @static + * @param {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock} message LayoutImageBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LayoutImageBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.imageText != null && Object.hasOwnProperty.call(message, "imageText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageText); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + $root.google.cloud.documentai.v1.Document.Annotations.encode(message.annotations, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.blobAssetId != null && Object.hasOwnProperty.call(message, "blobAssetId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.blobAssetId); + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.gcsUri); + if (message.dataUri != null && Object.hasOwnProperty.call(message, "dataUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.dataUri); + return writer; + }; + + /** + * Encodes the specified LayoutImageBlock message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @static + * @param {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.ILayoutImageBlock} message LayoutImageBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LayoutImageBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LayoutImageBlock message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock} LayoutImageBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LayoutImageBlock.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.blobAssetId = reader.string(); + break; + } + case 5: { + message.gcsUri = reader.string(); + break; + } + case 6: { + message.dataUri = reader.string(); + break; + } + case 1: { + message.mimeType = reader.string(); + break; + } + case 2: { + message.imageText = reader.string(); + break; + } + case 3: { + message.annotations = $root.google.cloud.documentai.v1.Document.Annotations.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LayoutImageBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock} LayoutImageBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LayoutImageBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LayoutImageBlock message. + * @function verify + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LayoutImageBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.blobAssetId != null && message.hasOwnProperty("blobAssetId")) { + properties.imageSource = 1; + if (!$util.isString(message.blobAssetId)) + return "blobAssetId: string expected"; + } + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + if (properties.imageSource === 1) + return "imageSource: multiple values"; + properties.imageSource = 1; + if (!$util.isString(message.gcsUri)) + return "gcsUri: string expected"; + } + if (message.dataUri != null && message.hasOwnProperty("dataUri")) { + if (properties.imageSource === 1) + return "imageSource: multiple values"; + properties.imageSource = 1; + if (!$util.isString(message.dataUri)) + return "dataUri: string expected"; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.imageText != null && message.hasOwnProperty("imageText")) + if (!$util.isString(message.imageText)) + return "imageText: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + var error = $root.google.cloud.documentai.v1.Document.Annotations.verify(message.annotations); + if (error) + return "annotations." + error; + } + return null; + }; + + /** + * Creates a LayoutImageBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock} LayoutImageBlock + */ + LayoutImageBlock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock) + return object; + var message = new $root.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock(); + if (object.blobAssetId != null) + message.blobAssetId = String(object.blobAssetId); + if (object.gcsUri != null) + message.gcsUri = String(object.gcsUri); + if (object.dataUri != null) + message.dataUri = String(object.dataUri); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.imageText != null) + message.imageText = String(object.imageText); + if (object.annotations != null) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.annotations: object expected"); + message.annotations = $root.google.cloud.documentai.v1.Document.Annotations.fromObject(object.annotations); + } + return message; + }; + + /** + * Creates a plain object from a LayoutImageBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @static + * @param {google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock} message LayoutImageBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LayoutImageBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mimeType = ""; + object.imageText = ""; + object.annotations = null; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.imageText != null && message.hasOwnProperty("imageText")) + object.imageText = message.imageText; + if (message.annotations != null && message.hasOwnProperty("annotations")) + object.annotations = $root.google.cloud.documentai.v1.Document.Annotations.toObject(message.annotations, options); + if (message.blobAssetId != null && message.hasOwnProperty("blobAssetId")) { + object.blobAssetId = message.blobAssetId; + if (options.oneofs) + object.imageSource = "blobAssetId"; + } + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + object.gcsUri = message.gcsUri; + if (options.oneofs) + object.imageSource = "gcsUri"; + } + if (message.dataUri != null && message.hasOwnProperty("dataUri")) { + object.dataUri = message.dataUri; + if (options.oneofs) + object.imageSource = "dataUri"; + } + return object; + }; + + /** + * Converts this LayoutImageBlock to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @instance + * @returns {Object.} JSON object + */ + LayoutImageBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LayoutImageBlock + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LayoutImageBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock"; + }; + + return LayoutImageBlock; + })(); + return DocumentLayoutBlock; })(); @@ -15365,6 +16063,7 @@ * @property {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkPageSpan|null} [pageSpan] Chunk pageSpan * @property {Array.|null} [pageHeaders] Chunk pageHeaders * @property {Array.|null} [pageFooters] Chunk pageFooters + * @property {Array.|null} [chunkFields] Chunk chunkFields */ /** @@ -15379,6 +16078,7 @@ this.sourceBlockIds = []; this.pageHeaders = []; this.pageFooters = []; + this.chunkFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15433,6 +16133,14 @@ */ Chunk.prototype.pageFooters = $util.emptyArray; + /** + * Chunk chunkFields. + * @member {Array.} chunkFields + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + * @instance + */ + Chunk.prototype.chunkFields = $util.emptyArray; + /** * Creates a new Chunk instance using the specified properties. * @function create @@ -15472,6 +16180,9 @@ if (message.pageFooters != null && message.pageFooters.length) for (var i = 0; i < message.pageFooters.length; ++i) $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.encode(message.pageFooters[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.chunkFields != null && message.chunkFields.length) + for (var i = 0; i < message.chunkFields.length; ++i) + $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.encode(message.chunkFields[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -15538,6 +16249,12 @@ message.pageFooters.push($root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.decode(reader, reader.uint32())); break; } + case 7: { + if (!(message.chunkFields && message.chunkFields.length)) + message.chunkFields = []; + message.chunkFields.push($root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -15609,6 +16326,15 @@ return "pageFooters." + error; } } + if (message.chunkFields != null && message.hasOwnProperty("chunkFields")) { + if (!Array.isArray(message.chunkFields)) + return "chunkFields: array expected"; + for (var i = 0; i < message.chunkFields.length; ++i) { + var error = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.verify(message.chunkFields[i]); + if (error) + return "chunkFields." + error; + } + } return null; }; @@ -15660,6 +16386,16 @@ message.pageFooters[i] = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.fromObject(object.pageFooters[i]); } } + if (object.chunkFields) { + if (!Array.isArray(object.chunkFields)) + throw TypeError(".google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.chunkFields: array expected"); + message.chunkFields = []; + for (var i = 0; i < object.chunkFields.length; ++i) { + if (typeof object.chunkFields[i] !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.chunkFields: object expected"); + message.chunkFields[i] = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.fromObject(object.chunkFields[i]); + } + } return message; }; @@ -15680,6 +16416,7 @@ object.sourceBlockIds = []; object.pageHeaders = []; object.pageFooters = []; + object.chunkFields = []; } if (options.defaults) { object.chunkId = ""; @@ -15707,6 +16444,11 @@ for (var j = 0; j < message.pageFooters.length; ++j) object.pageFooters[j] = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkPageFooter.toObject(message.pageFooters[j], options); } + if (message.chunkFields && message.chunkFields.length) { + object.chunkFields = []; + for (var j = 0; j < message.chunkFields.length; ++j) + object.chunkFields[j] = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.toObject(message.chunkFields[j], options); + } return object; }; @@ -16433,263 +17175,1308 @@ return ChunkPageFooter; })(); - return Chunk; - })(); + Chunk.ImageChunkField = (function() { - return ChunkedDocument; - })(); + /** + * Properties of an ImageChunkField. + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + * @interface IImageChunkField + * @property {string|null} [blobAssetId] ImageChunkField blobAssetId + * @property {string|null} [gcsUri] ImageChunkField gcsUri + * @property {string|null} [dataUri] ImageChunkField dataUri + * @property {google.cloud.documentai.v1.Document.IAnnotations|null} [annotations] ImageChunkField annotations + */ - Document.EntityValidationOutput = (function() { + /** + * Constructs a new ImageChunkField. + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + * @classdesc Represents an ImageChunkField. + * @implements IImageChunkField + * @constructor + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField=} [properties] Properties to set + */ + function ImageChunkField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of an EntityValidationOutput. - * @memberof google.cloud.documentai.v1.Document - * @interface IEntityValidationOutput - * @property {Array.|null} [validationResults] EntityValidationOutput validationResults - * @property {boolean|null} [passAllRules] EntityValidationOutput passAllRules - */ + /** + * ImageChunkField blobAssetId. + * @member {string|null|undefined} blobAssetId + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @instance + */ + ImageChunkField.prototype.blobAssetId = null; - /** - * Constructs a new EntityValidationOutput. - * @memberof google.cloud.documentai.v1.Document - * @classdesc Represents an EntityValidationOutput. - * @implements IEntityValidationOutput - * @constructor - * @param {google.cloud.documentai.v1.Document.IEntityValidationOutput=} [properties] Properties to set - */ - function EntityValidationOutput(properties) { - this.validationResults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ImageChunkField gcsUri. + * @member {string|null|undefined} gcsUri + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @instance + */ + ImageChunkField.prototype.gcsUri = null; - /** - * EntityValidationOutput validationResults. - * @member {Array.} validationResults - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @instance - */ - EntityValidationOutput.prototype.validationResults = $util.emptyArray; + /** + * ImageChunkField dataUri. + * @member {string|null|undefined} dataUri + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @instance + */ + ImageChunkField.prototype.dataUri = null; - /** - * EntityValidationOutput passAllRules. - * @member {boolean} passAllRules - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @instance - */ - EntityValidationOutput.prototype.passAllRules = false; + /** + * ImageChunkField annotations. + * @member {google.cloud.documentai.v1.Document.IAnnotations|null|undefined} annotations + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @instance + */ + ImageChunkField.prototype.annotations = null; - /** - * Creates a new EntityValidationOutput instance using the specified properties. - * @function create - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @static - * @param {google.cloud.documentai.v1.Document.IEntityValidationOutput=} [properties] Properties to set - * @returns {google.cloud.documentai.v1.Document.EntityValidationOutput} EntityValidationOutput instance - */ - EntityValidationOutput.create = function create(properties) { - return new EntityValidationOutput(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified EntityValidationOutput message. Does not implicitly {@link google.cloud.documentai.v1.Document.EntityValidationOutput.verify|verify} messages. - * @function encode - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @static - * @param {google.cloud.documentai.v1.Document.IEntityValidationOutput} message EntityValidationOutput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityValidationOutput.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validationResults != null && message.validationResults.length) - for (var i = 0; i < message.validationResults.length; ++i) - $root.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.encode(message.validationResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.passAllRules != null && Object.hasOwnProperty.call(message, "passAllRules")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.passAllRules); - return writer; - }; + /** + * ImageChunkField imageSource. + * @member {"blobAssetId"|"gcsUri"|"dataUri"|undefined} imageSource + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @instance + */ + Object.defineProperty(ImageChunkField.prototype, "imageSource", { + get: $util.oneOfGetter($oneOfFields = ["blobAssetId", "gcsUri", "dataUri"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified EntityValidationOutput message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.EntityValidationOutput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @static - * @param {google.cloud.documentai.v1.Document.IEntityValidationOutput} message EntityValidationOutput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityValidationOutput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ImageChunkField instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField} ImageChunkField instance + */ + ImageChunkField.create = function create(properties) { + return new ImageChunkField(properties); + }; - /** - * Decodes an EntityValidationOutput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.documentai.v1.Document.EntityValidationOutput} EntityValidationOutput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityValidationOutput.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Document.EntityValidationOutput(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.validationResults && message.validationResults.length)) - message.validationResults = []; - message.validationResults.push($root.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.decode(reader, reader.uint32())); - break; - } - case 2: { - message.passAllRules = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified ImageChunkField message. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField} message ImageChunkField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageChunkField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blobAssetId != null && Object.hasOwnProperty.call(message, "blobAssetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.blobAssetId); + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); + if (message.dataUri != null && Object.hasOwnProperty.call(message, "dataUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dataUri); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + $root.google.cloud.documentai.v1.Document.Annotations.encode(message.annotations, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Decodes an EntityValidationOutput message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.documentai.v1.Document.EntityValidationOutput} EntityValidationOutput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityValidationOutput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ImageChunkField message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField} message ImageChunkField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageChunkField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an EntityValidationOutput message. - * @function verify - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntityValidationOutput.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validationResults != null && message.hasOwnProperty("validationResults")) { - if (!Array.isArray(message.validationResults)) - return "validationResults: array expected"; - for (var i = 0; i < message.validationResults.length; ++i) { - var error = $root.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.verify(message.validationResults[i]); - if (error) - return "validationResults." + error; - } - } - if (message.passAllRules != null && message.hasOwnProperty("passAllRules")) - if (typeof message.passAllRules !== "boolean") - return "passAllRules: boolean expected"; - return null; - }; + /** + * Decodes an ImageChunkField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField} ImageChunkField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageChunkField.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.blobAssetId = reader.string(); + break; + } + case 2: { + message.gcsUri = reader.string(); + break; + } + case 3: { + message.dataUri = reader.string(); + break; + } + case 4: { + message.annotations = $root.google.cloud.documentai.v1.Document.Annotations.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates an EntityValidationOutput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.documentai.v1.Document.EntityValidationOutput} EntityValidationOutput - */ - EntityValidationOutput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.documentai.v1.Document.EntityValidationOutput) - return object; - var message = new $root.google.cloud.documentai.v1.Document.EntityValidationOutput(); - if (object.validationResults) { - if (!Array.isArray(object.validationResults)) - throw TypeError(".google.cloud.documentai.v1.Document.EntityValidationOutput.validationResults: array expected"); - message.validationResults = []; - for (var i = 0; i < object.validationResults.length; ++i) { - if (typeof object.validationResults[i] !== "object") - throw TypeError(".google.cloud.documentai.v1.Document.EntityValidationOutput.validationResults: object expected"); - message.validationResults[i] = $root.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.fromObject(object.validationResults[i]); - } - } - if (object.passAllRules != null) - message.passAllRules = Boolean(object.passAllRules); - return message; - }; + /** + * Decodes an ImageChunkField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField} ImageChunkField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageChunkField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an EntityValidationOutput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @static - * @param {google.cloud.documentai.v1.Document.EntityValidationOutput} message EntityValidationOutput - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntityValidationOutput.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.validationResults = []; - if (options.defaults) - object.passAllRules = false; - if (message.validationResults && message.validationResults.length) { - object.validationResults = []; - for (var j = 0; j < message.validationResults.length; ++j) - object.validationResults[j] = $root.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.toObject(message.validationResults[j], options); - } - if (message.passAllRules != null && message.hasOwnProperty("passAllRules")) - object.passAllRules = message.passAllRules; - return object; - }; + /** + * Verifies an ImageChunkField message. + * @function verify + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageChunkField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.blobAssetId != null && message.hasOwnProperty("blobAssetId")) { + properties.imageSource = 1; + if (!$util.isString(message.blobAssetId)) + return "blobAssetId: string expected"; + } + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + if (properties.imageSource === 1) + return "imageSource: multiple values"; + properties.imageSource = 1; + if (!$util.isString(message.gcsUri)) + return "gcsUri: string expected"; + } + if (message.dataUri != null && message.hasOwnProperty("dataUri")) { + if (properties.imageSource === 1) + return "imageSource: multiple values"; + properties.imageSource = 1; + if (!$util.isString(message.dataUri)) + return "dataUri: string expected"; + } + if (message.annotations != null && message.hasOwnProperty("annotations")) { + var error = $root.google.cloud.documentai.v1.Document.Annotations.verify(message.annotations); + if (error) + return "annotations." + error; + } + return null; + }; - /** - * Converts this EntityValidationOutput to JSON. - * @function toJSON - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @instance - * @returns {Object.} JSON object - */ - EntityValidationOutput.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates an ImageChunkField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField} ImageChunkField + */ + ImageChunkField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField) + return object; + var message = new $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField(); + if (object.blobAssetId != null) + message.blobAssetId = String(object.blobAssetId); + if (object.gcsUri != null) + message.gcsUri = String(object.gcsUri); + if (object.dataUri != null) + message.dataUri = String(object.dataUri); + if (object.annotations != null) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.annotations: object expected"); + message.annotations = $root.google.cloud.documentai.v1.Document.Annotations.fromObject(object.annotations); + } + return message; + }; - /** - * Gets the default type url for EntityValidationOutput - * @function getTypeUrl - * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EntityValidationOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.documentai.v1.Document.EntityValidationOutput"; - }; + /** + * Creates a plain object from an ImageChunkField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField} message ImageChunkField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageChunkField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.annotations = null; + if (message.blobAssetId != null && message.hasOwnProperty("blobAssetId")) { + object.blobAssetId = message.blobAssetId; + if (options.oneofs) + object.imageSource = "blobAssetId"; + } + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + object.gcsUri = message.gcsUri; + if (options.oneofs) + object.imageSource = "gcsUri"; + } + if (message.dataUri != null && message.hasOwnProperty("dataUri")) { + object.dataUri = message.dataUri; + if (options.oneofs) + object.imageSource = "dataUri"; + } + if (message.annotations != null && message.hasOwnProperty("annotations")) + object.annotations = $root.google.cloud.documentai.v1.Document.Annotations.toObject(message.annotations, options); + return object; + }; - EntityValidationOutput.ValidationResult = (function() { + /** + * Converts this ImageChunkField to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @instance + * @returns {Object.} JSON object + */ + ImageChunkField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a ValidationResult. + /** + * Gets the default type url for ImageChunkField + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageChunkField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField"; + }; + + return ImageChunkField; + })(); + + Chunk.TableChunkField = (function() { + + /** + * Properties of a TableChunkField. + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + * @interface ITableChunkField + * @property {google.cloud.documentai.v1.Document.IAnnotations|null} [annotations] TableChunkField annotations + */ + + /** + * Constructs a new TableChunkField. + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + * @classdesc Represents a TableChunkField. + * @implements ITableChunkField + * @constructor + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField=} [properties] Properties to set + */ + function TableChunkField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableChunkField annotations. + * @member {google.cloud.documentai.v1.Document.IAnnotations|null|undefined} annotations + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @instance + */ + TableChunkField.prototype.annotations = null; + + /** + * Creates a new TableChunkField instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField} TableChunkField instance + */ + TableChunkField.create = function create(properties) { + return new TableChunkField(properties); + }; + + /** + * Encodes the specified TableChunkField message. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField} message TableChunkField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableChunkField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + $root.google.cloud.documentai.v1.Document.Annotations.encode(message.annotations, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TableChunkField message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField} message TableChunkField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableChunkField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableChunkField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField} TableChunkField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableChunkField.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.annotations = $root.google.cloud.documentai.v1.Document.Annotations.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableChunkField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField} TableChunkField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableChunkField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableChunkField message. + * @function verify + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableChunkField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + var error = $root.google.cloud.documentai.v1.Document.Annotations.verify(message.annotations); + if (error) + return "annotations." + error; + } + return null; + }; + + /** + * Creates a TableChunkField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField} TableChunkField + */ + TableChunkField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField) + return object; + var message = new $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField(); + if (object.annotations != null) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.annotations: object expected"); + message.annotations = $root.google.cloud.documentai.v1.Document.Annotations.fromObject(object.annotations); + } + return message; + }; + + /** + * Creates a plain object from a TableChunkField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField} message TableChunkField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableChunkField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.annotations = null; + if (message.annotations != null && message.hasOwnProperty("annotations")) + object.annotations = $root.google.cloud.documentai.v1.Document.Annotations.toObject(message.annotations, options); + return object; + }; + + /** + * Converts this TableChunkField to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @instance + * @returns {Object.} JSON object + */ + TableChunkField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableChunkField + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableChunkField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField"; + }; + + return TableChunkField; + })(); + + Chunk.ChunkField = (function() { + + /** + * Properties of a ChunkField. + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + * @interface IChunkField + * @property {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField|null} [imageChunkField] ChunkField imageChunkField + * @property {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField|null} [tableChunkField] ChunkField tableChunkField + */ + + /** + * Constructs a new ChunkField. + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk + * @classdesc Represents a ChunkField. + * @implements IChunkField + * @constructor + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkField=} [properties] Properties to set + */ + function ChunkField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChunkField imageChunkField. + * @member {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IImageChunkField|null|undefined} imageChunkField + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @instance + */ + ChunkField.prototype.imageChunkField = null; + + /** + * ChunkField tableChunkField. + * @member {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ITableChunkField|null|undefined} tableChunkField + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @instance + */ + ChunkField.prototype.tableChunkField = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChunkField fieldType. + * @member {"imageChunkField"|"tableChunkField"|undefined} fieldType + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @instance + */ + Object.defineProperty(ChunkField.prototype, "fieldType", { + get: $util.oneOfGetter($oneOfFields = ["imageChunkField", "tableChunkField"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChunkField instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkField=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField} ChunkField instance + */ + ChunkField.create = function create(properties) { + return new ChunkField(properties); + }; + + /** + * Encodes the specified ChunkField message. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkField} message ChunkField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageChunkField != null && Object.hasOwnProperty.call(message, "imageChunkField")) + $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.encode(message.imageChunkField, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tableChunkField != null && Object.hasOwnProperty.call(message, "tableChunkField")) + $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.encode(message.tableChunkField, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChunkField message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.IChunkField} message ChunkField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChunkField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChunkField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField} ChunkField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkField.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.imageChunkField = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tableChunkField = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChunkField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField} ChunkField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChunkField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChunkField message. + * @function verify + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChunkField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.imageChunkField != null && message.hasOwnProperty("imageChunkField")) { + properties.fieldType = 1; + { + var error = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.verify(message.imageChunkField); + if (error) + return "imageChunkField." + error; + } + } + if (message.tableChunkField != null && message.hasOwnProperty("tableChunkField")) { + if (properties.fieldType === 1) + return "fieldType: multiple values"; + properties.fieldType = 1; + { + var error = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.verify(message.tableChunkField); + if (error) + return "tableChunkField." + error; + } + } + return null; + }; + + /** + * Creates a ChunkField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField} ChunkField + */ + ChunkField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField) + return object; + var message = new $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField(); + if (object.imageChunkField != null) { + if (typeof object.imageChunkField !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.imageChunkField: object expected"); + message.imageChunkField = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.fromObject(object.imageChunkField); + } + if (object.tableChunkField != null) { + if (typeof object.tableChunkField !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField.tableChunkField: object expected"); + message.tableChunkField = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.fromObject(object.tableChunkField); + } + return message; + }; + + /** + * Creates a plain object from a ChunkField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @static + * @param {google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField} message ChunkField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChunkField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.imageChunkField != null && message.hasOwnProperty("imageChunkField")) { + object.imageChunkField = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ImageChunkField.toObject(message.imageChunkField, options); + if (options.oneofs) + object.fieldType = "imageChunkField"; + } + if (message.tableChunkField != null && message.hasOwnProperty("tableChunkField")) { + object.tableChunkField = $root.google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.TableChunkField.toObject(message.tableChunkField, options); + if (options.oneofs) + object.fieldType = "tableChunkField"; + } + return object; + }; + + /** + * Converts this ChunkField to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @instance + * @returns {Object.} JSON object + */ + ChunkField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChunkField + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChunkField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Document.ChunkedDocument.Chunk.ChunkField"; + }; + + return ChunkField; + })(); + + return Chunk; + })(); + + return ChunkedDocument; + })(); + + Document.BlobAsset = (function() { + + /** + * Properties of a BlobAsset. + * @memberof google.cloud.documentai.v1.Document + * @interface IBlobAsset + * @property {string|null} [assetId] BlobAsset assetId + * @property {Uint8Array|null} [content] BlobAsset content + * @property {string|null} [mimeType] BlobAsset mimeType + */ + + /** + * Constructs a new BlobAsset. + * @memberof google.cloud.documentai.v1.Document + * @classdesc Represents a BlobAsset. + * @implements IBlobAsset + * @constructor + * @param {google.cloud.documentai.v1.Document.IBlobAsset=} [properties] Properties to set + */ + function BlobAsset(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlobAsset assetId. + * @member {string} assetId + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @instance + */ + BlobAsset.prototype.assetId = ""; + + /** + * BlobAsset content. + * @member {Uint8Array} content + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @instance + */ + BlobAsset.prototype.content = $util.newBuffer([]); + + /** + * BlobAsset mimeType. + * @member {string} mimeType + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @instance + */ + BlobAsset.prototype.mimeType = ""; + + /** + * Creates a new BlobAsset instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @static + * @param {google.cloud.documentai.v1.Document.IBlobAsset=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Document.BlobAsset} BlobAsset instance + */ + BlobAsset.create = function create(properties) { + return new BlobAsset(properties); + }; + + /** + * Encodes the specified BlobAsset message. Does not implicitly {@link google.cloud.documentai.v1.Document.BlobAsset.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @static + * @param {google.cloud.documentai.v1.Document.IBlobAsset} message BlobAsset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlobAsset.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.assetId); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.content); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); + return writer; + }; + + /** + * Encodes the specified BlobAsset message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.BlobAsset.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @static + * @param {google.cloud.documentai.v1.Document.IBlobAsset} message BlobAsset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlobAsset.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlobAsset message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Document.BlobAsset} BlobAsset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlobAsset.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Document.BlobAsset(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.assetId = reader.string(); + break; + } + case 2: { + message.content = reader.bytes(); + break; + } + case 3: { + message.mimeType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlobAsset message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Document.BlobAsset} BlobAsset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlobAsset.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlobAsset message. + * @function verify + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlobAsset.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content))) + return "content: buffer expected"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + return null; + }; + + /** + * Creates a BlobAsset message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Document.BlobAsset} BlobAsset + */ + BlobAsset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Document.BlobAsset) + return object; + var message = new $root.google.cloud.documentai.v1.Document.BlobAsset(); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.content != null) + if (typeof object.content === "string") + $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0); + else if (object.content.length >= 0) + message.content = object.content; + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + return message; + }; + + /** + * Creates a plain object from a BlobAsset message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @static + * @param {google.cloud.documentai.v1.Document.BlobAsset} message BlobAsset + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlobAsset.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.assetId = ""; + if (options.bytes === String) + object.content = ""; + else { + object.content = []; + if (options.bytes !== Array) + object.content = $util.newBuffer(object.content); + } + object.mimeType = ""; + } + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.content != null && message.hasOwnProperty("content")) + object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + return object; + }; + + /** + * Converts this BlobAsset to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @instance + * @returns {Object.} JSON object + */ + BlobAsset.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BlobAsset + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Document.BlobAsset + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BlobAsset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Document.BlobAsset"; + }; + + return BlobAsset; + })(); + + Document.EntityValidationOutput = (function() { + + /** + * Properties of an EntityValidationOutput. + * @memberof google.cloud.documentai.v1.Document + * @interface IEntityValidationOutput + * @property {Array.|null} [validationResults] EntityValidationOutput validationResults + * @property {boolean|null} [passAllRules] EntityValidationOutput passAllRules + */ + + /** + * Constructs a new EntityValidationOutput. + * @memberof google.cloud.documentai.v1.Document + * @classdesc Represents an EntityValidationOutput. + * @implements IEntityValidationOutput + * @constructor + * @param {google.cloud.documentai.v1.Document.IEntityValidationOutput=} [properties] Properties to set + */ + function EntityValidationOutput(properties) { + this.validationResults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityValidationOutput validationResults. + * @member {Array.} validationResults + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @instance + */ + EntityValidationOutput.prototype.validationResults = $util.emptyArray; + + /** + * EntityValidationOutput passAllRules. + * @member {boolean} passAllRules + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @instance + */ + EntityValidationOutput.prototype.passAllRules = false; + + /** + * Creates a new EntityValidationOutput instance using the specified properties. + * @function create + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @static + * @param {google.cloud.documentai.v1.Document.IEntityValidationOutput=} [properties] Properties to set + * @returns {google.cloud.documentai.v1.Document.EntityValidationOutput} EntityValidationOutput instance + */ + EntityValidationOutput.create = function create(properties) { + return new EntityValidationOutput(properties); + }; + + /** + * Encodes the specified EntityValidationOutput message. Does not implicitly {@link google.cloud.documentai.v1.Document.EntityValidationOutput.verify|verify} messages. + * @function encode + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @static + * @param {google.cloud.documentai.v1.Document.IEntityValidationOutput} message EntityValidationOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityValidationOutput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validationResults != null && message.validationResults.length) + for (var i = 0; i < message.validationResults.length; ++i) + $root.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.encode(message.validationResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.passAllRules != null && Object.hasOwnProperty.call(message, "passAllRules")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.passAllRules); + return writer; + }; + + /** + * Encodes the specified EntityValidationOutput message, length delimited. Does not implicitly {@link google.cloud.documentai.v1.Document.EntityValidationOutput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @static + * @param {google.cloud.documentai.v1.Document.IEntityValidationOutput} message EntityValidationOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityValidationOutput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityValidationOutput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.documentai.v1.Document.EntityValidationOutput} EntityValidationOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityValidationOutput.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.documentai.v1.Document.EntityValidationOutput(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.validationResults && message.validationResults.length)) + message.validationResults = []; + message.validationResults.push($root.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.decode(reader, reader.uint32())); + break; + } + case 2: { + message.passAllRules = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityValidationOutput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.documentai.v1.Document.EntityValidationOutput} EntityValidationOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityValidationOutput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityValidationOutput message. + * @function verify + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityValidationOutput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validationResults != null && message.hasOwnProperty("validationResults")) { + if (!Array.isArray(message.validationResults)) + return "validationResults: array expected"; + for (var i = 0; i < message.validationResults.length; ++i) { + var error = $root.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.verify(message.validationResults[i]); + if (error) + return "validationResults." + error; + } + } + if (message.passAllRules != null && message.hasOwnProperty("passAllRules")) + if (typeof message.passAllRules !== "boolean") + return "passAllRules: boolean expected"; + return null; + }; + + /** + * Creates an EntityValidationOutput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.documentai.v1.Document.EntityValidationOutput} EntityValidationOutput + */ + EntityValidationOutput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.documentai.v1.Document.EntityValidationOutput) + return object; + var message = new $root.google.cloud.documentai.v1.Document.EntityValidationOutput(); + if (object.validationResults) { + if (!Array.isArray(object.validationResults)) + throw TypeError(".google.cloud.documentai.v1.Document.EntityValidationOutput.validationResults: array expected"); + message.validationResults = []; + for (var i = 0; i < object.validationResults.length; ++i) { + if (typeof object.validationResults[i] !== "object") + throw TypeError(".google.cloud.documentai.v1.Document.EntityValidationOutput.validationResults: object expected"); + message.validationResults[i] = $root.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.fromObject(object.validationResults[i]); + } + } + if (object.passAllRules != null) + message.passAllRules = Boolean(object.passAllRules); + return message; + }; + + /** + * Creates a plain object from an EntityValidationOutput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @static + * @param {google.cloud.documentai.v1.Document.EntityValidationOutput} message EntityValidationOutput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityValidationOutput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validationResults = []; + if (options.defaults) + object.passAllRules = false; + if (message.validationResults && message.validationResults.length) { + object.validationResults = []; + for (var j = 0; j < message.validationResults.length; ++j) + object.validationResults[j] = $root.google.cloud.documentai.v1.Document.EntityValidationOutput.ValidationResult.toObject(message.validationResults[j], options); + } + if (message.passAllRules != null && message.hasOwnProperty("passAllRules")) + object.passAllRules = message.passAllRules; + return object; + }; + + /** + * Converts this EntityValidationOutput to JSON. + * @function toJSON + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @instance + * @returns {Object.} JSON object + */ + EntityValidationOutput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityValidationOutput + * @function getTypeUrl + * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityValidationOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.documentai.v1.Document.EntityValidationOutput"; + }; + + EntityValidationOutput.ValidationResult = (function() { + + /** + * Properties of a ValidationResult. * @memberof google.cloud.documentai.v1.Document.EntityValidationOutput * @interface IValidationResult * @property {string|null} [ruleName] ValidationResult ruleName @@ -99735,327 +101522,75 @@ return v1beta3; })(); - return documentai; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return documentai; + })(); - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; + return cloud; + })(); - return Http; + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; })(); - api.HttpRule = (function() { + api.ResourceDescriptor = (function() { /** - * Properties of a HttpRule. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** - * Constructs a new HttpRule. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100063,220 +101598,175 @@ } /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype["delete"] = null; + ResourceDescriptor.prototype.type = ""; /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.patch = null; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.custom = null; + ResourceDescriptor.prototype.nameField = ""; /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.body = ""; + ResourceDescriptor.prototype.history = 0; /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.responseBody = ""; + ResourceDescriptor.prototype.plural = ""; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceDescriptor.prototype.singular = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceDescriptor.prototype.style = $util.emptyArray; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decode = function decode(reader, length, error) { + ResourceDescriptor.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.selector = reader.string(); + message.type = reader.string(); break; } case 2: { - message.get = reader.string(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); break; } case 3: { - message.put = reader.string(); + message.nameField = reader.string(); break; } case 4: { - message.post = reader.string(); + message.history = reader.int32(); break; } case 5: { - message["delete"] = reader.string(); + message.plural = reader.string(); break; } case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); + message.singular = reader.string(); break; } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); break; } default: @@ -100288,255 +101778,271 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpRule.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } } return null; }; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HttpRule + * Gets the default type url for ResourceDescriptor * @function getTypeUrl - * @memberof google.api.HttpRule + * @memberof google.api.ResourceDescriptor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.HttpRule"; + return typeUrlPrefix + "/google.api.ResourceDescriptor"; }; - return HttpRule; + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; })(); - api.CustomHttpPattern = (function() { + api.ResourceReference = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a ResourceReference. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new ResourceReference. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100544,91 +102050,91 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - CustomHttpPattern.prototype.kind = ""; + ResourceReference.prototype.type = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - CustomHttpPattern.prototype.path = ""; + ResourceReference.prototype.childType = ""; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + ResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length, error) { + ResourceReference.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.kind = reader.string(); + message.type = reader.string(); break; } case 2: { - message.path = reader.string(); + message.childType = reader.string(); break; } default: @@ -100640,133 +102146,133 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + ResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ResourceReference} ResourceReference */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + object.type = ""; + object.childType = ""; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for ResourceReference * @function getTypeUrl - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ResourceReference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; + return typeUrlPrefix + "/google.api.ResourceReference"; }; - return CustomHttpPattern; + return ResourceReference; })(); - api.CommonLanguageSettings = (function() { + api.Http = (function() { /** - * Properties of a CommonLanguageSettings. + * Properties of a Http. * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CommonLanguageSettings. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CommonLanguageSettings(properties) { - this.destinations = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -100774,102 +102280,94 @@ } /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; + Http.prototype.rules = $util.emptyArray; /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new CommonLanguageSettings instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Http * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Http * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Http * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommonLanguageSettings.decode = function decode(reader, length, error) { + Http.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.referenceDocsUri = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; } case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); + message.fullyDecodeReservedExpansion = reader.bool(); break; } default: @@ -100881,177 +102379,158 @@ }; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CommonLanguageSettings message. + * Verifies a Http message. * @function verify - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CommonLanguageSettings.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @returns {google.api.Http} Http */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Http * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommonLanguageSettings.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.destinations = []; + object.rules = []; if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CommonLanguageSettings to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CommonLanguageSettings + * Gets the default type url for Http * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Http * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + return typeUrlPrefix + "/google.api.Http"; }; - return CommonLanguageSettings; + return Http; })(); - api.ClientLibrarySettings = (function() { + api.HttpRule = (function() { /** - * Properties of a ClientLibrarySettings. + * Properties of a HttpRule. * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new ClientLibrarySettings. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ClientLibrarySettings(properties) { + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -101059,217 +102538,220 @@ } /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.version = ""; + HttpRule.prototype.selector = ""; /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.launchStage = 0; + HttpRule.prototype.get = null; /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.restNumericEnums = false; + HttpRule.prototype.put = null; /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.javaSettings = null; + HttpRule.prototype.post = null; /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.cppSettings = null; + HttpRule.prototype["delete"] = null; /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.phpSettings = null; + HttpRule.prototype.patch = null; /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.pythonSettings = null; + HttpRule.prototype.custom = null; /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.nodeSettings = null; + HttpRule.prototype.body = ""; /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.dotnetSettings = null; + HttpRule.prototype.responseBody = ""; /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.rubySettings = null; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - ClientLibrarySettings.prototype.goSettings = null; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ClientLibrarySettings instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.HttpRule * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.HttpRule * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.HttpRule * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientLibrarySettings.decode = function decode(reader, length, error) { + HttpRule.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.version = reader.string(); + message.selector = reader.string(); break; } case 2: { - message.launchStage = reader.int32(); + message.get = reader.string(); break; } case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + message.put = reader.string(); break; } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + case 4: { + message.post = reader.string(); break; } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + case 5: { + message["delete"] = reader.string(); break; } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + case 6: { + message.patch = reader.string(); break; } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); break; } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + case 7: { + message.body = reader.string(); break; } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + case 12: { + message.responseBody = reader.string(); break; } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; } default: @@ -101281,305 +102763,255 @@ }; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClientLibrarySettings message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClientLibrarySettings.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } } return null; }; /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @returns {google.api.HttpRule} HttpRule */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } return message; }; /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.HttpRule * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientLibrarySettings.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ClientLibrarySettings to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClientLibrarySettings + * Gets the default type url for HttpRule * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.HttpRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + return typeUrlPrefix + "/google.api.HttpRule"; }; - return ClientLibrarySettings; + return HttpRule; })(); - api.Publishing = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a Publishing. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new Publishing. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -101587,226 +103019,91 @@ } /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - Publishing.prototype.protoReferenceDocumentationUri = ""; + CustomHttpPattern.prototype.kind = ""; /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - Publishing.prototype.restReferenceDocumentationUri = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new Publishing instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.Publishing + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - Publishing.create = function create(properties) { - return new Publishing(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.Publishing + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Publishing + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Publishing message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.Publishing + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Publishing.decode = function decode(reader, length, error) { + CustomHttpPattern.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); + case 1: { + message.kind = reader.string(); break; } - case 111: { - message.restReferenceDocumentationUri = reader.string(); + case 2: { + message.path = reader.string(); break; } default: @@ -101818,303 +103115,133 @@ }; /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Publishing + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Publishing.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Publishing message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.Publishing + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Publishing.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Publishing + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.Publishing} message Publishing + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Publishing.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + object.kind = ""; + object.path = ""; } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this Publishing to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.Publishing + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - Publishing.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Publishing + * Gets the default type url for CustomHttpPattern * @function getTypeUrl - * @memberof google.api.Publishing + * @memberof google.api.CustomHttpPattern * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.Publishing"; + return typeUrlPrefix + "/google.api.CustomHttpPattern"; }; - return Publishing; + return CustomHttpPattern; })(); - api.JavaSettings = (function() { + api.CommonLanguageSettings = (function() { /** - * Properties of a JavaSettings. + * Properties of a CommonLanguageSettings. * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations */ /** - * Constructs a new JavaSettings. + * Constructs a new CommonLanguageSettings. * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set */ - function JavaSettings(properties) { - this.serviceClassNames = {}; + function CommonLanguageSettings(properties) { + this.destinations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -102122,125 +103249,102 @@ } /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings * @instance */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; + CommonLanguageSettings.prototype.referenceDocsUri = ""; /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings * @instance */ - JavaSettings.prototype.common = null; + CommonLanguageSettings.prototype.destinations = $util.emptyArray; /** - * Creates a new JavaSettings instance using the specified properties. + * Creates a new CommonLanguageSettings instance using the specified properties. * @function create - * @memberof google.api.JavaSettings + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); }; /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. * @function encode - * @memberof google.api.JavaSettings + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encode = function encode(message, writer) { + CommonLanguageSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.JavaSettings + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JavaSettings message from the specified reader or buffer. + * Decodes a CommonLanguageSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.JavaSettings + * @memberof google.api.CommonLanguageSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JavaSettings.decode = function decode(reader, length, error) { + CommonLanguageSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.libraryPackage = reader.string(); + message.referenceDocsUri = reader.string(); break; } case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); break; } default: @@ -102252,159 +103356,177 @@ }; /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.JavaSettings + * @memberof google.api.CommonLanguageSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a JavaSettings message. + * Verifies a CommonLanguageSettings message. * @function verify - * @memberof google.api.JavaSettings + * @memberof google.api.CommonLanguageSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - JavaSettings.verify = function verify(message) { + CommonLanguageSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } } return null; }; /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.JavaSettings + * @memberof google.api.CommonLanguageSettings * @static * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } } return message; }; /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.JavaSettings + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.JavaSettings} message JavaSettings + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JavaSettings.toObject = function toObject(message, options) { + CommonLanguageSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); return object; }; /** - * Converts this JavaSettings to JSON. + * Converts this CommonLanguageSettings to JSON. * @function toJSON - * @memberof google.api.JavaSettings + * @memberof google.api.CommonLanguageSettings * @instance * @returns {Object.} JSON object */ - JavaSettings.prototype.toJSON = function toJSON() { + CommonLanguageSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for JavaSettings + * Gets the default type url for CommonLanguageSettings * @function getTypeUrl - * @memberof google.api.JavaSettings + * @memberof google.api.CommonLanguageSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.JavaSettings"; + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; }; - return JavaSettings; + return CommonLanguageSettings; })(); - api.CppSettings = (function() { + api.ClientLibrarySettings = (function() { /** - * Properties of a CppSettings. + * Properties of a ClientLibrarySettings. * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings */ /** - * Constructs a new CppSettings. + * Constructs a new ClientLibrarySettings. * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set */ - function CppSettings(properties) { + function ClientLibrarySettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -102412,77 +103534,217 @@ } /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings * @instance */ - CppSettings.prototype.common = null; + ClientLibrarySettings.prototype.version = ""; /** - * Creates a new CppSettings instance using the specified properties. + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. * @function create - * @memberof google.api.CppSettings + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); }; /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. * @function encode - * @memberof google.api.CppSettings + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encode = function encode(message, writer) { + ClientLibrarySettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); return writer; }; /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CppSettings + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CppSettings message from the specified reader or buffer. + * Decodes a ClientLibrarySettings message from the specified reader or buffer. * @function decode - * @memberof google.api.CppSettings + * @memberof google.api.ClientLibrarySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CppSettings.decode = function decode(reader, length, error) { + ClientLibrarySettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); break; } default: @@ -102494,127 +103756,305 @@ }; /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CppSettings + * @memberof google.api.ClientLibrarySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CppSettings message. + * Verifies a ClientLibrarySettings message. * @function verify - * @memberof google.api.CppSettings + * @memberof google.api.ClientLibrarySettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CppSettings.verify = function verify(message) { + ClientLibrarySettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); if (error) - return "common." + error; + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; } return null; }; /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CppSettings + * @memberof google.api.ClientLibrarySettings * @static * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); } return message; }; /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CppSettings + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.api.CppSettings} message CppSettings + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CppSettings.toObject = function toObject(message, options) { + ClientLibrarySettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); return object; }; /** - * Converts this CppSettings to JSON. + * Converts this ClientLibrarySettings to JSON. * @function toJSON - * @memberof google.api.CppSettings + * @memberof google.api.ClientLibrarySettings * @instance * @returns {Object.} JSON object */ - CppSettings.prototype.toJSON = function toJSON() { + ClientLibrarySettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CppSettings + * Gets the default type url for ClientLibrarySettings * @function getTypeUrl - * @memberof google.api.CppSettings + * @memberof google.api.ClientLibrarySettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CppSettings"; + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; }; - return CppSettings; + return ClientLibrarySettings; })(); - api.PhpSettings = (function() { + api.Publishing = (function() { /** - * Properties of a PhpSettings. + * Properties of a Publishing. * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri */ /** - * Constructs a new PhpSettings. + * Constructs a new Publishing. * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings + * @classdesc Represents a Publishing. + * @implements IPublishing * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set + * @param {google.api.IPublishing=} [properties] Properties to set */ - function PhpSettings(properties) { + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -102622,77 +104062,226 @@ } /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing * @instance */ - PhpSettings.prototype.common = null; + Publishing.prototype.methodSettings = $util.emptyArray; /** - * Creates a new PhpSettings instance using the specified properties. + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. * @function create - * @memberof google.api.PhpSettings + * @memberof google.api.Publishing * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); + Publishing.create = function create(properties) { + return new Publishing(properties); }; /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. * @function encode - * @memberof google.api.PhpSettings + * @memberof google.api.Publishing * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {google.api.IPublishing} message Publishing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhpSettings.encode = function encode(message, writer) { + Publishing.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); return writer; }; /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.PhpSettings + * @memberof google.api.Publishing * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {google.api.IPublishing} message Publishing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + Publishing.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PhpSettings message from the specified reader or buffer. + * Decodes a Publishing message from the specified reader or buffer. * @function decode - * @memberof google.api.PhpSettings + * @memberof google.api.Publishing * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings + * @returns {google.api.Publishing} Publishing * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PhpSettings.decode = function decode(reader, length, error) { + Publishing.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); break; } default: @@ -102704,127 +104293,303 @@ }; /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * Decodes a Publishing message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.PhpSettings + * @memberof google.api.Publishing * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings + * @returns {google.api.Publishing} Publishing * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { + Publishing.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PhpSettings message. + * Verifies a Publishing message. * @function verify - * @memberof google.api.PhpSettings + * @memberof google.api.Publishing * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PhpSettings.verify = function verify(message) { + Publishing.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; return null; }; /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.PhpSettings + * @memberof google.api.Publishing * @static * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings + * @returns {google.api.Publishing} Publishing */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); return message; }; /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * Creates a plain object from a Publishing message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.PhpSettings + * @memberof google.api.Publishing * @static - * @param {google.api.PhpSettings} message PhpSettings + * @param {google.api.Publishing} message Publishing * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhpSettings.toObject = function toObject(message, options) { + Publishing.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; return object; }; /** - * Converts this PhpSettings to JSON. + * Converts this Publishing to JSON. * @function toJSON - * @memberof google.api.PhpSettings + * @memberof google.api.Publishing * @instance * @returns {Object.} JSON object */ - PhpSettings.prototype.toJSON = function toJSON() { + Publishing.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PhpSettings + * Gets the default type url for Publishing * @function getTypeUrl - * @memberof google.api.PhpSettings + * @memberof google.api.Publishing * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.PhpSettings"; + return typeUrlPrefix + "/google.api.Publishing"; }; - return PhpSettings; + return Publishing; })(); - api.PythonSettings = (function() { + api.JavaSettings = (function() { /** - * Properties of a PythonSettings. + * Properties of a JavaSettings. * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common */ /** - * Constructs a new PythonSettings. + * Constructs a new JavaSettings. * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set + * @param {google.api.IJavaSettings=} [properties] Properties to set */ - function PythonSettings(properties) { + function JavaSettings(properties) { + this.serviceClassNames = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -102832,76 +104597,124 @@ } /** - * PythonSettings common. + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @instance */ - PythonSettings.prototype.common = null; + JavaSettings.prototype.common = null; /** - * Creates a new PythonSettings instance using the specified properties. + * Creates a new JavaSettings instance using the specified properties. * @function create - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); }; /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. * @function encode - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PythonSettings.encode = function encode(message, writer) { + JavaSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PythonSettings message from the specified reader or buffer. + * Decodes a JavaSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings + * @returns {google.api.JavaSettings} JavaSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PythonSettings.decode = function decode(reader, length, error) { + JavaSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } @@ -102914,32 +104727,43 @@ }; /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings + * @returns {google.api.JavaSettings} JavaSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { + JavaSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PythonSettings message. + * Verifies a JavaSettings message. * @function verify - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PythonSettings.verify = function verify(message) { + JavaSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } if (message.common != null && message.hasOwnProperty("common")) { var error = $root.google.api.CommonLanguageSettings.verify(message.common); if (error) @@ -102949,92 +104773,113 @@ }; /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @static * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings + * @returns {google.api.JavaSettings} JavaSettings */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) return object; - var message = new $root.google.api.PythonSettings(); + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } if (object.common != null) { if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); + throw TypeError(".google.api.JavaSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } return message; }; /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @static - * @param {google.api.PythonSettings} message PythonSettings + * @param {google.api.JavaSettings} message JavaSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PythonSettings.toObject = function toObject(message, options) { + JavaSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); return object; }; /** - * Converts this PythonSettings to JSON. + * Converts this JavaSettings to JSON. * @function toJSON - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @instance * @returns {Object.} JSON object */ - PythonSettings.prototype.toJSON = function toJSON() { + JavaSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PythonSettings + * Gets the default type url for JavaSettings * @function getTypeUrl - * @memberof google.api.PythonSettings + * @memberof google.api.JavaSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.PythonSettings"; + return typeUrlPrefix + "/google.api.JavaSettings"; }; - return PythonSettings; + return JavaSettings; })(); - api.NodeSettings = (function() { + api.CppSettings = (function() { /** - * Properties of a NodeSettings. + * Properties of a CppSettings. * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common */ /** - * Constructs a new NodeSettings. + * Constructs a new CppSettings. * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings + * @classdesc Represents a CppSettings. + * @implements ICppSettings * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set + * @param {google.api.ICppSettings=} [properties] Properties to set */ - function NodeSettings(properties) { + function CppSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103042,35 +104887,35 @@ } /** - * NodeSettings common. + * CppSettings common. * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @instance */ - NodeSettings.prototype.common = null; + CppSettings.prototype.common = null; /** - * Creates a new NodeSettings instance using the specified properties. + * Creates a new CppSettings instance using the specified properties. * @function create - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); + CppSettings.create = function create(properties) { + return new CppSettings(properties); }; /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. * @function encode - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encode = function encode(message, writer) { + CppSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) @@ -103079,33 +104924,33 @@ }; /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NodeSettings message from the specified reader or buffer. + * Decodes a CppSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings + * @returns {google.api.CppSettings} CppSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NodeSettings.decode = function decode(reader, length, error) { + CppSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -103124,30 +104969,30 @@ }; /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * Decodes a CppSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings + * @returns {google.api.CppSettings} CppSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { + CppSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NodeSettings message. + * Verifies a CppSettings message. * @function verify - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NodeSettings.verify = function verify(message) { + CppSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.common != null && message.hasOwnProperty("common")) { @@ -103159,35 +105004,35 @@ }; /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @static * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings + * @returns {google.api.CppSettings} CppSettings */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) return object; - var message = new $root.google.api.NodeSettings(); + var message = new $root.google.api.CppSettings(); if (object.common != null) { if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); + throw TypeError(".google.api.CppSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } return message; }; /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @static - * @param {google.api.NodeSettings} message NodeSettings + * @param {google.api.CppSettings} message CppSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NodeSettings.toObject = function toObject(message, options) { + CppSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -103199,62 +105044,52 @@ }; /** - * Converts this NodeSettings to JSON. + * Converts this CppSettings to JSON. * @function toJSON - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @instance * @returns {Object.} JSON object */ - NodeSettings.prototype.toJSON = function toJSON() { + CppSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NodeSettings + * Gets the default type url for CppSettings * @function getTypeUrl - * @memberof google.api.NodeSettings + * @memberof google.api.CppSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.NodeSettings"; + return typeUrlPrefix + "/google.api.CppSettings"; }; - return NodeSettings; + return CppSettings; })(); - api.DotnetSettings = (function() { + api.PhpSettings = (function() { /** - * Properties of a DotnetSettings. + * Properties of a PhpSettings. * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common */ /** - * Constructs a new DotnetSettings. + * Constructs a new PhpSettings. * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @param {google.api.IPhpSettings=} [properties] Properties to set */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; + function PhpSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103262,125 +105097,70 @@ } /** - * DotnetSettings common. + * PhpSettings common. * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @instance */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + PhpSettings.prototype.common = null; /** - * Creates a new DotnetSettings instance using the specified properties. + * Creates a new PhpSettings instance using the specified properties. * @function create - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); }; /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. * @function encode - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DotnetSettings.encode = function encode(message, writer) { + PhpSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); return writer; }; /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DotnetSettings message from the specified reader or buffer. + * Decodes a PhpSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings + * @returns {google.api.PhpSettings} PhpSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DotnetSettings.decode = function decode(reader, length, error) { + PhpSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -103390,70 +105170,6 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } default: reader.skipType(tag & 7); break; @@ -103463,30 +105179,30 @@ }; /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings + * @returns {google.api.PhpSettings} PhpSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + PhpSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DotnetSettings message. + * Verifies a PhpSettings message. * @function verify - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DotnetSettings.verify = function verify(message) { + PhpSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.common != null && message.hasOwnProperty("common")) { @@ -103494,203 +105210,96 @@ if (error) return "common." + error; } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } return null; }; /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @static * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings + * @returns {google.api.PhpSettings} PhpSettings */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) return object; - var message = new $root.google.api.DotnetSettings(); + var message = new $root.google.api.PhpSettings(); if (object.common != null) { if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); + throw TypeError(".google.api.PhpSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } return message; }; /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @static - * @param {google.api.DotnetSettings} message DotnetSettings + * @param {google.api.PhpSettings} message PhpSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DotnetSettings.toObject = function toObject(message, options) { + PhpSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } if (options.defaults) object.common = null; if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } return object; }; /** - * Converts this DotnetSettings to JSON. + * Converts this PhpSettings to JSON. * @function toJSON - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @instance * @returns {Object.} JSON object */ - DotnetSettings.prototype.toJSON = function toJSON() { + PhpSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DotnetSettings + * Gets the default type url for PhpSettings * @function getTypeUrl - * @memberof google.api.DotnetSettings + * @memberof google.api.PhpSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.DotnetSettings"; + return typeUrlPrefix + "/google.api.PhpSettings"; }; - return DotnetSettings; + return PhpSettings; })(); - api.RubySettings = (function() { + api.PythonSettings = (function() { /** - * Properties of a RubySettings. + * Properties of a PythonSettings. * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common */ /** - * Constructs a new RubySettings. + * Constructs a new PythonSettings. * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set + * @param {google.api.IPythonSettings=} [properties] Properties to set */ - function RubySettings(properties) { + function PythonSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103698,35 +105307,35 @@ } /** - * RubySettings common. + * PythonSettings common. * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @instance */ - RubySettings.prototype.common = null; + PythonSettings.prototype.common = null; /** - * Creates a new RubySettings instance using the specified properties. + * Creates a new PythonSettings instance using the specified properties. * @function create - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); }; /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. * @function encode - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encode = function encode(message, writer) { + PythonSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) @@ -103735,33 +105344,33 @@ }; /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RubySettings message from the specified reader or buffer. + * Decodes a PythonSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings + * @returns {google.api.PythonSettings} PythonSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RubySettings.decode = function decode(reader, length, error) { + PythonSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -103780,30 +105389,30 @@ }; /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings + * @returns {google.api.PythonSettings} PythonSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { + PythonSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RubySettings message. + * Verifies a PythonSettings message. * @function verify - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RubySettings.verify = function verify(message) { + PythonSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.common != null && message.hasOwnProperty("common")) { @@ -103815,35 +105424,35 @@ }; /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @static * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings + * @returns {google.api.PythonSettings} PythonSettings */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) return object; - var message = new $root.google.api.RubySettings(); + var message = new $root.google.api.PythonSettings(); if (object.common != null) { if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); + throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } return message; }; /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @static - * @param {google.api.RubySettings} message RubySettings + * @param {google.api.PythonSettings} message PythonSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RubySettings.toObject = function toObject(message, options) { + PythonSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -103855,52 +105464,52 @@ }; /** - * Converts this RubySettings to JSON. + * Converts this PythonSettings to JSON. * @function toJSON - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @instance * @returns {Object.} JSON object */ - RubySettings.prototype.toJSON = function toJSON() { + PythonSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RubySettings + * Gets the default type url for PythonSettings * @function getTypeUrl - * @memberof google.api.RubySettings + * @memberof google.api.PythonSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.RubySettings"; + return typeUrlPrefix + "/google.api.PythonSettings"; }; - return RubySettings; + return PythonSettings; })(); - api.GoSettings = (function() { + api.NodeSettings = (function() { /** - * Properties of a GoSettings. + * Properties of a NodeSettings. * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common */ /** - * Constructs a new GoSettings. + * Constructs a new NodeSettings. * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings + * @classdesc Represents a NodeSettings. + * @implements INodeSettings * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set + * @param {google.api.INodeSettings=} [properties] Properties to set */ - function GoSettings(properties) { + function NodeSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -103908,35 +105517,35 @@ } /** - * GoSettings common. + * NodeSettings common. * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @instance */ - GoSettings.prototype.common = null; + NodeSettings.prototype.common = null; /** - * Creates a new GoSettings instance using the specified properties. + * Creates a new NodeSettings instance using the specified properties. * @function create - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); }; /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. * @function encode - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encode = function encode(message, writer) { + NodeSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) @@ -103945,33 +105554,33 @@ }; /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GoSettings message from the specified reader or buffer. + * Decodes a NodeSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings + * @returns {google.api.NodeSettings} NodeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GoSettings.decode = function decode(reader, length, error) { + NodeSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -103990,30 +105599,30 @@ }; /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings + * @returns {google.api.NodeSettings} NodeSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { + NodeSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GoSettings message. + * Verifies a NodeSettings message. * @function verify - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GoSettings.verify = function verify(message) { + NodeSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.common != null && message.hasOwnProperty("common")) { @@ -104025,35 +105634,35 @@ }; /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @static * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings + * @returns {google.api.NodeSettings} NodeSettings */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) return object; - var message = new $root.google.api.GoSettings(); + var message = new $root.google.api.NodeSettings(); if (object.common != null) { if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); + throw TypeError(".google.api.NodeSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } return message; }; /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @static - * @param {google.api.GoSettings} message GoSettings + * @param {google.api.NodeSettings} message NodeSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GoSettings.toObject = function toObject(message, options) { + NodeSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -104065,55 +105674,62 @@ }; /** - * Converts this GoSettings to JSON. + * Converts this NodeSettings to JSON. * @function toJSON - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @instance * @returns {Object.} JSON object */ - GoSettings.prototype.toJSON = function toJSON() { + NodeSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GoSettings + * Gets the default type url for NodeSettings * @function getTypeUrl - * @memberof google.api.GoSettings + * @memberof google.api.NodeSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.GoSettings"; + return typeUrlPrefix + "/google.api.NodeSettings"; }; - return GoSettings; + return NodeSettings; })(); - api.MethodSettings = (function() { + api.DotnetSettings = (function() { /** - * Properties of a MethodSettings. + * Properties of a DotnetSettings. * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures */ /** - * Constructs a new MethodSettings. + * Constructs a new DotnetSettings. * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set + * @param {google.api.IDotnetSettings=} [properties] Properties to set */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -104121,108 +105737,196 @@ } /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings * @instance */ - MethodSettings.prototype.selector = ""; + DotnetSettings.prototype.common = null; /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings * @instance */ - MethodSettings.prototype.longRunning = null; + DotnetSettings.prototype.renamedServices = $util.emptyObject; /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings * @instance */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + DotnetSettings.prototype.renamedResources = $util.emptyObject; /** - * Creates a new MethodSettings instance using the specified properties. + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. * @function create - * @memberof google.api.MethodSettings + * @memberof google.api.DotnetSettings * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); }; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. * @function encode - * @memberof google.api.MethodSettings + * @memberof google.api.DotnetSettings * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encode = function encode(message, writer) { + DotnetSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); return writer; }; /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.api.DotnetSettings * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * Decodes a DotnetSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.MethodSettings + * @memberof google.api.DotnetSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings + * @returns {google.api.DotnetSettings} DotnetSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodSettings.decode = function decode(reader, length, error) { + DotnetSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.selector = reader.string(); + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; break; } case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); break; } default: @@ -104234,699 +105938,522 @@ }; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.api.DotnetSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings + * @returns {google.api.DotnetSettings} DotnetSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodSettings message. + * Verifies a DotnetSettings message. * @function verify - * @memberof google.api.MethodSettings + * @memberof google.api.DotnetSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodSettings.verify = function verify(message) { + DotnetSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); if (error) - return "longRunning." + error; + return "common." + error; } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; } return null; }; /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MethodSettings + * @memberof google.api.DotnetSettings * @static * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings + * @returns {google.api.DotnetSettings} DotnetSettings */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); } return message; }; /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MethodSettings + * @memberof google.api.DotnetSettings * @static - * @param {google.api.MethodSettings} message MethodSettings + * @param {google.api.DotnetSettings} message DotnetSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodSettings.toObject = function toObject(message, options) { + DotnetSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; } return object; }; /** - * Converts this MethodSettings to JSON. + * Converts this DotnetSettings to JSON. * @function toJSON - * @memberof google.api.MethodSettings + * @memberof google.api.DotnetSettings * @instance * @returns {Object.} JSON object */ - MethodSettings.prototype.toJSON = function toJSON() { + DotnetSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodSettings + * Gets the default type url for DotnetSettings * @function getTypeUrl - * @memberof google.api.MethodSettings + * @memberof google.api.DotnetSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.MethodSettings"; + return typeUrlPrefix + "/google.api.DotnetSettings"; }; - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return DotnetSettings; + })(); - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; + api.RubySettings = (function() { - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - api.ResourceDescriptor = (function() { + } + return message; + }; /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings */ - ResourceDescriptor.prototype.type = ""; + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings * @instance + * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.nameField = ""; + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ResourceDescriptor.prototype.history = 0; + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common */ - ResourceDescriptor.prototype.plural = ""; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set */ - ResourceDescriptor.prototype.singular = ""; + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + GoSettings.prototype.common = null; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new GoSettings instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.GoSettings * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + GoSettings.create = function create(properties) { + return new GoSettings(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.GoSettings * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + GoSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.GoSettings * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a GoSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.GoSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.GoSettings} GoSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length, error) { + GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } default: @@ -104938,271 +106465,130 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a GoSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.GoSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.GoSettings} GoSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + GoSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a GoSettings message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.GoSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + GoSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; } return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.GoSettings * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.GoSettings} GoSettings */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.GoSettings * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.GoSettings} message GoSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + GoSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this GoSettings to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.GoSettings * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + GoSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for GoSettings * @function getTypeUrl - * @memberof google.api.ResourceDescriptor + * @memberof google.api.GoSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; + return typeUrlPrefix + "/google.api.GoSettings"; }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; + return GoSettings; })(); - api.ResourceReference = (function() { + api.MethodSettings = (function() { /** - * Properties of a ResourceReference. + * Properties of a MethodSettings. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields */ /** - * Constructs a new ResourceReference. + * Constructs a new MethodSettings. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.IMethodSettings=} [properties] Properties to set */ - function ResourceReference(properties) { + function MethodSettings(properties) { + this.autoPopulatedFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -105210,91 +106596,108 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings * @instance */ - ResourceReference.prototype.type = ""; + MethodSettings.prototype.selector = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings * @instance */ - ResourceReference.prototype.childType = ""; + MethodSettings.prototype.longRunning = null; /** - * Creates a new ResourceReference instance using the specified properties. + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.MethodSettings * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.MethodSettings * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + MethodSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.MethodSettings * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a MethodSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.MethodSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.MethodSettings} MethodSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length, error) { + MethodSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.type = reader.string(); + message.selector = reader.string(); break; } case 2: { - message.childType = reader.string(); + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); break; } default: @@ -105306,111 +106709,495 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.MethodSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.MethodSettings} MethodSettings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + MethodSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a MethodSettings message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.api.MethodSettings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + MethodSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.MethodSettings * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.MethodSettings} MethodSettings */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.MethodSettings * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.MethodSettings} message MethodSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + MethodSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this MethodSettings to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.MethodSettings * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + MethodSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for MethodSettings * @function getTypeUrl - * @memberof google.api.ResourceReference + * @memberof google.api.MethodSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceReference"; + return typeUrlPrefix + "/google.api.MethodSettings"; }; - return ResourceReference; + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; })(); return api; diff --git a/packages/google-cloud-documentai/protos/protos.json b/packages/google-cloud-documentai/protos/protos.json index 271c3d3c881..c536ff46f1f 100644 --- a/packages/google-cloud-documentai/protos/protos.json +++ b/packages/google-cloud-documentai/protos/protos.json @@ -126,6 +126,14 @@ "type": "ChunkedDocument", "id": 18 }, + "blobAssets": { + "rule": "repeated", + "type": "BlobAsset", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "entityValidationOutput": { "type": "EntityValidationOutput", "id": 21 @@ -1148,6 +1156,14 @@ } } }, + "Annotations": { + "fields": { + "description": { + "type": "string", + "id": 1 + } + } + }, "DocumentLayout": { "fields": { "blocks": { @@ -1163,7 +1179,8 @@ "oneof": [ "textBlock", "tableBlock", - "listBlock" + "listBlock", + "imageBlock" ] } }, @@ -1180,6 +1197,10 @@ "type": "LayoutListBlock", "id": 4 }, + "imageBlock": { + "type": "LayoutImageBlock", + "id": 7 + }, "blockId": { "type": "string", "id": 1 @@ -1220,6 +1241,10 @@ "rule": "repeated", "type": "DocumentLayoutBlock", "id": 3 + }, + "annotations": { + "type": "Annotations", + "id": 4 } } }, @@ -1238,6 +1263,10 @@ "caption": { "type": "string", "id": 3 + }, + "annotations": { + "type": "Annotations", + "id": 4 } } }, @@ -1288,6 +1317,52 @@ "id": 1 } } + }, + "LayoutImageBlock": { + "oneofs": { + "imageSource": { + "oneof": [ + "blobAssetId", + "gcsUri", + "dataUri" + ] + } + }, + "fields": { + "blobAssetId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "gcsUri": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataUri": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mimeType": { + "type": "string", + "id": 1 + }, + "imageText": { + "type": "string", + "id": 2 + }, + "annotations": { + "type": "Annotations", + "id": 3 + } + } } } } @@ -1330,6 +1405,11 @@ "rule": "repeated", "type": "ChunkPageFooter", "id": 6 + }, + "chunkFields": { + "rule": "repeated", + "type": "ChunkField", + "id": 7 } }, "nested": { @@ -1368,11 +1448,99 @@ "id": 2 } } + }, + "ImageChunkField": { + "oneofs": { + "imageSource": { + "oneof": [ + "blobAssetId", + "gcsUri", + "dataUri" + ] + } + }, + "fields": { + "blobAssetId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "gcsUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "annotations": { + "type": "Annotations", + "id": 4 + } + } + }, + "TableChunkField": { + "fields": { + "annotations": { + "type": "Annotations", + "id": 1 + } + } + }, + "ChunkField": { + "oneofs": { + "fieldType": { + "oneof": [ + "imageChunkField", + "tableChunkField" + ] + } + }, + "fields": { + "imageChunkField": { + "type": "ImageChunkField", + "id": 1 + }, + "tableChunkField": { + "type": "TableChunkField", + "id": 2 + } + } } } } } }, + "BlobAsset": { + "fields": { + "assetId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "content": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mimeType": { + "type": "string", + "id": 3 + } + } + }, "EntityValidationOutput": { "fields": { "validationResults": { @@ -9043,9 +9211,9 @@ }, "api": { "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "go_package": "google.golang.org/genproto/googleapis/api;api", "java_multiple_files": true, - "java_outer_classname": "ResourceProto", + "java_outer_classname": "LaunchStageProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -9073,6 +9241,83 @@ "IDENTIFIER": 8 } }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, "http": { "type": "HttpRule", "id": 72295728, @@ -9463,83 +9708,6 @@ "GA": 4, "DEPRECATED": 5 } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } } } },