diff --git a/packages/google-cloud-datacatalog-lineage/.eslintignore b/packages/google-cloud-datacatalog-lineage/.eslintignore new file mode 100644 index 000000000000..cfc348ec4d11 --- /dev/null +++ b/packages/google-cloud-datacatalog-lineage/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/packages/google-cloud-datacatalog-lineage/.eslintrc.json b/packages/google-cloud-datacatalog-lineage/.eslintrc.json new file mode 100644 index 000000000000..3e8d97ccb390 --- /dev/null +++ b/packages/google-cloud-datacatalog-lineage/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "extends": "./node_modules/gts", + "root": true +} diff --git a/packages/google-cloud-datacatalog-lineage/.gitattributes b/packages/google-cloud-datacatalog-lineage/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-cloud-datacatalog-lineage/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-datacatalog-lineage/.prettierignore b/packages/google-cloud-datacatalog-lineage/.prettierignore new file mode 100644 index 000000000000..9340ad9b86d3 --- /dev/null +++ b/packages/google-cloud-datacatalog-lineage/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-datacatalog-lineage/.prettierrc.js b/packages/google-cloud-datacatalog-lineage/.prettierrc.js new file mode 100644 index 000000000000..7649ee3c254e --- /dev/null +++ b/packages/google-cloud-datacatalog-lineage/.prettierrc.js @@ -0,0 +1,22 @@ +// 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. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-datacatalog-lineage/CODE_OF_CONDUCT.md b/packages/google-cloud-datacatalog-lineage/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-cloud-datacatalog-lineage/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-datacatalog-lineage/CONTRIBUTING.md b/packages/google-cloud-datacatalog-lineage/CONTRIBUTING.md new file mode 100644 index 000000000000..9d2ee0fcd7ba --- /dev/null +++ b/packages/google-cloud-datacatalog-lineage/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Lineage API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=datalineage.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-datacatalog-lineage/LICENSE b/packages/google-cloud-datacatalog-lineage/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-cloud-datacatalog-lineage/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/google-cloud-datacatalog-lineage/README.md b/packages/google-cloud-datacatalog-lineage/README.md index 91a5d93951d9..98458647942e 100644 --- a/packages/google-cloud-datacatalog-lineage/README.md +++ b/packages/google-cloud-datacatalog-lineage/README.md @@ -19,7 +19,7 @@ A comprehensive list of changes in each version may be found in [the CHANGELOG][homepage_changelog]. * [Data Lineage API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/lineage/latest) - +* [Data Lineage API Documentation](https://cloud.google.com/dataplex/docs/about-data-lineage) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -72,6 +72,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | list processes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_processes.js) | | list runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_runs.js) | | process open lineage run event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.process_open_lineage_run_event.js) | +| search lineage streaming | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.search_lineage_streaming.js) | | search links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.search_links.js) | | update process | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.update_process.js) | | update run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.update_run.js) | diff --git a/packages/google-cloud-datacatalog-lineage/protos/google/cloud/datacatalog/lineage/v1/lineage.proto b/packages/google-cloud-datacatalog-lineage/protos/google/cloud/datacatalog/lineage/v1/lineage.proto index 9af037f708da..6e18abeab8bd 100644 --- a/packages/google-cloud-datacatalog-lineage/protos/google/cloud/datacatalog/lineage/v1/lineage.proto +++ b/packages/google-cloud-datacatalog-lineage/protos/google/cloud/datacatalog/lineage/v1/lineage.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. @@ -19,12 +19,14 @@ package google.cloud.datacatalog.lineage.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "google/type/interval.proto"; option csharp_namespace = "Google.Cloud.DataCatalog.Lineage.V1"; option go_package = "cloud.google.com/go/datacatalog/lineage/apiv1/lineagepb;lineagepb"; @@ -224,6 +226,39 @@ service Lineage { body: "*" }; } + + // Retrieves a streaming response of lineage links connected to the requested + // assets by performing a breadth-first search in the given direction. Links + // represent the data flow between **source** (upstream) and **target** + // (downstream) assets in transformation pipelines. Links are stored in the + // same project as the Lineage Events that create them. This method retrieves + // links from all valid locations provided in the request. This method + // supports Column-Level Lineage (CLL) along with wildcard support to retrieve + // all CLL for an Entity FQN. + // + // Following permissions are required to retrieve links: + // * `datalineage.events.get` permission for the project where the link is + // stored for entity-level lineage. + // * `datalineage.events.getFields` permission for the project where the link + // is stored for column-level lineage. + // + // This method also returns processes that created the links if explicitly + // requested by setting + // [max_process_per_link](google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.limits.max_process_per_link) + // is non-zero and full process details are requested via + // `links.processes.process` in the + // [FieldMask](https://developers.google.com/workspace/docs/api/how-tos/field-masks#read_with_a_field_mask). + // + // Permission required to retrieve processes: + // * `datalineage.processes.get` permission for the project where the process + // is stored. + rpc SearchLineageStreaming(SearchLineageStreamingRequest) + returns (stream SearchLineageStreamingResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}:searchLineageStreaming" + body: "*" + }; + } } // A process is the definition of a data transformation operation. @@ -231,6 +266,8 @@ message Process { option (google.api.resource) = { type: "datalineage.googleapis.com/Process" pattern: "projects/{project}/locations/{location}/processes/{process}" + plural: "processes" + singular: "process" }; // Immutable. The resource name of the lineage process. Format: @@ -263,6 +300,8 @@ message Run { option (google.api.resource) = { type: "datalineage.googleapis.com/Run" pattern: "projects/{project}/locations/{location}/processes/{process}/runs/{run}" + plural: "runs" + singular: "run" }; // The current state of the run. @@ -292,7 +331,7 @@ message Run { string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Optional. A human-readable name you can set to display in a user interface. - // Must be not longer than 1024 characters and only contain UTF-8 letters + // Must be not longer than 200 characters and only contain UTF-8 letters // or numbers, spaces or characters like `_-:&.` string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -321,6 +360,8 @@ message LineageEvent { option (google.api.resource) = { type: "datalineage.googleapis.com/LineageEvent" pattern: "projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}" + plural: "lineageEvents" + singular: "lineageEvent" }; // Immutable. The resource name of the lineage event. @@ -354,14 +395,35 @@ message EventLink { // Required. Reference to the target entity EntityReference target = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Describes how the target depends on the source. + DependencyInfo dependency_info = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Dependency info describes how one entity depends on another. +message DependencyInfo { + // Required. Type of dependency. + DependencyType dependency_type = 1 [(google.api.field_behavior) = REQUIRED]; } // The soft reference to everything you can attach a lineage event to. message EntityReference { // Required. [Fully Qualified Name - // (FQN)](https://cloud.google.com/data-catalog/docs/fully-qualified-names) + // (FQN)](https://cloud.google.com/dataplex/docs/fully-qualified-names) // of the entity. string fully_qualified_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Field path within the entity. Each nesting level should be a + // separate value in the repeated field. The order matters. Must be empty for + // asset level lineage + // + // For example to address "salary.net" subfield where "salary" is a column and + // "net" is a proto field two values in the `field` should be reported, + // the first is "salary" and the second is "net". + // + // Each field length is limited to 500 characters. + // Maximum supported nesting level is 20. + repeated string field = 3 [(google.api.field_behavior) = OPTIONAL]; } // Metadata describing the operation. @@ -421,7 +483,7 @@ message OperationMetadata { } // Request message for -// [ProcessOpenLineageRunEvent][google.cloud.datacatalog.lineage.v1.ProcessOpenLineageRunEvent]. +// [ProcessOpenLineageRunEvent][google.cloud.datacatalog.lineage.v1.Lineage.ProcessOpenLineageRunEvent]. message ProcessOpenLineageRunEventRequest { // Required. The name of the project and its location that should own the // process, run, and lineage event. @@ -432,14 +494,17 @@ message ProcessOpenLineageRunEventRequest { google.protobuf.Struct open_lineage = 2 [(google.api.field_behavior) = REQUIRED]; - // A unique identifier for this request. Restricted to 36 ASCII characters. - // A random UUID is recommended. This request is idempotent only if a - // `request_id` is provided. - string request_id = 3; + // Optional. A unique identifier for this request. Restricted to 36 ASCII + // characters. A random UUID is recommended. This request is idempotent only + // if a `request_id` is provided. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; } // Response message for -// [ProcessOpenLineageRunEvent][google.cloud.datacatalog.lineage.v1.ProcessOpenLineageRunEvent]. +// [ProcessOpenLineageRunEvent][google.cloud.datacatalog.lineage.v1.Lineage.ProcessOpenLineageRunEvent]. message ProcessOpenLineageRunEventResponse { // Created process name. // Format: `projects/{project}/locations/{location}/processes/{process}`. @@ -463,7 +528,7 @@ message ProcessOpenLineageRunEventResponse { } // Request message for -// [CreateProcess][google.cloud.datacatalog.lineage.v1.CreateProcess]. +// [CreateProcess][google.cloud.datacatalog.lineage.v1.Lineage.CreateProcess]. message CreateProcessRequest { // Required. The name of the project and its location that should own the // process. @@ -477,30 +542,43 @@ message CreateProcessRequest { // Required. The process to create. Process process = 2 [(google.api.field_behavior) = REQUIRED]; - // A unique identifier for this request. Restricted to 36 ASCII characters. - // A random UUID is recommended. This request is idempotent only if a - // `request_id` is provided. - string request_id = 3; + // Optional. A unique identifier for this request. Restricted to 36 ASCII + // characters. A random UUID is recommended. This request is idempotent only + // if a `request_id` is provided. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; } // Request message for -// [UpdateProcess][google.cloud.datacatalog.lineage.v1.UpdateProcess]. +// [UpdateProcess][google.cloud.datacatalog.lineage.v1.Lineage.UpdateProcess]. message UpdateProcessRequest { // Required. The lineage process to update. // // The process's `name` field is used to identify the process to update. Process process = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of fields to update. Currently not used. The whole message is - // updated. - google.protobuf.FieldMask update_mask = 2; + // Optional. The list of fields to update. Currently not used. The whole + // message is updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true and the process is not found, the request inserts + // it. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; - // If set to true and the process is not found, the request inserts it. - bool allow_missing = 3; + // Optional. A unique identifier for this request. Restricted to 36 ASCII + // characters. A random UUID is recommended. This request is idempotent only + // if a `request_id` is provided. + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; } // Request message for -// [GetProcess][google.cloud.datacatalog.lineage.v1.GetProcess]. +// [GetProcess][google.cloud.datacatalog.lineage.v1.Lineage.GetProcess]. message GetProcessRequest { // Required. The name of the process to get. string name = 1 [ @@ -512,7 +590,7 @@ message GetProcessRequest { } // Request message for -// [ListProcesses][google.cloud.datacatalog.lineage.v1.ListProcesses]. +// [ListProcesses][google.cloud.datacatalog.lineage.v1.Lineage.ListProcesses]. message ListProcessesRequest { // Required. The name of the project and its location that owns this // collection of processes. @@ -523,22 +601,22 @@ message ListProcessesRequest { } ]; - // The maximum number of processes to return. The service may return + // Optional. The maximum number of processes to return. The service may return // fewer than this value. If unspecified, at most 50 processes are // returned. The maximum value is 100; values greater than 100 are cut to // 100. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // The page token received from a previous `ListProcesses` call. Specify - // it to get the next page. + // Optional. The page token received from a previous `ListProcesses` call. + // Specify it to get the next page. // // When paginating, all other parameters specified in this call must // match the parameters of the call that provided the page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for -// [ListProcesses][google.cloud.datacatalog.lineage.v1.ListProcesses]. +// [ListProcesses][google.cloud.datacatalog.lineage.v1.Lineage.ListProcesses]. message ListProcessesResponse { // The processes from the specified project and location. repeated Process processes = 1; @@ -549,7 +627,7 @@ message ListProcessesResponse { } // Request message for -// [DeleteProcess][google.cloud.datacatalog.lineage.v1.DeleteProcess]. +// [DeleteProcess][google.cloud.datacatalog.lineage.v1.Lineage.DeleteProcess]. message DeleteProcessRequest { // Required. The name of the process to delete. string name = 1 [ @@ -559,13 +637,13 @@ message DeleteProcessRequest { } ]; - // If set to true and the process is not found, the request + // Optional. If set to true and the process is not found, the request // succeeds but the server doesn't perform any actions. - bool allow_missing = 2; + bool allow_missing = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for -// [CreateRun][google.cloud.datacatalog.lineage.v1.CreateRun]. +// [CreateRun][google.cloud.datacatalog.lineage.v1.Lineage.CreateRun]. message CreateRunRequest { // Required. The name of the process that should own the run. string parent = 1 [ @@ -578,14 +656,17 @@ message CreateRunRequest { // Required. The run to create. Run run = 2 [(google.api.field_behavior) = REQUIRED]; - // A unique identifier for this request. Restricted to 36 ASCII characters. - // A random UUID is recommended. This request is idempotent only if a - // `request_id` is provided. - string request_id = 3; + // Optional. A unique identifier for this request. Restricted to 36 ASCII + // characters. A random UUID is recommended. This request is idempotent only + // if a `request_id` is provided. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; } // Request message for -// [UpdateRun][google.cloud.datacatalog.lineage.v1.UpdateRun]. +// [UpdateRun][google.cloud.datacatalog.lineage.v1.Lineage.UpdateRun]. message UpdateRunRequest { // Required. The lineage run to update. // @@ -595,16 +676,17 @@ message UpdateRunRequest { // `projects/{project}/locations/{location}/processes/{process}/runs/{run}`. Run run = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of fields to update. Currently not used. The whole message is - // updated. - google.protobuf.FieldMask update_mask = 2; + // Optional. The list of fields to update. Currently not used. The whole + // message is updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; - // If set to true and the run is not found, the request creates it. - bool allow_missing = 3; + // Optional. If set to true and the run is not found, the request creates it. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request message for -// [GetRun][google.cloud.datacatalog.lineage.v1.GetRun]. +// [GetRun][google.cloud.datacatalog.lineage.v1.Lineage.GetRun]. message GetRunRequest { // Required. The name of the run to get. string name = 1 [ @@ -614,32 +696,32 @@ message GetRunRequest { } // Request message for -// [ListRuns][google.cloud.datacatalog.lineage.v1.ListRuns]. +// [ListRuns][google.cloud.datacatalog.lineage.v1.Lineage.ListRuns]. message ListRunsRequest { // Required. The name of process that owns this collection of runs. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { - child_type: "datalineage.googleapis.com/Run" + type: "datalineage.googleapis.com/Process" } ]; - // The maximum number of runs to return. The service may return + // Optional. The maximum number of runs to return. The service may return // fewer than this value. If unspecified, at most 50 runs are // returned. The maximum value is 100; values greater than 100 are cut to // 100. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // The page token received from a previous `ListRuns` call. Specify + // Optional. The page token received from a previous `ListRuns` call. Specify // it to get the next page. // // When paginating, all other parameters specified in this call must // match the parameters of the call that provided the page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for -// [ListRuns][google.cloud.datacatalog.lineage.v1.ListRuns]. +// [ListRuns][google.cloud.datacatalog.lineage.v1.Lineage.ListRuns]. message ListRunsResponse { // The runs from the specified project and location. repeated Run runs = 1; @@ -650,7 +732,7 @@ message ListRunsResponse { } // Request message for -// [DeleteRun][google.cloud.datacatalog.lineage.v1.DeleteRun]. +// [DeleteRun][google.cloud.datacatalog.lineage.v1.Lineage.DeleteRun]. message DeleteRunRequest { // Required. The name of the run to delete. string name = 1 [ @@ -658,13 +740,13 @@ message DeleteRunRequest { (google.api.resource_reference) = { type: "datalineage.googleapis.com/Run" } ]; - // If set to true and the run is not found, the request + // Optional. If set to true and the run is not found, the request // succeeds but the server doesn't perform any actions. - bool allow_missing = 2; + bool allow_missing = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for -// [CreateLineageEvent][google.cloud.datacatalog.lineage.v1.CreateLineageEvent]. +// [CreateLineageEvent][google.cloud.datacatalog.lineage.v1.Lineage.CreateLineageEvent]. message CreateLineageEventRequest { // Required. The name of the run that should own the lineage event. string parent = 1 [ @@ -677,14 +759,17 @@ message CreateLineageEventRequest { // Required. The lineage event to create. LineageEvent lineage_event = 2 [(google.api.field_behavior) = REQUIRED]; - // A unique identifier for this request. Restricted to 36 ASCII characters. - // A random UUID is recommended. This request is idempotent only if a - // `request_id` is provided. - string request_id = 3; + // Optional. A unique identifier for this request. Restricted to 36 ASCII + // characters. A random UUID is recommended. This request is idempotent only + // if a `request_id` is provided. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; } // Request message for -// [GetLineageEvent][google.cloud.datacatalog.lineage.v1.GetLineageEvent]. +// [GetLineageEvent][google.cloud.datacatalog.lineage.v1.Lineage.GetLineageEvent]. message GetLineageEventRequest { // Required. The name of the lineage event to get. string name = 1 [ @@ -696,34 +781,32 @@ message GetLineageEventRequest { } // Request message for -// [ListLineageEvents][google.cloud.datacatalog.lineage.v1.ListLineageEvents]. +// [ListLineageEvents][google.cloud.datacatalog.lineage.v1.Lineage.ListLineageEvents]. message ListLineageEventsRequest { // Required. The name of the run that owns the collection of lineage events to // get. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datalineage.googleapis.com/LineageEvent" - } + (google.api.resource_reference) = { type: "datalineage.googleapis.com/Run" } ]; - // The maximum number of lineage events to return. + // Optional. The maximum number of lineage events to return. // // The service may return fewer events than this value. // If unspecified, at most 50 events are returned. The maximum value is 100; // values greater than 100 are cut to 100. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // The page token received from a previous `ListLineageEvents` call. Specify - // it to get the next page. + // Optional. The page token received from a previous `ListLineageEvents` call. + // Specify it to get the next page. // // When paginating, all other parameters specified in this call must // match the parameters of the call that provided the page token. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for -// [ListLineageEvents][google.cloud.datacatalog.lineage.v1.ListLineageEvents]. +// [ListLineageEvents][google.cloud.datacatalog.lineage.v1.Lineage.ListLineageEvents]. message ListLineageEventsResponse { // Lineage events from the specified project and location. repeated LineageEvent lineage_events = 1; @@ -734,7 +817,7 @@ message ListLineageEventsResponse { } // Request message for -// [DeleteLineageEvent][google.cloud.datacatalog.lineage.v1.DeleteLineageEvent]. +// [DeleteLineageEvent][google.cloud.datacatalog.lineage.v1.Lineage.DeleteLineageEvent]. message DeleteLineageEventRequest { // Required. The name of the lineage event to delete. string name = 1 [ @@ -744,9 +827,9 @@ message DeleteLineageEventRequest { } ]; - // If set to true and the lineage event is not found, the request + // Optional. If set to true and the lineage event is not found, the request // succeeds but the server doesn't perform any actions. - bool allow_missing = 2; + bool allow_missing = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for @@ -769,6 +852,26 @@ message SearchLinksRequest { // Optional. Send asset information in the **target** field to retrieve all // links that lead from upstream assets to the specified asset. EntityReference target = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Send a list of asset information in the **sources** field to + // retrieve all links that lead from the specified assets to downstream + // assets. This field is similar to the `source` + // [source][google.cloud.datacatalog.lineage.v1.SearchLinksRequest.source] + // field but allows providing multiple entities. + // All entities within the `MultipleEntityReference` must have the same + // `fully_qualified_name`. + MultipleEntityReference sources = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Send a list of asset information in the **targets** field to + // retrieve all links that lead from upstream assets to the specified + // assets. This field is similar to the `target` + // [target][google.cloud.datacatalog.lineage.v1.SearchLinksRequest.target] + // field but allows providing multiple entities. + // All entities within the `MultipleEntityReference` must have the same + // `fully_qualified_name`. + MultipleEntityReference targets = 7 + [(google.api.field_behavior) = OPTIONAL]; } // Optional. The maximum number of links to return in a single page of the @@ -787,6 +890,14 @@ message SearchLinksRequest { string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } +// Multiple entity reference for SearchLinksRequest. +message MultipleEntityReference { + // Optional. The list of entities to search for links. The maximum number of + // entities is 20. + repeated EntityReference entities = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + // Response message for // [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks]. message SearchLinksResponse { @@ -805,6 +916,12 @@ message SearchLinksResponse { // Links are created when LineageEvents record data transformation between // related assets. message Link { + // Dependency info describes how one entity depends on another. + message DependencyInfo { + // The type of dependency. + DependencyType dependency_type = 1; + } + // Output only. Immutable. The name of the link. Format: // `projects/{project}/locations/{location}/links/{link}`. string name = 1 [ @@ -823,6 +940,11 @@ message Link { // The end of the last event establishing this link. google.protobuf.Timestamp end_time = 5; + + // Optional. The dependency info of the link (applies only to column level + // links). + repeated DependencyInfo dependency_info = 6 + [(google.api.field_behavior) = OPTIONAL]; } // Request message for @@ -845,17 +967,17 @@ message BatchSearchLinkProcessesRequest { // Format: `projects/{project}/locations/{location}/links/{link}`. repeated string links = 2 [(google.api.field_behavior) = REQUIRED]; - // The maximum number of processes to return in a single page of the response. - // A page may contain fewer results than this value. - int32 page_size = 3; + // Optional. The maximum number of processes to return in a single page of the + // response. A page may contain fewer results than this value. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - // The page token received from a previous `BatchSearchLinkProcesses` call. - // Use it to get the next page. + // Optional. The page token received from a previous + // `BatchSearchLinkProcesses` call. Use it to get the next page. // // When requesting subsequent pages of a response, remember that // all parameters must match the values you provided // in the original request. - string page_token = 4; + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; } // Response message for @@ -923,17 +1045,27 @@ message Origin { // Dataproc DATAPROC = 6; + + // Vertex AI + VERTEX_AI = 7; + + // Dataflow + DATAFLOW = 8; + + // Looker Core + LOOKER_CORE = 9; } // Type of the source. // // Use of a source_type other than `CUSTOM` for process creation - // or updating is highly discouraged, and may be restricted in the future - // without notice. + // or updating is highly discouraged. It might be restricted in the future + // without notice. There will be increase in cost if you use any of the source + // types other than `CUSTOM`. SourceType source_type = 1; - // If the source_type isn't CUSTOM, the value of this field should be a GCP - // resource name of the system, which reports lineage. The project and + // If the source_type isn't CUSTOM, the value of this field should be a Google + // Cloud resource name of the system, which reports lineage. The project and // location parts of the resource name must match the project and location of // the lineage resource being created. Examples: // @@ -943,3 +1075,163 @@ message Origin { // - `{source_type: CUSTOM, name: "myCustomIntegration"}` string name = 2; } + +// Lineage link between two entities. +message LineageLink { + // Process metadata for the link. + message LineageProcess { + // Process that created the link. + Process process = 3; + } + + // Dependency info describes how one entity is dependent on another. + message DependencyInfo { + // The type of dependency. + DependencyType dependency_type = 1; + } + + // The entity that is the **source** of this link. + EntityReference source = 1; + + // The entity that is the **target** of this link. + EntityReference target = 2; + + // Processes metadata associated with the link. + repeated LineageProcess processes = 3; + + // Describes how the target entity is dependent on the source entity. + repeated DependencyInfo dependency_info = 4; + + // Depth of the current link in the graph starting from 1. + int32 depth = 5; + + // The location where the LineageEvent that created the link is stored. + string location = 7; +} + +// Request message for +// [SearchLineageStreaming][google.cloud.datacatalog.lineage.v1.Lineage.SearchLineageStreaming]. +message SearchLineageStreamingRequest { + // Direction of the search. + enum SearchDirection { + // Direction is unspecified. + SEARCH_DIRECTION_UNSPECIFIED = 0; + + // Retrieve links that lead from the specified asset to downstream assets. + DOWNSTREAM = 1; + + // Retrieve links that lead from upstream assets to the specified asset. + UPSTREAM = 2; + } + + // Entity set restriction. + enum EntitySet { + // The entity set is unspecified. Returns all the data. + ENTITY_SET_UNSPECIFIED = 0; + + // Returns entities with only FQN specified. For example, entities with the + // `field` field set are not returned. + ENTITIES = 1; + } + + // Filters for the search. + message SearchFilters { + // Optional. Types of dependencies between entities to retrieve. + // If unspecified, all dependency types are returned. + repeated DependencyType dependency_types = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Entity set restriction. If unspecified, the method returns all + // entities. + EntitySet entity_set = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Time interval to search for lineage. If unspecified, all + // lineage is returned. Currently, at most one of `start_time` and + // `end_time` can be set. + google.type.Interval time_range = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Limits for the search results. + message SearchLimits { + // Optional. The maximum depth of the search. The default value is 5 and + // maximum value is 100. + int32 max_depth = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of links to return in the response. The + // default value is 1_000 and the maximum value is 10_000. + int32 max_results = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of processes to return per link. The default + // value is 0 and the maximum value is 100. If this value is non-zero, the + // response will contain process names for the links. To retrieve full + // process details in the response, include `links.processes.process` in the + // [FieldMask](https://developers.google.com/workspace/docs/api/how-tos/field-masks#read_with_a_field_mask). + int32 max_process_per_link = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Criteria for the root of the search. + message RootCriteria { + // Criteria for the root of the search. + oneof criteria { + // Optional. The entities to initiate the search from. Entities can be + // specified by FQN only, or by FQN and field. To search by FQN and all + // available fields for that FQN, use the wildcard `*` as the field value. + MultipleEntityReference entities = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Required. The project and location to initiate the search from. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datalineage.googleapis.com/Process" + } + ]; + + // Required. The locations to search in. + repeated string locations = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Criteria for the root of the search. + RootCriteria root_criteria = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Direction of the search. + SearchDirection direction = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Filters for the search. + SearchFilters filters = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Limits for the search. + SearchLimits limits = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [SearchLineageStreaming][google.cloud.datacatalog.lineage.v1.Lineage.SearchLineageStreaming]. +message SearchLineageStreamingResponse { + // Output only. The lineage links that match the search criteria. Can be empty + // if no links match. + repeated LineageLink links = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Unordered list. Unreachable resources. If non-empty, the result set might + // be incomplete. + // + // Currently, only locations are supported. + // + // Format: `projects/[PROJECT_NUMBER]/locations/[LOCATION]` + // Example: projects/123456789/locations/us-east1 + repeated string unreachable = 2 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Type of dependency between entities. +enum DependencyType { + // Dependency type unspecified. + DEPENDENCY_TYPE_UNSPECIFIED = 0; + + // Exact data copy without any change. + EXACT_COPY = 1; + + // Other types of dependencies like filtering or grouping. + OTHER = 3; +} diff --git a/packages/google-cloud-datacatalog-lineage/protos/protos.d.ts b/packages/google-cloud-datacatalog-lineage/protos/protos.d.ts index 397c0e8823ef..685eb775b762 100644 --- a/packages/google-cloud-datacatalog-lineage/protos/protos.d.ts +++ b/packages/google-cloud-datacatalog-lineage/protos/protos.d.ts @@ -286,6 +286,20 @@ export namespace google { * @returns Promise */ public batchSearchLinkProcesses(request: google.cloud.datacatalog.lineage.v1.IBatchSearchLinkProcessesRequest): Promise; + + /** + * Calls SearchLineageStreaming. + * @param request SearchLineageStreamingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchLineageStreamingResponse + */ + public searchLineageStreaming(request: google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest, callback: google.cloud.datacatalog.lineage.v1.Lineage.SearchLineageStreamingCallback): void; + + /** + * Calls SearchLineageStreaming. + * @param request SearchLineageStreamingRequest message or plain object + * @returns Promise + */ + public searchLineageStreaming(request: google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest): Promise; } namespace Lineage { @@ -408,6 +422,13 @@ export namespace google { * @param [response] BatchSearchLinkProcessesResponse */ type BatchSearchLinkProcessesCallback = (error: (Error|null), response?: google.cloud.datacatalog.lineage.v1.BatchSearchLinkProcessesResponse) => void; + + /** + * Callback as used by {@link google.cloud.datacatalog.lineage.v1.Lineage|searchLineageStreaming}. + * @param error Error, if any + * @param [response] SearchLineageStreamingResponse + */ + type SearchLineageStreamingCallback = (error: (Error|null), response?: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse) => void; } /** Properties of a Process. */ @@ -787,6 +808,9 @@ export namespace google { /** EventLink target */ target?: (google.cloud.datacatalog.lineage.v1.IEntityReference|null); + + /** EventLink dependencyInfo */ + dependencyInfo?: (google.cloud.datacatalog.lineage.v1.IDependencyInfo|null); } /** Represents an EventLink. */ @@ -804,6 +828,9 @@ export namespace google { /** EventLink target. */ public target?: (google.cloud.datacatalog.lineage.v1.IEntityReference|null); + /** EventLink dependencyInfo. */ + public dependencyInfo?: (google.cloud.datacatalog.lineage.v1.IDependencyInfo|null); + /** * Creates a new EventLink instance using the specified properties. * @param [properties] Properties to set @@ -882,11 +909,111 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DependencyInfo. */ + interface IDependencyInfo { + + /** DependencyInfo dependencyType */ + dependencyType?: (google.cloud.datacatalog.lineage.v1.DependencyType|keyof typeof google.cloud.datacatalog.lineage.v1.DependencyType|null); + } + + /** Represents a DependencyInfo. */ + class DependencyInfo implements IDependencyInfo { + + /** + * Constructs a new DependencyInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.IDependencyInfo); + + /** DependencyInfo dependencyType. */ + public dependencyType: (google.cloud.datacatalog.lineage.v1.DependencyType|keyof typeof google.cloud.datacatalog.lineage.v1.DependencyType); + + /** + * Creates a new DependencyInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DependencyInfo instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.IDependencyInfo): google.cloud.datacatalog.lineage.v1.DependencyInfo; + + /** + * Encodes the specified DependencyInfo message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.DependencyInfo.verify|verify} messages. + * @param message DependencyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.IDependencyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DependencyInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.DependencyInfo.verify|verify} messages. + * @param message DependencyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.IDependencyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DependencyInfo + * @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.datacatalog.lineage.v1.DependencyInfo; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DependencyInfo + * @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.datacatalog.lineage.v1.DependencyInfo; + + /** + * Verifies a DependencyInfo 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 DependencyInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DependencyInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.DependencyInfo; + + /** + * Creates a plain object from a DependencyInfo message. Also converts values to other types if specified. + * @param message DependencyInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.DependencyInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DependencyInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DependencyInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an EntityReference. */ interface IEntityReference { /** EntityReference fullyQualifiedName */ fullyQualifiedName?: (string|null); + + /** EntityReference field */ + field?: (string[]|null); } /** Represents an EntityReference. */ @@ -901,6 +1028,9 @@ export namespace google { /** EntityReference fullyQualifiedName. */ public fullyQualifiedName: string; + /** EntityReference field. */ + public field: string[]; + /** * Creates a new EntityReference instance using the specified properties. * @param [properties] Properties to set @@ -1463,6 +1593,9 @@ export namespace google { /** UpdateProcessRequest allowMissing */ allowMissing?: (boolean|null); + + /** UpdateProcessRequest requestId */ + requestId?: (string|null); } /** Represents an UpdateProcessRequest. */ @@ -1483,6 +1616,9 @@ export namespace google { /** UpdateProcessRequest allowMissing. */ public allowMissing: boolean; + /** UpdateProcessRequest requestId. */ + public requestId: string; + /** * Creates a new UpdateProcessRequest instance using the specified properties. * @param [properties] Properties to set @@ -3136,6 +3272,12 @@ export namespace google { /** SearchLinksRequest target */ target?: (google.cloud.datacatalog.lineage.v1.IEntityReference|null); + /** SearchLinksRequest sources */ + sources?: (google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null); + + /** SearchLinksRequest targets */ + targets?: (google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null); + /** SearchLinksRequest pageSize */ pageSize?: (number|null); @@ -3161,6 +3303,12 @@ export namespace google { /** SearchLinksRequest target. */ public target?: (google.cloud.datacatalog.lineage.v1.IEntityReference|null); + /** SearchLinksRequest sources. */ + public sources?: (google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null); + + /** SearchLinksRequest targets. */ + public targets?: (google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null); + /** SearchLinksRequest pageSize. */ public pageSize: number; @@ -3168,7 +3316,7 @@ export namespace google { public pageToken: string; /** SearchLinksRequest criteria. */ - public criteria?: ("source"|"target"); + public criteria?: ("source"|"target"|"sources"|"targets"); /** * Creates a new SearchLinksRequest instance using the specified properties. @@ -3248,6 +3396,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a MultipleEntityReference. */ + interface IMultipleEntityReference { + + /** MultipleEntityReference entities */ + entities?: (google.cloud.datacatalog.lineage.v1.IEntityReference[]|null); + } + + /** Represents a MultipleEntityReference. */ + class MultipleEntityReference implements IMultipleEntityReference { + + /** + * Constructs a new MultipleEntityReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.IMultipleEntityReference); + + /** MultipleEntityReference entities. */ + public entities: google.cloud.datacatalog.lineage.v1.IEntityReference[]; + + /** + * Creates a new MultipleEntityReference instance using the specified properties. + * @param [properties] Properties to set + * @returns MultipleEntityReference instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.IMultipleEntityReference): google.cloud.datacatalog.lineage.v1.MultipleEntityReference; + + /** + * Encodes the specified MultipleEntityReference message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.MultipleEntityReference.verify|verify} messages. + * @param message MultipleEntityReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.IMultipleEntityReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MultipleEntityReference message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.MultipleEntityReference.verify|verify} messages. + * @param message MultipleEntityReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.IMultipleEntityReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MultipleEntityReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MultipleEntityReference + * @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.datacatalog.lineage.v1.MultipleEntityReference; + + /** + * Decodes a MultipleEntityReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MultipleEntityReference + * @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.datacatalog.lineage.v1.MultipleEntityReference; + + /** + * Verifies a MultipleEntityReference 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 MultipleEntityReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MultipleEntityReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.MultipleEntityReference; + + /** + * Creates a plain object from a MultipleEntityReference message. Also converts values to other types if specified. + * @param message MultipleEntityReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.MultipleEntityReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MultipleEntityReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MultipleEntityReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a SearchLinksResponse. */ interface ISearchLinksResponse { @@ -3368,6 +3613,9 @@ export namespace google { /** Link endTime */ endTime?: (google.protobuf.ITimestamp|null); + + /** Link dependencyInfo */ + dependencyInfo?: (google.cloud.datacatalog.lineage.v1.Link.IDependencyInfo[]|null); } /** Represents a Link. */ @@ -3394,6 +3642,9 @@ export namespace google { /** Link endTime. */ public endTime?: (google.protobuf.ITimestamp|null); + /** Link dependencyInfo. */ + public dependencyInfo: google.cloud.datacatalog.lineage.v1.Link.IDependencyInfo[]; + /** * Creates a new Link instance using the specified properties. * @param [properties] Properties to set @@ -3472,6 +3723,106 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace Link { + + /** Properties of a DependencyInfo. */ + interface IDependencyInfo { + + /** DependencyInfo dependencyType */ + dependencyType?: (google.cloud.datacatalog.lineage.v1.DependencyType|keyof typeof google.cloud.datacatalog.lineage.v1.DependencyType|null); + } + + /** Represents a DependencyInfo. */ + class DependencyInfo implements IDependencyInfo { + + /** + * Constructs a new DependencyInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.Link.IDependencyInfo); + + /** DependencyInfo dependencyType. */ + public dependencyType: (google.cloud.datacatalog.lineage.v1.DependencyType|keyof typeof google.cloud.datacatalog.lineage.v1.DependencyType); + + /** + * Creates a new DependencyInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DependencyInfo instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.Link.IDependencyInfo): google.cloud.datacatalog.lineage.v1.Link.DependencyInfo; + + /** + * Encodes the specified DependencyInfo message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.Link.DependencyInfo.verify|verify} messages. + * @param message DependencyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.Link.IDependencyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DependencyInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.Link.DependencyInfo.verify|verify} messages. + * @param message DependencyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.Link.IDependencyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DependencyInfo + * @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.datacatalog.lineage.v1.Link.DependencyInfo; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DependencyInfo + * @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.datacatalog.lineage.v1.Link.DependencyInfo; + + /** + * Verifies a DependencyInfo 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 DependencyInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DependencyInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.Link.DependencyInfo; + + /** + * Creates a plain object from a DependencyInfo message. Also converts values to other types if specified. + * @param message DependencyInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.Link.DependencyInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DependencyInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DependencyInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a BatchSearchLinkProcessesRequest. */ interface IBatchSearchLinkProcessesRequest { @@ -3793,230 +4144,1128 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ProcessLinkInfo. */ - interface IProcessLinkInfo { + /** Properties of a ProcessLinkInfo. */ + interface IProcessLinkInfo { + + /** ProcessLinkInfo link */ + link?: (string|null); + + /** ProcessLinkInfo startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** ProcessLinkInfo endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a ProcessLinkInfo. */ + class ProcessLinkInfo implements IProcessLinkInfo { + + /** + * Constructs a new ProcessLinkInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.IProcessLinkInfo); + + /** ProcessLinkInfo link. */ + public link: string; + + /** ProcessLinkInfo startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** ProcessLinkInfo endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ProcessLinkInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ProcessLinkInfo instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.IProcessLinkInfo): google.cloud.datacatalog.lineage.v1.ProcessLinkInfo; + + /** + * Encodes the specified ProcessLinkInfo message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.verify|verify} messages. + * @param message ProcessLinkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.IProcessLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProcessLinkInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.verify|verify} messages. + * @param message ProcessLinkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.IProcessLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProcessLinkInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProcessLinkInfo + * @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.datacatalog.lineage.v1.ProcessLinkInfo; + + /** + * Decodes a ProcessLinkInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProcessLinkInfo + * @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.datacatalog.lineage.v1.ProcessLinkInfo; + + /** + * Verifies a ProcessLinkInfo 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 ProcessLinkInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProcessLinkInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.ProcessLinkInfo; + + /** + * Creates a plain object from a ProcessLinkInfo message. Also converts values to other types if specified. + * @param message ProcessLinkInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.ProcessLinkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProcessLinkInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProcessLinkInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Origin. */ + interface IOrigin { + + /** Origin sourceType */ + sourceType?: (google.cloud.datacatalog.lineage.v1.Origin.SourceType|keyof typeof google.cloud.datacatalog.lineage.v1.Origin.SourceType|null); + + /** Origin name */ + name?: (string|null); + } + + /** Represents an Origin. */ + class Origin implements IOrigin { + + /** + * Constructs a new Origin. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.IOrigin); + + /** Origin sourceType. */ + public sourceType: (google.cloud.datacatalog.lineage.v1.Origin.SourceType|keyof typeof google.cloud.datacatalog.lineage.v1.Origin.SourceType); + + /** Origin name. */ + public name: string; + + /** + * Creates a new Origin instance using the specified properties. + * @param [properties] Properties to set + * @returns Origin instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.IOrigin): google.cloud.datacatalog.lineage.v1.Origin; + + /** + * Encodes the specified Origin message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.Origin.verify|verify} messages. + * @param message Origin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.IOrigin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Origin message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.Origin.verify|verify} messages. + * @param message Origin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.IOrigin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Origin message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Origin + * @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.datacatalog.lineage.v1.Origin; + + /** + * Decodes an Origin message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Origin + * @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.datacatalog.lineage.v1.Origin; + + /** + * Verifies an Origin 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 Origin message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Origin + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.Origin; + + /** + * Creates a plain object from an Origin message. Also converts values to other types if specified. + * @param message Origin + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.Origin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Origin to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Origin + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Origin { + + /** SourceType enum. */ + enum SourceType { + SOURCE_TYPE_UNSPECIFIED = 0, + CUSTOM = 1, + BIGQUERY = 2, + DATA_FUSION = 3, + COMPOSER = 4, + LOOKER_STUDIO = 5, + DATAPROC = 6, + VERTEX_AI = 7, + DATAFLOW = 8, + LOOKER_CORE = 9 + } + } + + /** Properties of a LineageLink. */ + interface ILineageLink { + + /** LineageLink source */ + source?: (google.cloud.datacatalog.lineage.v1.IEntityReference|null); + + /** LineageLink target */ + target?: (google.cloud.datacatalog.lineage.v1.IEntityReference|null); + + /** LineageLink processes */ + processes?: (google.cloud.datacatalog.lineage.v1.LineageLink.ILineageProcess[]|null); + + /** LineageLink dependencyInfo */ + dependencyInfo?: (google.cloud.datacatalog.lineage.v1.LineageLink.IDependencyInfo[]|null); + + /** LineageLink depth */ + depth?: (number|null); + + /** LineageLink location */ + location?: (string|null); + } + + /** Represents a LineageLink. */ + class LineageLink implements ILineageLink { + + /** + * Constructs a new LineageLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.ILineageLink); + + /** LineageLink source. */ + public source?: (google.cloud.datacatalog.lineage.v1.IEntityReference|null); + + /** LineageLink target. */ + public target?: (google.cloud.datacatalog.lineage.v1.IEntityReference|null); + + /** LineageLink processes. */ + public processes: google.cloud.datacatalog.lineage.v1.LineageLink.ILineageProcess[]; + + /** LineageLink dependencyInfo. */ + public dependencyInfo: google.cloud.datacatalog.lineage.v1.LineageLink.IDependencyInfo[]; + + /** LineageLink depth. */ + public depth: number; + + /** LineageLink location. */ + public location: string; + + /** + * Creates a new LineageLink instance using the specified properties. + * @param [properties] Properties to set + * @returns LineageLink instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.ILineageLink): google.cloud.datacatalog.lineage.v1.LineageLink; + + /** + * Encodes the specified LineageLink message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.verify|verify} messages. + * @param message LineageLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.ILineageLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LineageLink message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.verify|verify} messages. + * @param message LineageLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.ILineageLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LineageLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LineageLink + * @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.datacatalog.lineage.v1.LineageLink; + + /** + * Decodes a LineageLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LineageLink + * @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.datacatalog.lineage.v1.LineageLink; + + /** + * Verifies a LineageLink 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 LineageLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LineageLink + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.LineageLink; + + /** + * Creates a plain object from a LineageLink message. Also converts values to other types if specified. + * @param message LineageLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.LineageLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LineageLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LineageLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LineageLink { + + /** Properties of a LineageProcess. */ + interface ILineageProcess { + + /** LineageProcess process */ + process?: (google.cloud.datacatalog.lineage.v1.IProcess|null); + } + + /** Represents a LineageProcess. */ + class LineageProcess implements ILineageProcess { + + /** + * Constructs a new LineageProcess. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.LineageLink.ILineageProcess); + + /** LineageProcess process. */ + public process?: (google.cloud.datacatalog.lineage.v1.IProcess|null); + + /** + * Creates a new LineageProcess instance using the specified properties. + * @param [properties] Properties to set + * @returns LineageProcess instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.LineageLink.ILineageProcess): google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess; + + /** + * Encodes the specified LineageProcess message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess.verify|verify} messages. + * @param message LineageProcess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.LineageLink.ILineageProcess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LineageProcess message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess.verify|verify} messages. + * @param message LineageProcess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.LineageLink.ILineageProcess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LineageProcess message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LineageProcess + * @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.datacatalog.lineage.v1.LineageLink.LineageProcess; + + /** + * Decodes a LineageProcess message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LineageProcess + * @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.datacatalog.lineage.v1.LineageLink.LineageProcess; + + /** + * Verifies a LineageProcess 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 LineageProcess message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LineageProcess + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess; + + /** + * Creates a plain object from a LineageProcess message. Also converts values to other types if specified. + * @param message LineageProcess + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LineageProcess to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LineageProcess + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DependencyInfo. */ + interface IDependencyInfo { + + /** DependencyInfo dependencyType */ + dependencyType?: (google.cloud.datacatalog.lineage.v1.DependencyType|keyof typeof google.cloud.datacatalog.lineage.v1.DependencyType|null); + } + + /** Represents a DependencyInfo. */ + class DependencyInfo implements IDependencyInfo { + + /** + * Constructs a new DependencyInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.LineageLink.IDependencyInfo); + + /** DependencyInfo dependencyType. */ + public dependencyType: (google.cloud.datacatalog.lineage.v1.DependencyType|keyof typeof google.cloud.datacatalog.lineage.v1.DependencyType); + + /** + * Creates a new DependencyInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DependencyInfo instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.LineageLink.IDependencyInfo): google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo; + + /** + * Encodes the specified DependencyInfo message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo.verify|verify} messages. + * @param message DependencyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.LineageLink.IDependencyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DependencyInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo.verify|verify} messages. + * @param message DependencyInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.LineageLink.IDependencyInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DependencyInfo + * @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.datacatalog.lineage.v1.LineageLink.DependencyInfo; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DependencyInfo + * @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.datacatalog.lineage.v1.LineageLink.DependencyInfo; + + /** + * Verifies a DependencyInfo 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 DependencyInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DependencyInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo; + + /** + * Creates a plain object from a DependencyInfo message. Also converts values to other types if specified. + * @param message DependencyInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DependencyInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DependencyInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SearchLineageStreamingRequest. */ + interface ISearchLineageStreamingRequest { + + /** SearchLineageStreamingRequest parent */ + parent?: (string|null); + + /** SearchLineageStreamingRequest locations */ + locations?: (string[]|null); - /** ProcessLinkInfo link */ - link?: (string|null); + /** SearchLineageStreamingRequest rootCriteria */ + rootCriteria?: (google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria|null); - /** ProcessLinkInfo startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** SearchLineageStreamingRequest direction */ + direction?: (google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection|keyof typeof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection|null); - /** ProcessLinkInfo endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** SearchLineageStreamingRequest filters */ + filters?: (google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters|null); + + /** SearchLineageStreamingRequest limits */ + limits?: (google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits|null); } - /** Represents a ProcessLinkInfo. */ - class ProcessLinkInfo implements IProcessLinkInfo { + /** Represents a SearchLineageStreamingRequest. */ + class SearchLineageStreamingRequest implements ISearchLineageStreamingRequest { /** - * Constructs a new ProcessLinkInfo. + * Constructs a new SearchLineageStreamingRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.lineage.v1.IProcessLinkInfo); + constructor(properties?: google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest); - /** ProcessLinkInfo link. */ - public link: string; + /** SearchLineageStreamingRequest parent. */ + public parent: string; - /** ProcessLinkInfo startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** SearchLineageStreamingRequest locations. */ + public locations: string[]; - /** ProcessLinkInfo endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** SearchLineageStreamingRequest rootCriteria. */ + public rootCriteria?: (google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria|null); + + /** SearchLineageStreamingRequest direction. */ + public direction: (google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection|keyof typeof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection); + + /** SearchLineageStreamingRequest filters. */ + public filters?: (google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters|null); + + /** SearchLineageStreamingRequest limits. */ + public limits?: (google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits|null); /** - * Creates a new ProcessLinkInfo instance using the specified properties. + * Creates a new SearchLineageStreamingRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ProcessLinkInfo instance + * @returns SearchLineageStreamingRequest instance */ - public static create(properties?: google.cloud.datacatalog.lineage.v1.IProcessLinkInfo): google.cloud.datacatalog.lineage.v1.ProcessLinkInfo; + public static create(properties?: google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest; /** - * Encodes the specified ProcessLinkInfo message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.verify|verify} messages. - * @param message ProcessLinkInfo message or plain object to encode + * Encodes the specified SearchLineageStreamingRequest message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.verify|verify} messages. + * @param message SearchLineageStreamingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.lineage.v1.IProcessLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ProcessLinkInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.ProcessLinkInfo.verify|verify} messages. - * @param message ProcessLinkInfo message or plain object to encode + * Encodes the specified SearchLineageStreamingRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.verify|verify} messages. + * @param message SearchLineageStreamingRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.IProcessLinkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ProcessLinkInfo message from the specified reader or buffer. + * Decodes a SearchLineageStreamingRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ProcessLinkInfo + * @returns SearchLineageStreamingRequest * @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.datacatalog.lineage.v1.ProcessLinkInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest; /** - * Decodes a ProcessLinkInfo message from the specified reader or buffer, length delimited. + * Decodes a SearchLineageStreamingRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ProcessLinkInfo + * @returns SearchLineageStreamingRequest * @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.datacatalog.lineage.v1.ProcessLinkInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest; /** - * Verifies a ProcessLinkInfo message. + * Verifies a SearchLineageStreamingRequest 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 ProcessLinkInfo message from a plain object. Also converts values to their respective internal types. + * Creates a SearchLineageStreamingRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ProcessLinkInfo + * @returns SearchLineageStreamingRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.ProcessLinkInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest; /** - * Creates a plain object from a ProcessLinkInfo message. Also converts values to other types if specified. - * @param message ProcessLinkInfo + * Creates a plain object from a SearchLineageStreamingRequest message. Also converts values to other types if specified. + * @param message SearchLineageStreamingRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.lineage.v1.ProcessLinkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ProcessLinkInfo to JSON. + * Converts this SearchLineageStreamingRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ProcessLinkInfo + * Gets the default type url for SearchLineageStreamingRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Origin. */ - interface IOrigin { + namespace SearchLineageStreamingRequest { - /** Origin sourceType */ - sourceType?: (google.cloud.datacatalog.lineage.v1.Origin.SourceType|keyof typeof google.cloud.datacatalog.lineage.v1.Origin.SourceType|null); + /** SearchDirection enum. */ + enum SearchDirection { + SEARCH_DIRECTION_UNSPECIFIED = 0, + DOWNSTREAM = 1, + UPSTREAM = 2 + } - /** Origin name */ - name?: (string|null); + /** EntitySet enum. */ + enum EntitySet { + ENTITY_SET_UNSPECIFIED = 0, + ENTITIES = 1 + } + + /** Properties of a SearchFilters. */ + interface ISearchFilters { + + /** SearchFilters dependencyTypes */ + dependencyTypes?: (google.cloud.datacatalog.lineage.v1.DependencyType[]|null); + + /** SearchFilters entitySet */ + entitySet?: (google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.EntitySet|keyof typeof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.EntitySet|null); + + /** SearchFilters timeRange */ + timeRange?: (google.type.IInterval|null); + } + + /** Represents a SearchFilters. */ + class SearchFilters implements ISearchFilters { + + /** + * Constructs a new SearchFilters. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters); + + /** SearchFilters dependencyTypes. */ + public dependencyTypes: google.cloud.datacatalog.lineage.v1.DependencyType[]; + + /** SearchFilters entitySet. */ + public entitySet: (google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.EntitySet|keyof typeof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.EntitySet); + + /** SearchFilters timeRange. */ + public timeRange?: (google.type.IInterval|null); + + /** + * Creates a new SearchFilters instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchFilters instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters; + + /** + * Encodes the specified SearchFilters message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.verify|verify} messages. + * @param message SearchFilters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchFilters message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.verify|verify} messages. + * @param message SearchFilters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchFilters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchFilters + * @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.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters; + + /** + * Decodes a SearchFilters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchFilters + * @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.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters; + + /** + * Verifies a SearchFilters 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 SearchFilters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchFilters + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters; + + /** + * Creates a plain object from a SearchFilters message. Also converts values to other types if specified. + * @param message SearchFilters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchFilters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchFilters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchLimits. */ + interface ISearchLimits { + + /** SearchLimits maxDepth */ + maxDepth?: (number|null); + + /** SearchLimits maxResults */ + maxResults?: (number|null); + + /** SearchLimits maxProcessPerLink */ + maxProcessPerLink?: (number|null); + } + + /** Represents a SearchLimits. */ + class SearchLimits implements ISearchLimits { + + /** + * Constructs a new SearchLimits. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits); + + /** SearchLimits maxDepth. */ + public maxDepth: number; + + /** SearchLimits maxResults. */ + public maxResults: number; + + /** SearchLimits maxProcessPerLink. */ + public maxProcessPerLink: number; + + /** + * Creates a new SearchLimits instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchLimits instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits; + + /** + * Encodes the specified SearchLimits message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits.verify|verify} messages. + * @param message SearchLimits message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchLimits message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits.verify|verify} messages. + * @param message SearchLimits message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchLimits message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchLimits + * @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.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits; + + /** + * Decodes a SearchLimits message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchLimits + * @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.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits; + + /** + * Verifies a SearchLimits 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 SearchLimits message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchLimits + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits; + + /** + * Creates a plain object from a SearchLimits message. Also converts values to other types if specified. + * @param message SearchLimits + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchLimits to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchLimits + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RootCriteria. */ + interface IRootCriteria { + + /** RootCriteria entities */ + entities?: (google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null); + } + + /** Represents a RootCriteria. */ + class RootCriteria implements IRootCriteria { + + /** + * Constructs a new RootCriteria. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria); + + /** RootCriteria entities. */ + public entities?: (google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null); + + /** RootCriteria criteria. */ + public criteria?: "entities"; + + /** + * Creates a new RootCriteria instance using the specified properties. + * @param [properties] Properties to set + * @returns RootCriteria instance + */ + public static create(properties?: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria; + + /** + * Encodes the specified RootCriteria message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria.verify|verify} messages. + * @param message RootCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RootCriteria message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria.verify|verify} messages. + * @param message RootCriteria message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RootCriteria message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RootCriteria + * @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.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria; + + /** + * Decodes a RootCriteria message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RootCriteria + * @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.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria; + + /** + * Verifies a RootCriteria 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 RootCriteria message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RootCriteria + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria; + + /** + * Creates a plain object from a RootCriteria message. Also converts values to other types if specified. + * @param message RootCriteria + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RootCriteria to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RootCriteria + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents an Origin. */ - class Origin implements IOrigin { + /** Properties of a SearchLineageStreamingResponse. */ + interface ISearchLineageStreamingResponse { + + /** SearchLineageStreamingResponse links */ + links?: (google.cloud.datacatalog.lineage.v1.ILineageLink[]|null); + + /** SearchLineageStreamingResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a SearchLineageStreamingResponse. */ + class SearchLineageStreamingResponse implements ISearchLineageStreamingResponse { /** - * Constructs a new Origin. + * Constructs a new SearchLineageStreamingResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datacatalog.lineage.v1.IOrigin); + constructor(properties?: google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingResponse); - /** Origin sourceType. */ - public sourceType: (google.cloud.datacatalog.lineage.v1.Origin.SourceType|keyof typeof google.cloud.datacatalog.lineage.v1.Origin.SourceType); + /** SearchLineageStreamingResponse links. */ + public links: google.cloud.datacatalog.lineage.v1.ILineageLink[]; - /** Origin name. */ - public name: string; + /** SearchLineageStreamingResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new Origin instance using the specified properties. + * Creates a new SearchLineageStreamingResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Origin instance + * @returns SearchLineageStreamingResponse instance */ - public static create(properties?: google.cloud.datacatalog.lineage.v1.IOrigin): google.cloud.datacatalog.lineage.v1.Origin; + public static create(properties?: google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingResponse): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse; /** - * Encodes the specified Origin message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.Origin.verify|verify} messages. - * @param message Origin message or plain object to encode + * Encodes the specified SearchLineageStreamingResponse message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse.verify|verify} messages. + * @param message SearchLineageStreamingResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datacatalog.lineage.v1.IOrigin, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Origin message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.Origin.verify|verify} messages. - * @param message Origin message or plain object to encode + * Encodes the specified SearchLineageStreamingResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse.verify|verify} messages. + * @param message SearchLineageStreamingResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.IOrigin, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Origin message from the specified reader or buffer. + * Decodes a SearchLineageStreamingResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Origin + * @returns SearchLineageStreamingResponse * @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.datacatalog.lineage.v1.Origin; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse; /** - * Decodes an Origin message from the specified reader or buffer, length delimited. + * Decodes a SearchLineageStreamingResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Origin + * @returns SearchLineageStreamingResponse * @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.datacatalog.lineage.v1.Origin; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse; /** - * Verifies an Origin message. + * Verifies a SearchLineageStreamingResponse 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 Origin message from a plain object. Also converts values to their respective internal types. + * Creates a SearchLineageStreamingResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Origin + * @returns SearchLineageStreamingResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.Origin; + public static fromObject(object: { [k: string]: any }): google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse; /** - * Creates a plain object from an Origin message. Also converts values to other types if specified. - * @param message Origin + * Creates a plain object from a SearchLineageStreamingResponse message. Also converts values to other types if specified. + * @param message SearchLineageStreamingResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datacatalog.lineage.v1.Origin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Origin to JSON. + * Converts this SearchLineageStreamingResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Origin + * Gets the default type url for SearchLineageStreamingResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Origin { - - /** SourceType enum. */ - enum SourceType { - SOURCE_TYPE_UNSPECIFIED = 0, - CUSTOM = 1, - BIGQUERY = 2, - DATA_FUSION = 3, - COMPOSER = 4, - LOOKER_STUDIO = 5, - DATAPROC = 6 - } + /** DependencyType enum. */ + enum DependencyType { + DEPENDENCY_TYPE_UNSPECIFIED = 0, + EXACT_COPY = 1, + OTHER = 3 } } } @@ -5892,6 +7141,115 @@ export namespace google { IDENTIFIER = 8 } + /** Properties of a FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @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.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @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.FieldInfo; + + /** + * Verifies a FieldInfo 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 FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } + /** Properties of a ResourceDescriptor. */ interface IResourceDescriptor { @@ -8315,6 +9673,9 @@ export namespace google { /** FieldOptions .google.api.fieldBehavior */ ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); + /** FieldOptions .google.api.resourceReference */ ".google.api.resourceReference"?: (google.api.IResourceReference|null); } @@ -12167,4 +13528,111 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } } + + /** Namespace type. */ + namespace type { + + /** Properties of an Interval. */ + interface IInterval { + + /** Interval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IInterval); + + /** Interval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.type.IInterval): google.type.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @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.type.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interval + * @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.type.Interval; + + /** + * Verifies an Interval 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 Interval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interval + */ + public static fromObject(object: { [k: string]: any }): google.type.Interval; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @param message Interval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } diff --git a/packages/google-cloud-datacatalog-lineage/protos/protos.js b/packages/google-cloud-datacatalog-lineage/protos/protos.js index 678f81d1aa79..a9c693fe4f1e 100644 --- a/packages/google-cloud-datacatalog-lineage/protos/protos.js +++ b/packages/google-cloud-datacatalog-lineage/protos/protos.js @@ -668,6 +668,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.datacatalog.lineage.v1.Lineage|searchLineageStreaming}. + * @memberof google.cloud.datacatalog.lineage.v1.Lineage + * @typedef SearchLineageStreamingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse} [response] SearchLineageStreamingResponse + */ + + /** + * Calls SearchLineageStreaming. + * @function searchLineageStreaming + * @memberof google.cloud.datacatalog.lineage.v1.Lineage + * @instance + * @param {google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest} request SearchLineageStreamingRequest message or plain object + * @param {google.cloud.datacatalog.lineage.v1.Lineage.SearchLineageStreamingCallback} callback Node-style callback called with the error, if any, and SearchLineageStreamingResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Lineage.prototype.searchLineageStreaming = function searchLineageStreaming(request, callback) { + return this.rpcCall(searchLineageStreaming, $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest, $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse, request, callback); + }, "name", { value: "SearchLineageStreaming" }); + + /** + * Calls SearchLineageStreaming. + * @function searchLineageStreaming + * @memberof google.cloud.datacatalog.lineage.v1.Lineage + * @instance + * @param {google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest} request SearchLineageStreamingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Lineage; })(); @@ -1737,6 +1770,7 @@ * @interface IEventLink * @property {google.cloud.datacatalog.lineage.v1.IEntityReference|null} [source] EventLink source * @property {google.cloud.datacatalog.lineage.v1.IEntityReference|null} [target] EventLink target + * @property {google.cloud.datacatalog.lineage.v1.IDependencyInfo|null} [dependencyInfo] EventLink dependencyInfo */ /** @@ -1770,6 +1804,14 @@ */ EventLink.prototype.target = null; + /** + * EventLink dependencyInfo. + * @member {google.cloud.datacatalog.lineage.v1.IDependencyInfo|null|undefined} dependencyInfo + * @memberof google.cloud.datacatalog.lineage.v1.EventLink + * @instance + */ + EventLink.prototype.dependencyInfo = null; + /** * Creates a new EventLink instance using the specified properties. * @function create @@ -1798,6 +1840,8 @@ $root.google.cloud.datacatalog.lineage.v1.EntityReference.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.target != null && Object.hasOwnProperty.call(message, "target")) $root.google.cloud.datacatalog.lineage.v1.EntityReference.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dependencyInfo != null && Object.hasOwnProperty.call(message, "dependencyInfo")) + $root.google.cloud.datacatalog.lineage.v1.DependencyInfo.encode(message.dependencyInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -1842,6 +1886,10 @@ message.target = $root.google.cloud.datacatalog.lineage.v1.EntityReference.decode(reader, reader.uint32()); break; } + case 3: { + message.dependencyInfo = $root.google.cloud.datacatalog.lineage.v1.DependencyInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1887,6 +1935,11 @@ if (error) return "target." + error; } + if (message.dependencyInfo != null && message.hasOwnProperty("dependencyInfo")) { + var error = $root.google.cloud.datacatalog.lineage.v1.DependencyInfo.verify(message.dependencyInfo); + if (error) + return "dependencyInfo." + error; + } return null; }; @@ -1912,6 +1965,11 @@ throw TypeError(".google.cloud.datacatalog.lineage.v1.EventLink.target: object expected"); message.target = $root.google.cloud.datacatalog.lineage.v1.EntityReference.fromObject(object.target); } + if (object.dependencyInfo != null) { + if (typeof object.dependencyInfo !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.EventLink.dependencyInfo: object expected"); + message.dependencyInfo = $root.google.cloud.datacatalog.lineage.v1.DependencyInfo.fromObject(object.dependencyInfo); + } return message; }; @@ -1931,11 +1989,14 @@ if (options.defaults) { object.source = null; object.target = null; + object.dependencyInfo = null; } if (message.source != null && message.hasOwnProperty("source")) object.source = $root.google.cloud.datacatalog.lineage.v1.EntityReference.toObject(message.source, options); if (message.target != null && message.hasOwnProperty("target")) object.target = $root.google.cloud.datacatalog.lineage.v1.EntityReference.toObject(message.target, options); + if (message.dependencyInfo != null && message.hasOwnProperty("dependencyInfo")) + object.dependencyInfo = $root.google.cloud.datacatalog.lineage.v1.DependencyInfo.toObject(message.dependencyInfo, options); return object; }; @@ -1968,6 +2029,235 @@ return EventLink; })(); + v1.DependencyInfo = (function() { + + /** + * Properties of a DependencyInfo. + * @memberof google.cloud.datacatalog.lineage.v1 + * @interface IDependencyInfo + * @property {google.cloud.datacatalog.lineage.v1.DependencyType|null} [dependencyType] DependencyInfo dependencyType + */ + + /** + * Constructs a new DependencyInfo. + * @memberof google.cloud.datacatalog.lineage.v1 + * @classdesc Represents a DependencyInfo. + * @implements IDependencyInfo + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.IDependencyInfo=} [properties] Properties to set + */ + function DependencyInfo(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]]; + } + + /** + * DependencyInfo dependencyType. + * @member {google.cloud.datacatalog.lineage.v1.DependencyType} dependencyType + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @instance + */ + DependencyInfo.prototype.dependencyType = 0; + + /** + * Creates a new DependencyInfo instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.IDependencyInfo=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.DependencyInfo} DependencyInfo instance + */ + DependencyInfo.create = function create(properties) { + return new DependencyInfo(properties); + }; + + /** + * Encodes the specified DependencyInfo message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.DependencyInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.IDependencyInfo} message DependencyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyType != null && Object.hasOwnProperty.call(message, "dependencyType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dependencyType); + return writer; + }; + + /** + * Encodes the specified DependencyInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.DependencyInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.IDependencyInfo} message DependencyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.DependencyInfo} DependencyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyInfo.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.datacatalog.lineage.v1.DependencyInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dependencyType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.DependencyInfo} DependencyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DependencyInfo message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DependencyInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyType != null && message.hasOwnProperty("dependencyType")) + switch (message.dependencyType) { + default: + return "dependencyType: enum value expected"; + case 0: + case 1: + case 3: + break; + } + return null; + }; + + /** + * Creates a DependencyInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.DependencyInfo} DependencyInfo + */ + DependencyInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.DependencyInfo) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.DependencyInfo(); + switch (object.dependencyType) { + default: + if (typeof object.dependencyType === "number") { + message.dependencyType = object.dependencyType; + break; + } + break; + case "DEPENDENCY_TYPE_UNSPECIFIED": + case 0: + message.dependencyType = 0; + break; + case "EXACT_COPY": + case 1: + message.dependencyType = 1; + break; + case "OTHER": + case 3: + message.dependencyType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DependencyInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.DependencyInfo} message DependencyInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DependencyInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dependencyType = options.enums === String ? "DEPENDENCY_TYPE_UNSPECIFIED" : 0; + if (message.dependencyType != null && message.hasOwnProperty("dependencyType")) + object.dependencyType = options.enums === String ? $root.google.cloud.datacatalog.lineage.v1.DependencyType[message.dependencyType] === undefined ? message.dependencyType : $root.google.cloud.datacatalog.lineage.v1.DependencyType[message.dependencyType] : message.dependencyType; + return object; + }; + + /** + * Converts this DependencyInfo to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @instance + * @returns {Object.} JSON object + */ + DependencyInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DependencyInfo + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.DependencyInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DependencyInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.DependencyInfo"; + }; + + return DependencyInfo; + })(); + v1.EntityReference = (function() { /** @@ -1975,6 +2265,7 @@ * @memberof google.cloud.datacatalog.lineage.v1 * @interface IEntityReference * @property {string|null} [fullyQualifiedName] EntityReference fullyQualifiedName + * @property {Array.|null} [field] EntityReference field */ /** @@ -1986,6 +2277,7 @@ * @param {google.cloud.datacatalog.lineage.v1.IEntityReference=} [properties] Properties to set */ function EntityReference(properties) { + this.field = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2000,6 +2292,14 @@ */ EntityReference.prototype.fullyQualifiedName = ""; + /** + * EntityReference field. + * @member {Array.} field + * @memberof google.cloud.datacatalog.lineage.v1.EntityReference + * @instance + */ + EntityReference.prototype.field = $util.emptyArray; + /** * Creates a new EntityReference instance using the specified properties. * @function create @@ -2026,6 +2326,9 @@ writer = $Writer.create(); if (message.fullyQualifiedName != null && Object.hasOwnProperty.call(message, "fullyQualifiedName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.fullyQualifiedName); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.field[i]); return writer; }; @@ -2066,6 +2369,12 @@ message.fullyQualifiedName = reader.string(); break; } + case 3: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -2104,6 +2413,13 @@ if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) if (!$util.isString(message.fullyQualifiedName)) return "fullyQualifiedName: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) + if (!$util.isString(message.field[i])) + return "field: string[] expected"; + } return null; }; @@ -2121,6 +2437,13 @@ var message = new $root.google.cloud.datacatalog.lineage.v1.EntityReference(); if (object.fullyQualifiedName != null) message.fullyQualifiedName = String(object.fullyQualifiedName); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.cloud.datacatalog.lineage.v1.EntityReference.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) + message.field[i] = String(object.field[i]); + } return message; }; @@ -2137,10 +2460,17 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.field = []; if (options.defaults) object.fullyQualifiedName = ""; if (message.fullyQualifiedName != null && message.hasOwnProperty("fullyQualifiedName")) object.fullyQualifiedName = message.fullyQualifiedName; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = message.field[j]; + } return object; }; @@ -3390,6 +3720,7 @@ * @property {google.cloud.datacatalog.lineage.v1.IProcess|null} [process] UpdateProcessRequest process * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProcessRequest updateMask * @property {boolean|null} [allowMissing] UpdateProcessRequest allowMissing + * @property {string|null} [requestId] UpdateProcessRequest requestId */ /** @@ -3431,6 +3762,14 @@ */ UpdateProcessRequest.prototype.allowMissing = false; + /** + * UpdateProcessRequest requestId. + * @member {string} requestId + * @memberof google.cloud.datacatalog.lineage.v1.UpdateProcessRequest + * @instance + */ + UpdateProcessRequest.prototype.requestId = ""; + /** * Creates a new UpdateProcessRequest instance using the specified properties. * @function create @@ -3461,6 +3800,8 @@ $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; @@ -3509,6 +3850,10 @@ message.allowMissing = reader.bool(); break; } + case 4: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3557,6 +3902,9 @@ if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) if (typeof message.allowMissing !== "boolean") return "allowMissing: boolean expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; @@ -3584,6 +3932,8 @@ } if (object.allowMissing != null) message.allowMissing = Boolean(object.allowMissing); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; @@ -3604,6 +3954,7 @@ object.process = null; object.updateMask = null; object.allowMissing = false; + object.requestId = ""; } if (message.process != null && message.hasOwnProperty("process")) object.process = $root.google.cloud.datacatalog.lineage.v1.Process.toObject(message.process, options); @@ -3611,6 +3962,8 @@ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) object.allowMissing = message.allowMissing; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; @@ -7236,6 +7589,8 @@ * @property {string|null} [parent] SearchLinksRequest parent * @property {google.cloud.datacatalog.lineage.v1.IEntityReference|null} [source] SearchLinksRequest source * @property {google.cloud.datacatalog.lineage.v1.IEntityReference|null} [target] SearchLinksRequest target + * @property {google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null} [sources] SearchLinksRequest sources + * @property {google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null} [targets] SearchLinksRequest targets * @property {number|null} [pageSize] SearchLinksRequest pageSize * @property {string|null} [pageToken] SearchLinksRequest pageToken */ @@ -7279,6 +7634,22 @@ */ SearchLinksRequest.prototype.target = null; + /** + * SearchLinksRequest sources. + * @member {google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null|undefined} sources + * @memberof google.cloud.datacatalog.lineage.v1.SearchLinksRequest + * @instance + */ + SearchLinksRequest.prototype.sources = null; + + /** + * SearchLinksRequest targets. + * @member {google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null|undefined} targets + * @memberof google.cloud.datacatalog.lineage.v1.SearchLinksRequest + * @instance + */ + SearchLinksRequest.prototype.targets = null; + /** * SearchLinksRequest pageSize. * @member {number} pageSize @@ -7300,12 +7671,12 @@ /** * SearchLinksRequest criteria. - * @member {"source"|"target"|undefined} criteria + * @member {"source"|"target"|"sources"|"targets"|undefined} criteria * @memberof google.cloud.datacatalog.lineage.v1.SearchLinksRequest * @instance */ Object.defineProperty(SearchLinksRequest.prototype, "criteria", { - get: $util.oneOfGetter($oneOfFields = ["source", "target"]), + get: $util.oneOfGetter($oneOfFields = ["source", "target", "sources", "targets"]), set: $util.oneOfSetter($oneOfFields) }); @@ -7343,6 +7714,10 @@ $root.google.cloud.datacatalog.lineage.v1.EntityReference.encode(message.source, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.target != null && Object.hasOwnProperty.call(message, "target")) $root.google.cloud.datacatalog.lineage.v1.EntityReference.encode(message.target, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.sources != null && Object.hasOwnProperty.call(message, "sources")) + $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.encode(message.sources, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.targets != null && Object.hasOwnProperty.call(message, "targets")) + $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.encode(message.targets, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -7391,6 +7766,14 @@ message.target = $root.google.cloud.datacatalog.lineage.v1.EntityReference.decode(reader, reader.uint32()); break; } + case 6: { + message.sources = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.decode(reader, reader.uint32()); + break; + } + case 7: { + message.targets = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.decode(reader, reader.uint32()); + break; + } case 2: { message.pageSize = reader.int32(); break; @@ -7456,6 +7839,26 @@ return "target." + error; } } + if (message.sources != null && message.hasOwnProperty("sources")) { + if (properties.criteria === 1) + return "criteria: multiple values"; + properties.criteria = 1; + { + var error = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.verify(message.sources); + if (error) + return "sources." + error; + } + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (properties.criteria === 1) + return "criteria: multiple values"; + properties.criteria = 1; + { + var error = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.verify(message.targets); + if (error) + return "targets." + error; + } + } if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -7489,6 +7892,16 @@ throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLinksRequest.target: object expected"); message.target = $root.google.cloud.datacatalog.lineage.v1.EntityReference.fromObject(object.target); } + if (object.sources != null) { + if (typeof object.sources !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLinksRequest.sources: object expected"); + message.sources = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.fromObject(object.sources); + } + if (object.targets != null) { + if (typeof object.targets !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLinksRequest.targets: object expected"); + message.targets = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.fromObject(object.targets); + } if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -7530,6 +7943,16 @@ if (options.oneofs) object.criteria = "target"; } + if (message.sources != null && message.hasOwnProperty("sources")) { + object.sources = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.toObject(message.sources, options); + if (options.oneofs) + object.criteria = "sources"; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + object.targets = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.toObject(message.targets, options); + if (options.oneofs) + object.criteria = "targets"; + } return object; }; @@ -7562,13 +7985,239 @@ return SearchLinksRequest; })(); - v1.SearchLinksResponse = (function() { + v1.MultipleEntityReference = (function() { /** - * Properties of a SearchLinksResponse. + * Properties of a MultipleEntityReference. * @memberof google.cloud.datacatalog.lineage.v1 - * @interface ISearchLinksResponse - * @property {Array.|null} [links] SearchLinksResponse links + * @interface IMultipleEntityReference + * @property {Array.|null} [entities] MultipleEntityReference entities + */ + + /** + * Constructs a new MultipleEntityReference. + * @memberof google.cloud.datacatalog.lineage.v1 + * @classdesc Represents a MultipleEntityReference. + * @implements IMultipleEntityReference + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.IMultipleEntityReference=} [properties] Properties to set + */ + function MultipleEntityReference(properties) { + this.entities = []; + 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]]; + } + + /** + * MultipleEntityReference entities. + * @member {Array.} entities + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @instance + */ + MultipleEntityReference.prototype.entities = $util.emptyArray; + + /** + * Creates a new MultipleEntityReference instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @static + * @param {google.cloud.datacatalog.lineage.v1.IMultipleEntityReference=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} MultipleEntityReference instance + */ + MultipleEntityReference.create = function create(properties) { + return new MultipleEntityReference(properties); + }; + + /** + * Encodes the specified MultipleEntityReference message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.MultipleEntityReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @static + * @param {google.cloud.datacatalog.lineage.v1.IMultipleEntityReference} message MultipleEntityReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultipleEntityReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.datacatalog.lineage.v1.EntityReference.encode(message.entities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MultipleEntityReference message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.MultipleEntityReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @static + * @param {google.cloud.datacatalog.lineage.v1.IMultipleEntityReference} message MultipleEntityReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultipleEntityReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MultipleEntityReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} MultipleEntityReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultipleEntityReference.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.datacatalog.lineage.v1.MultipleEntityReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.datacatalog.lineage.v1.EntityReference.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MultipleEntityReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} MultipleEntityReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultipleEntityReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MultipleEntityReference message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MultipleEntityReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.datacatalog.lineage.v1.EntityReference.verify(message.entities[i]); + if (error) + return "entities." + error; + } + } + return null; + }; + + /** + * Creates a MultipleEntityReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} MultipleEntityReference + */ + MultipleEntityReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.datacatalog.lineage.v1.MultipleEntityReference.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.MultipleEntityReference.entities: object expected"); + message.entities[i] = $root.google.cloud.datacatalog.lineage.v1.EntityReference.fromObject(object.entities[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MultipleEntityReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @static + * @param {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} message MultipleEntityReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MultipleEntityReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entities = []; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.datacatalog.lineage.v1.EntityReference.toObject(message.entities[j], options); + } + return object; + }; + + /** + * Converts this MultipleEntityReference to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @instance + * @returns {Object.} JSON object + */ + MultipleEntityReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MultipleEntityReference + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.MultipleEntityReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MultipleEntityReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.MultipleEntityReference"; + }; + + return MultipleEntityReference; + })(); + + v1.SearchLinksResponse = (function() { + + /** + * Properties of a SearchLinksResponse. + * @memberof google.cloud.datacatalog.lineage.v1 + * @interface ISearchLinksResponse + * @property {Array.|null} [links] SearchLinksResponse links * @property {string|null} [nextPageToken] SearchLinksResponse nextPageToken */ @@ -7823,6 +8472,7 @@ * @property {google.cloud.datacatalog.lineage.v1.IEntityReference|null} [target] Link target * @property {google.protobuf.ITimestamp|null} [startTime] Link startTime * @property {google.protobuf.ITimestamp|null} [endTime] Link endTime + * @property {Array.|null} [dependencyInfo] Link dependencyInfo */ /** @@ -7834,6 +8484,7 @@ * @param {google.cloud.datacatalog.lineage.v1.ILink=} [properties] Properties to set */ function Link(properties) { + this.dependencyInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7880,6 +8531,14 @@ */ Link.prototype.endTime = null; + /** + * Link dependencyInfo. + * @member {Array.} dependencyInfo + * @memberof google.cloud.datacatalog.lineage.v1.Link + * @instance + */ + Link.prototype.dependencyInfo = $util.emptyArray; + /** * Creates a new Link instance using the specified properties. * @function create @@ -7914,6 +8573,9 @@ $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dependencyInfo != null && message.dependencyInfo.length) + for (var i = 0; i < message.dependencyInfo.length; ++i) + $root.google.cloud.datacatalog.lineage.v1.Link.DependencyInfo.encode(message.dependencyInfo[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -7970,6 +8632,12 @@ message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 6: { + if (!(message.dependencyInfo && message.dependencyInfo.length)) + message.dependencyInfo = []; + message.dependencyInfo.push($root.google.cloud.datacatalog.lineage.v1.Link.DependencyInfo.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -8028,6 +8696,15 @@ if (error) return "endTime." + error; } + if (message.dependencyInfo != null && message.hasOwnProperty("dependencyInfo")) { + if (!Array.isArray(message.dependencyInfo)) + return "dependencyInfo: array expected"; + for (var i = 0; i < message.dependencyInfo.length; ++i) { + var error = $root.google.cloud.datacatalog.lineage.v1.Link.DependencyInfo.verify(message.dependencyInfo[i]); + if (error) + return "dependencyInfo." + error; + } + } return null; }; @@ -8065,6 +8742,16 @@ throw TypeError(".google.cloud.datacatalog.lineage.v1.Link.endTime: object expected"); message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } + if (object.dependencyInfo) { + if (!Array.isArray(object.dependencyInfo)) + throw TypeError(".google.cloud.datacatalog.lineage.v1.Link.dependencyInfo: array expected"); + message.dependencyInfo = []; + for (var i = 0; i < object.dependencyInfo.length; ++i) { + if (typeof object.dependencyInfo[i] !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.Link.dependencyInfo: object expected"); + message.dependencyInfo[i] = $root.google.cloud.datacatalog.lineage.v1.Link.DependencyInfo.fromObject(object.dependencyInfo[i]); + } + } return message; }; @@ -8081,6 +8768,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.dependencyInfo = []; if (options.defaults) { object.name = ""; object.source = null; @@ -8098,6 +8787,11 @@ object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); if (message.endTime != null && message.hasOwnProperty("endTime")) object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.dependencyInfo && message.dependencyInfo.length) { + object.dependencyInfo = []; + for (var j = 0; j < message.dependencyInfo.length; ++j) + object.dependencyInfo[j] = $root.google.cloud.datacatalog.lineage.v1.Link.DependencyInfo.toObject(message.dependencyInfo[j], options); + } return object; }; @@ -8127,6 +8821,235 @@ return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.Link"; }; + Link.DependencyInfo = (function() { + + /** + * Properties of a DependencyInfo. + * @memberof google.cloud.datacatalog.lineage.v1.Link + * @interface IDependencyInfo + * @property {google.cloud.datacatalog.lineage.v1.DependencyType|null} [dependencyType] DependencyInfo dependencyType + */ + + /** + * Constructs a new DependencyInfo. + * @memberof google.cloud.datacatalog.lineage.v1.Link + * @classdesc Represents a DependencyInfo. + * @implements IDependencyInfo + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.Link.IDependencyInfo=} [properties] Properties to set + */ + function DependencyInfo(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]]; + } + + /** + * DependencyInfo dependencyType. + * @member {google.cloud.datacatalog.lineage.v1.DependencyType} dependencyType + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @instance + */ + DependencyInfo.prototype.dependencyType = 0; + + /** + * Creates a new DependencyInfo instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.Link.IDependencyInfo=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.Link.DependencyInfo} DependencyInfo instance + */ + DependencyInfo.create = function create(properties) { + return new DependencyInfo(properties); + }; + + /** + * Encodes the specified DependencyInfo message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.Link.DependencyInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.Link.IDependencyInfo} message DependencyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyType != null && Object.hasOwnProperty.call(message, "dependencyType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dependencyType); + return writer; + }; + + /** + * Encodes the specified DependencyInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.Link.DependencyInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.Link.IDependencyInfo} message DependencyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.Link.DependencyInfo} DependencyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyInfo.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.datacatalog.lineage.v1.Link.DependencyInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dependencyType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.Link.DependencyInfo} DependencyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DependencyInfo message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DependencyInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyType != null && message.hasOwnProperty("dependencyType")) + switch (message.dependencyType) { + default: + return "dependencyType: enum value expected"; + case 0: + case 1: + case 3: + break; + } + return null; + }; + + /** + * Creates a DependencyInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.Link.DependencyInfo} DependencyInfo + */ + DependencyInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.Link.DependencyInfo) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.Link.DependencyInfo(); + switch (object.dependencyType) { + default: + if (typeof object.dependencyType === "number") { + message.dependencyType = object.dependencyType; + break; + } + break; + case "DEPENDENCY_TYPE_UNSPECIFIED": + case 0: + message.dependencyType = 0; + break; + case "EXACT_COPY": + case 1: + message.dependencyType = 1; + break; + case "OTHER": + case 3: + message.dependencyType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DependencyInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.Link.DependencyInfo} message DependencyInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DependencyInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dependencyType = options.enums === String ? "DEPENDENCY_TYPE_UNSPECIFIED" : 0; + if (message.dependencyType != null && message.hasOwnProperty("dependencyType")) + object.dependencyType = options.enums === String ? $root.google.cloud.datacatalog.lineage.v1.DependencyType[message.dependencyType] === undefined ? message.dependencyType : $root.google.cloud.datacatalog.lineage.v1.DependencyType[message.dependencyType] : message.dependencyType; + return object; + }; + + /** + * Converts this DependencyInfo to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @instance + * @returns {Object.} JSON object + */ + DependencyInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DependencyInfo + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.Link.DependencyInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DependencyInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.Link.DependencyInfo"; + }; + + return DependencyInfo; + })(); + return Link; })(); @@ -9343,6 +10266,9 @@ case 4: case 5: case 6: + case 7: + case 8: + case 9: break; } if (message.name != null && message.hasOwnProperty("name")) @@ -9398,6 +10324,18 @@ case 6: message.sourceType = 6; break; + case "VERTEX_AI": + case 7: + message.sourceType = 7; + break; + case "DATAFLOW": + case 8: + message.sourceType = 8; + break; + case "LOOKER_CORE": + case 9: + message.sourceType = 9; + break; } if (object.name != null) message.name = String(object.name); @@ -9421,64 +10359,2379 @@ object.sourceType = options.enums === String ? "SOURCE_TYPE_UNSPECIFIED" : 0; object.name = ""; } - if (message.sourceType != null && message.hasOwnProperty("sourceType")) - object.sourceType = options.enums === String ? $root.google.cloud.datacatalog.lineage.v1.Origin.SourceType[message.sourceType] === undefined ? message.sourceType : $root.google.cloud.datacatalog.lineage.v1.Origin.SourceType[message.sourceType] : message.sourceType; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + object.sourceType = options.enums === String ? $root.google.cloud.datacatalog.lineage.v1.Origin.SourceType[message.sourceType] === undefined ? message.sourceType : $root.google.cloud.datacatalog.lineage.v1.Origin.SourceType[message.sourceType] : message.sourceType; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Origin to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.Origin + * @instance + * @returns {Object.} JSON object + */ + Origin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Origin + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.Origin + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Origin.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.Origin"; + }; + + /** + * SourceType enum. + * @name google.cloud.datacatalog.lineage.v1.Origin.SourceType + * @enum {number} + * @property {number} SOURCE_TYPE_UNSPECIFIED=0 SOURCE_TYPE_UNSPECIFIED value + * @property {number} CUSTOM=1 CUSTOM value + * @property {number} BIGQUERY=2 BIGQUERY value + * @property {number} DATA_FUSION=3 DATA_FUSION value + * @property {number} COMPOSER=4 COMPOSER value + * @property {number} LOOKER_STUDIO=5 LOOKER_STUDIO value + * @property {number} DATAPROC=6 DATAPROC value + * @property {number} VERTEX_AI=7 VERTEX_AI value + * @property {number} DATAFLOW=8 DATAFLOW value + * @property {number} LOOKER_CORE=9 LOOKER_CORE value + */ + Origin.SourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CUSTOM"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + values[valuesById[3] = "DATA_FUSION"] = 3; + values[valuesById[4] = "COMPOSER"] = 4; + values[valuesById[5] = "LOOKER_STUDIO"] = 5; + values[valuesById[6] = "DATAPROC"] = 6; + values[valuesById[7] = "VERTEX_AI"] = 7; + values[valuesById[8] = "DATAFLOW"] = 8; + values[valuesById[9] = "LOOKER_CORE"] = 9; + return values; + })(); + + return Origin; + })(); + + v1.LineageLink = (function() { + + /** + * Properties of a LineageLink. + * @memberof google.cloud.datacatalog.lineage.v1 + * @interface ILineageLink + * @property {google.cloud.datacatalog.lineage.v1.IEntityReference|null} [source] LineageLink source + * @property {google.cloud.datacatalog.lineage.v1.IEntityReference|null} [target] LineageLink target + * @property {Array.|null} [processes] LineageLink processes + * @property {Array.|null} [dependencyInfo] LineageLink dependencyInfo + * @property {number|null} [depth] LineageLink depth + * @property {string|null} [location] LineageLink location + */ + + /** + * Constructs a new LineageLink. + * @memberof google.cloud.datacatalog.lineage.v1 + * @classdesc Represents a LineageLink. + * @implements ILineageLink + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.ILineageLink=} [properties] Properties to set + */ + function LineageLink(properties) { + this.processes = []; + this.dependencyInfo = []; + 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]]; + } + + /** + * LineageLink source. + * @member {google.cloud.datacatalog.lineage.v1.IEntityReference|null|undefined} source + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @instance + */ + LineageLink.prototype.source = null; + + /** + * LineageLink target. + * @member {google.cloud.datacatalog.lineage.v1.IEntityReference|null|undefined} target + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @instance + */ + LineageLink.prototype.target = null; + + /** + * LineageLink processes. + * @member {Array.} processes + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @instance + */ + LineageLink.prototype.processes = $util.emptyArray; + + /** + * LineageLink dependencyInfo. + * @member {Array.} dependencyInfo + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @instance + */ + LineageLink.prototype.dependencyInfo = $util.emptyArray; + + /** + * LineageLink depth. + * @member {number} depth + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @instance + */ + LineageLink.prototype.depth = 0; + + /** + * LineageLink location. + * @member {string} location + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @instance + */ + LineageLink.prototype.location = ""; + + /** + * Creates a new LineageLink instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @static + * @param {google.cloud.datacatalog.lineage.v1.ILineageLink=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink} LineageLink instance + */ + LineageLink.create = function create(properties) { + return new LineageLink(properties); + }; + + /** + * Encodes the specified LineageLink message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @static + * @param {google.cloud.datacatalog.lineage.v1.ILineageLink} message LineageLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LineageLink.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.datacatalog.lineage.v1.EntityReference.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.datacatalog.lineage.v1.EntityReference.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.processes != null && message.processes.length) + for (var i = 0; i < message.processes.length; ++i) + $root.google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess.encode(message.processes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dependencyInfo != null && message.dependencyInfo.length) + for (var i = 0; i < message.dependencyInfo.length; ++i) + $root.google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo.encode(message.dependencyInfo[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.depth != null && Object.hasOwnProperty.call(message, "depth")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.depth); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.location); + return writer; + }; + + /** + * Encodes the specified LineageLink message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @static + * @param {google.cloud.datacatalog.lineage.v1.ILineageLink} message LineageLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LineageLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LineageLink message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink} LineageLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LineageLink.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.datacatalog.lineage.v1.LineageLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.source = $root.google.cloud.datacatalog.lineage.v1.EntityReference.decode(reader, reader.uint32()); + break; + } + case 2: { + message.target = $root.google.cloud.datacatalog.lineage.v1.EntityReference.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.processes && message.processes.length)) + message.processes = []; + message.processes.push($root.google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dependencyInfo && message.dependencyInfo.length)) + message.dependencyInfo = []; + message.dependencyInfo.push($root.google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo.decode(reader, reader.uint32())); + break; + } + case 5: { + message.depth = reader.int32(); + break; + } + case 7: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LineageLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink} LineageLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LineageLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LineageLink message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LineageLink.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.datacatalog.lineage.v1.EntityReference.verify(message.source); + if (error) + return "source." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.datacatalog.lineage.v1.EntityReference.verify(message.target); + if (error) + return "target." + error; + } + if (message.processes != null && message.hasOwnProperty("processes")) { + if (!Array.isArray(message.processes)) + return "processes: array expected"; + for (var i = 0; i < message.processes.length; ++i) { + var error = $root.google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess.verify(message.processes[i]); + if (error) + return "processes." + error; + } + } + if (message.dependencyInfo != null && message.hasOwnProperty("dependencyInfo")) { + if (!Array.isArray(message.dependencyInfo)) + return "dependencyInfo: array expected"; + for (var i = 0; i < message.dependencyInfo.length; ++i) { + var error = $root.google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo.verify(message.dependencyInfo[i]); + if (error) + return "dependencyInfo." + error; + } + } + if (message.depth != null && message.hasOwnProperty("depth")) + if (!$util.isInteger(message.depth)) + return "depth: integer expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates a LineageLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink} LineageLink + */ + LineageLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.LineageLink) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.LineageLink(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.LineageLink.source: object expected"); + message.source = $root.google.cloud.datacatalog.lineage.v1.EntityReference.fromObject(object.source); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.LineageLink.target: object expected"); + message.target = $root.google.cloud.datacatalog.lineage.v1.EntityReference.fromObject(object.target); + } + if (object.processes) { + if (!Array.isArray(object.processes)) + throw TypeError(".google.cloud.datacatalog.lineage.v1.LineageLink.processes: array expected"); + message.processes = []; + for (var i = 0; i < object.processes.length; ++i) { + if (typeof object.processes[i] !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.LineageLink.processes: object expected"); + message.processes[i] = $root.google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess.fromObject(object.processes[i]); + } + } + if (object.dependencyInfo) { + if (!Array.isArray(object.dependencyInfo)) + throw TypeError(".google.cloud.datacatalog.lineage.v1.LineageLink.dependencyInfo: array expected"); + message.dependencyInfo = []; + for (var i = 0; i < object.dependencyInfo.length; ++i) { + if (typeof object.dependencyInfo[i] !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.LineageLink.dependencyInfo: object expected"); + message.dependencyInfo[i] = $root.google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo.fromObject(object.dependencyInfo[i]); + } + } + if (object.depth != null) + message.depth = object.depth | 0; + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from a LineageLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @static + * @param {google.cloud.datacatalog.lineage.v1.LineageLink} message LineageLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LineageLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.processes = []; + object.dependencyInfo = []; + } + if (options.defaults) { + object.source = null; + object.target = null; + object.depth = 0; + object.location = ""; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.datacatalog.lineage.v1.EntityReference.toObject(message.source, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.datacatalog.lineage.v1.EntityReference.toObject(message.target, options); + if (message.processes && message.processes.length) { + object.processes = []; + for (var j = 0; j < message.processes.length; ++j) + object.processes[j] = $root.google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess.toObject(message.processes[j], options); + } + if (message.dependencyInfo && message.dependencyInfo.length) { + object.dependencyInfo = []; + for (var j = 0; j < message.dependencyInfo.length; ++j) + object.dependencyInfo[j] = $root.google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo.toObject(message.dependencyInfo[j], options); + } + if (message.depth != null && message.hasOwnProperty("depth")) + object.depth = message.depth; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this LineageLink to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @instance + * @returns {Object.} JSON object + */ + LineageLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LineageLink + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LineageLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.LineageLink"; + }; + + LineageLink.LineageProcess = (function() { + + /** + * Properties of a LineageProcess. + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @interface ILineageProcess + * @property {google.cloud.datacatalog.lineage.v1.IProcess|null} [process] LineageProcess process + */ + + /** + * Constructs a new LineageProcess. + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @classdesc Represents a LineageProcess. + * @implements ILineageProcess + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.LineageLink.ILineageProcess=} [properties] Properties to set + */ + function LineageProcess(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]]; + } + + /** + * LineageProcess process. + * @member {google.cloud.datacatalog.lineage.v1.IProcess|null|undefined} process + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @instance + */ + LineageProcess.prototype.process = null; + + /** + * Creates a new LineageProcess instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @static + * @param {google.cloud.datacatalog.lineage.v1.LineageLink.ILineageProcess=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess} LineageProcess instance + */ + LineageProcess.create = function create(properties) { + return new LineageProcess(properties); + }; + + /** + * Encodes the specified LineageProcess message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @static + * @param {google.cloud.datacatalog.lineage.v1.LineageLink.ILineageProcess} message LineageProcess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LineageProcess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.process != null && Object.hasOwnProperty.call(message, "process")) + $root.google.cloud.datacatalog.lineage.v1.Process.encode(message.process, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LineageProcess message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @static + * @param {google.cloud.datacatalog.lineage.v1.LineageLink.ILineageProcess} message LineageProcess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LineageProcess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LineageProcess message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess} LineageProcess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LineageProcess.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.datacatalog.lineage.v1.LineageLink.LineageProcess(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.process = $root.google.cloud.datacatalog.lineage.v1.Process.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LineageProcess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess} LineageProcess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LineageProcess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LineageProcess message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LineageProcess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.process != null && message.hasOwnProperty("process")) { + var error = $root.google.cloud.datacatalog.lineage.v1.Process.verify(message.process); + if (error) + return "process." + error; + } + return null; + }; + + /** + * Creates a LineageProcess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess} LineageProcess + */ + LineageProcess.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess(); + if (object.process != null) { + if (typeof object.process !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess.process: object expected"); + message.process = $root.google.cloud.datacatalog.lineage.v1.Process.fromObject(object.process); + } + return message; + }; + + /** + * Creates a plain object from a LineageProcess message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @static + * @param {google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess} message LineageProcess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LineageProcess.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.process = null; + if (message.process != null && message.hasOwnProperty("process")) + object.process = $root.google.cloud.datacatalog.lineage.v1.Process.toObject(message.process, options); + return object; + }; + + /** + * Converts this LineageProcess to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @instance + * @returns {Object.} JSON object + */ + LineageProcess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LineageProcess + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LineageProcess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.LineageLink.LineageProcess"; + }; + + return LineageProcess; + })(); + + LineageLink.DependencyInfo = (function() { + + /** + * Properties of a DependencyInfo. + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @interface IDependencyInfo + * @property {google.cloud.datacatalog.lineage.v1.DependencyType|null} [dependencyType] DependencyInfo dependencyType + */ + + /** + * Constructs a new DependencyInfo. + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink + * @classdesc Represents a DependencyInfo. + * @implements IDependencyInfo + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.LineageLink.IDependencyInfo=} [properties] Properties to set + */ + function DependencyInfo(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]]; + } + + /** + * DependencyInfo dependencyType. + * @member {google.cloud.datacatalog.lineage.v1.DependencyType} dependencyType + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @instance + */ + DependencyInfo.prototype.dependencyType = 0; + + /** + * Creates a new DependencyInfo instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.LineageLink.IDependencyInfo=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo} DependencyInfo instance + */ + DependencyInfo.create = function create(properties) { + return new DependencyInfo(properties); + }; + + /** + * Encodes the specified DependencyInfo message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.LineageLink.IDependencyInfo} message DependencyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyType != null && Object.hasOwnProperty.call(message, "dependencyType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dependencyType); + return writer; + }; + + /** + * Encodes the specified DependencyInfo message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.LineageLink.IDependencyInfo} message DependencyInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DependencyInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo} DependencyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyInfo.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.datacatalog.lineage.v1.LineageLink.DependencyInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dependencyType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DependencyInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo} DependencyInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DependencyInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DependencyInfo message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DependencyInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyType != null && message.hasOwnProperty("dependencyType")) + switch (message.dependencyType) { + default: + return "dependencyType: enum value expected"; + case 0: + case 1: + case 3: + break; + } + return null; + }; + + /** + * Creates a DependencyInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo} DependencyInfo + */ + DependencyInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo(); + switch (object.dependencyType) { + default: + if (typeof object.dependencyType === "number") { + message.dependencyType = object.dependencyType; + break; + } + break; + case "DEPENDENCY_TYPE_UNSPECIFIED": + case 0: + message.dependencyType = 0; + break; + case "EXACT_COPY": + case 1: + message.dependencyType = 1; + break; + case "OTHER": + case 3: + message.dependencyType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DependencyInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @static + * @param {google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo} message DependencyInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DependencyInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dependencyType = options.enums === String ? "DEPENDENCY_TYPE_UNSPECIFIED" : 0; + if (message.dependencyType != null && message.hasOwnProperty("dependencyType")) + object.dependencyType = options.enums === String ? $root.google.cloud.datacatalog.lineage.v1.DependencyType[message.dependencyType] === undefined ? message.dependencyType : $root.google.cloud.datacatalog.lineage.v1.DependencyType[message.dependencyType] : message.dependencyType; + return object; + }; + + /** + * Converts this DependencyInfo to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @instance + * @returns {Object.} JSON object + */ + DependencyInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DependencyInfo + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DependencyInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.LineageLink.DependencyInfo"; + }; + + return DependencyInfo; + })(); + + return LineageLink; + })(); + + v1.SearchLineageStreamingRequest = (function() { + + /** + * Properties of a SearchLineageStreamingRequest. + * @memberof google.cloud.datacatalog.lineage.v1 + * @interface ISearchLineageStreamingRequest + * @property {string|null} [parent] SearchLineageStreamingRequest parent + * @property {Array.|null} [locations] SearchLineageStreamingRequest locations + * @property {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria|null} [rootCriteria] SearchLineageStreamingRequest rootCriteria + * @property {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection|null} [direction] SearchLineageStreamingRequest direction + * @property {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters|null} [filters] SearchLineageStreamingRequest filters + * @property {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits|null} [limits] SearchLineageStreamingRequest limits + */ + + /** + * Constructs a new SearchLineageStreamingRequest. + * @memberof google.cloud.datacatalog.lineage.v1 + * @classdesc Represents a SearchLineageStreamingRequest. + * @implements ISearchLineageStreamingRequest + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest=} [properties] Properties to set + */ + function SearchLineageStreamingRequest(properties) { + this.locations = []; + 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]]; + } + + /** + * SearchLineageStreamingRequest parent. + * @member {string} parent + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @instance + */ + SearchLineageStreamingRequest.prototype.parent = ""; + + /** + * SearchLineageStreamingRequest locations. + * @member {Array.} locations + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @instance + */ + SearchLineageStreamingRequest.prototype.locations = $util.emptyArray; + + /** + * SearchLineageStreamingRequest rootCriteria. + * @member {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria|null|undefined} rootCriteria + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @instance + */ + SearchLineageStreamingRequest.prototype.rootCriteria = null; + + /** + * SearchLineageStreamingRequest direction. + * @member {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection} direction + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @instance + */ + SearchLineageStreamingRequest.prototype.direction = 0; + + /** + * SearchLineageStreamingRequest filters. + * @member {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters|null|undefined} filters + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @instance + */ + SearchLineageStreamingRequest.prototype.filters = null; + + /** + * SearchLineageStreamingRequest limits. + * @member {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits|null|undefined} limits + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @instance + */ + SearchLineageStreamingRequest.prototype.limits = null; + + /** + * Creates a new SearchLineageStreamingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @static + * @param {google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest} SearchLineageStreamingRequest instance + */ + SearchLineageStreamingRequest.create = function create(properties) { + return new SearchLineageStreamingRequest(properties); + }; + + /** + * Encodes the specified SearchLineageStreamingRequest message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @static + * @param {google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest} message SearchLineageStreamingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchLineageStreamingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.locations[i]); + if (message.rootCriteria != null && Object.hasOwnProperty.call(message, "rootCriteria")) + $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria.encode(message.rootCriteria, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.direction); + if (message.filters != null && Object.hasOwnProperty.call(message, "filters")) + $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.encode(message.filters, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.limits != null && Object.hasOwnProperty.call(message, "limits")) + $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits.encode(message.limits, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchLineageStreamingRequest message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @static + * @param {google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest} message SearchLineageStreamingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchLineageStreamingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchLineageStreamingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest} SearchLineageStreamingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchLineageStreamingRequest.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.datacatalog.lineage.v1.SearchLineageStreamingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + case 3: { + message.rootCriteria = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria.decode(reader, reader.uint32()); + break; + } + case 4: { + message.direction = reader.int32(); + break; + } + case 5: { + message.filters = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.decode(reader, reader.uint32()); + break; + } + case 6: { + message.limits = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchLineageStreamingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest} SearchLineageStreamingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchLineageStreamingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchLineageStreamingRequest message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchLineageStreamingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + if (message.rootCriteria != null && message.hasOwnProperty("rootCriteria")) { + var error = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria.verify(message.rootCriteria); + if (error) + return "rootCriteria." + error; + } + if (message.direction != null && message.hasOwnProperty("direction")) + switch (message.direction) { + default: + return "direction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.filters != null && message.hasOwnProperty("filters")) { + var error = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.verify(message.filters); + if (error) + return "filters." + error; + } + if (message.limits != null && message.hasOwnProperty("limits")) { + var error = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits.verify(message.limits); + if (error) + return "limits." + error; + } + return null; + }; + + /** + * Creates a SearchLineageStreamingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest} SearchLineageStreamingRequest + */ + SearchLineageStreamingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + if (object.rootCriteria != null) { + if (typeof object.rootCriteria !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.rootCriteria: object expected"); + message.rootCriteria = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria.fromObject(object.rootCriteria); + } + switch (object.direction) { + default: + if (typeof object.direction === "number") { + message.direction = object.direction; + break; + } + break; + case "SEARCH_DIRECTION_UNSPECIFIED": + case 0: + message.direction = 0; + break; + case "DOWNSTREAM": + case 1: + message.direction = 1; + break; + case "UPSTREAM": + case 2: + message.direction = 2; + break; + } + if (object.filters != null) { + if (typeof object.filters !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.filters: object expected"); + message.filters = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.fromObject(object.filters); + } + if (object.limits != null) { + if (typeof object.limits !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.limits: object expected"); + message.limits = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits.fromObject(object.limits); + } + return message; + }; + + /** + * Creates a plain object from a SearchLineageStreamingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest} message SearchLineageStreamingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchLineageStreamingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.locations = []; + if (options.defaults) { + object.parent = ""; + object.rootCriteria = null; + object.direction = options.enums === String ? "SEARCH_DIRECTION_UNSPECIFIED" : 0; + object.filters = null; + object.limits = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + if (message.rootCriteria != null && message.hasOwnProperty("rootCriteria")) + object.rootCriteria = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria.toObject(message.rootCriteria, options); + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = options.enums === String ? $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection[message.direction] === undefined ? message.direction : $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection[message.direction] : message.direction; + if (message.filters != null && message.hasOwnProperty("filters")) + object.filters = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.toObject(message.filters, options); + if (message.limits != null && message.hasOwnProperty("limits")) + object.limits = $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits.toObject(message.limits, options); + return object; + }; + + /** + * Converts this SearchLineageStreamingRequest to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @instance + * @returns {Object.} JSON object + */ + SearchLineageStreamingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchLineageStreamingRequest + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchLineageStreamingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest"; + }; + + /** + * SearchDirection enum. + * @name google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection + * @enum {number} + * @property {number} SEARCH_DIRECTION_UNSPECIFIED=0 SEARCH_DIRECTION_UNSPECIFIED value + * @property {number} DOWNSTREAM=1 DOWNSTREAM value + * @property {number} UPSTREAM=2 UPSTREAM value + */ + SearchLineageStreamingRequest.SearchDirection = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEARCH_DIRECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DOWNSTREAM"] = 1; + values[valuesById[2] = "UPSTREAM"] = 2; + return values; + })(); + + /** + * EntitySet enum. + * @name google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.EntitySet + * @enum {number} + * @property {number} ENTITY_SET_UNSPECIFIED=0 ENTITY_SET_UNSPECIFIED value + * @property {number} ENTITIES=1 ENTITIES value + */ + SearchLineageStreamingRequest.EntitySet = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_SET_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENTITIES"] = 1; + return values; + })(); + + SearchLineageStreamingRequest.SearchFilters = (function() { + + /** + * Properties of a SearchFilters. + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @interface ISearchFilters + * @property {Array.|null} [dependencyTypes] SearchFilters dependencyTypes + * @property {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.EntitySet|null} [entitySet] SearchFilters entitySet + * @property {google.type.IInterval|null} [timeRange] SearchFilters timeRange + */ + + /** + * Constructs a new SearchFilters. + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @classdesc Represents a SearchFilters. + * @implements ISearchFilters + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters=} [properties] Properties to set + */ + function SearchFilters(properties) { + this.dependencyTypes = []; + 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]]; + } + + /** + * SearchFilters dependencyTypes. + * @member {Array.} dependencyTypes + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @instance + */ + SearchFilters.prototype.dependencyTypes = $util.emptyArray; + + /** + * SearchFilters entitySet. + * @member {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.EntitySet} entitySet + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @instance + */ + SearchFilters.prototype.entitySet = 0; + + /** + * SearchFilters timeRange. + * @member {google.type.IInterval|null|undefined} timeRange + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @instance + */ + SearchFilters.prototype.timeRange = null; + + /** + * Creates a new SearchFilters instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters} SearchFilters instance + */ + SearchFilters.create = function create(properties) { + return new SearchFilters(properties); + }; + + /** + * Encodes the specified SearchFilters message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters} message SearchFilters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchFilters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dependencyTypes != null && message.dependencyTypes.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.dependencyTypes.length; ++i) + writer.int32(message.dependencyTypes[i]); + writer.ldelim(); + } + if (message.entitySet != null && Object.hasOwnProperty.call(message, "entitySet")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.entitySet); + if (message.timeRange != null && Object.hasOwnProperty.call(message, "timeRange")) + $root.google.type.Interval.encode(message.timeRange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchFilters message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchFilters} message SearchFilters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchFilters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchFilters message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters} SearchFilters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchFilters.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.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dependencyTypes && message.dependencyTypes.length)) + message.dependencyTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.dependencyTypes.push(reader.int32()); + } else + message.dependencyTypes.push(reader.int32()); + break; + } + case 2: { + message.entitySet = reader.int32(); + break; + } + case 3: { + message.timeRange = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchFilters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters} SearchFilters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchFilters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchFilters message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchFilters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dependencyTypes != null && message.hasOwnProperty("dependencyTypes")) { + if (!Array.isArray(message.dependencyTypes)) + return "dependencyTypes: array expected"; + for (var i = 0; i < message.dependencyTypes.length; ++i) + switch (message.dependencyTypes[i]) { + default: + return "dependencyTypes: enum value[] expected"; + case 0: + case 1: + case 3: + break; + } + } + if (message.entitySet != null && message.hasOwnProperty("entitySet")) + switch (message.entitySet) { + default: + return "entitySet: enum value expected"; + case 0: + case 1: + break; + } + if (message.timeRange != null && message.hasOwnProperty("timeRange")) { + var error = $root.google.type.Interval.verify(message.timeRange); + if (error) + return "timeRange." + error; + } + return null; + }; + + /** + * Creates a SearchFilters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters} SearchFilters + */ + SearchFilters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters(); + if (object.dependencyTypes) { + if (!Array.isArray(object.dependencyTypes)) + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.dependencyTypes: array expected"); + message.dependencyTypes = []; + for (var i = 0; i < object.dependencyTypes.length; ++i) + switch (object.dependencyTypes[i]) { + default: + if (typeof object.dependencyTypes[i] === "number") { + message.dependencyTypes[i] = object.dependencyTypes[i]; + break; + } + case "DEPENDENCY_TYPE_UNSPECIFIED": + case 0: + message.dependencyTypes[i] = 0; + break; + case "EXACT_COPY": + case 1: + message.dependencyTypes[i] = 1; + break; + case "OTHER": + case 3: + message.dependencyTypes[i] = 3; + break; + } + } + switch (object.entitySet) { + default: + if (typeof object.entitySet === "number") { + message.entitySet = object.entitySet; + break; + } + break; + case "ENTITY_SET_UNSPECIFIED": + case 0: + message.entitySet = 0; + break; + case "ENTITIES": + case 1: + message.entitySet = 1; + break; + } + if (object.timeRange != null) { + if (typeof object.timeRange !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters.timeRange: object expected"); + message.timeRange = $root.google.type.Interval.fromObject(object.timeRange); + } + return message; + }; + + /** + * Creates a plain object from a SearchFilters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters} message SearchFilters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchFilters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dependencyTypes = []; + if (options.defaults) { + object.entitySet = options.enums === String ? "ENTITY_SET_UNSPECIFIED" : 0; + object.timeRange = null; + } + if (message.dependencyTypes && message.dependencyTypes.length) { + object.dependencyTypes = []; + for (var j = 0; j < message.dependencyTypes.length; ++j) + object.dependencyTypes[j] = options.enums === String ? $root.google.cloud.datacatalog.lineage.v1.DependencyType[message.dependencyTypes[j]] === undefined ? message.dependencyTypes[j] : $root.google.cloud.datacatalog.lineage.v1.DependencyType[message.dependencyTypes[j]] : message.dependencyTypes[j]; + } + if (message.entitySet != null && message.hasOwnProperty("entitySet")) + object.entitySet = options.enums === String ? $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.EntitySet[message.entitySet] === undefined ? message.entitySet : $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.EntitySet[message.entitySet] : message.entitySet; + if (message.timeRange != null && message.hasOwnProperty("timeRange")) + object.timeRange = $root.google.type.Interval.toObject(message.timeRange, options); + return object; + }; + + /** + * Converts this SearchFilters to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @instance + * @returns {Object.} JSON object + */ + SearchFilters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchFilters + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchFilters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters"; + }; + + return SearchFilters; + })(); + + SearchLineageStreamingRequest.SearchLimits = (function() { + + /** + * Properties of a SearchLimits. + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @interface ISearchLimits + * @property {number|null} [maxDepth] SearchLimits maxDepth + * @property {number|null} [maxResults] SearchLimits maxResults + * @property {number|null} [maxProcessPerLink] SearchLimits maxProcessPerLink + */ + + /** + * Constructs a new SearchLimits. + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @classdesc Represents a SearchLimits. + * @implements ISearchLimits + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits=} [properties] Properties to set + */ + function SearchLimits(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]]; + } + + /** + * SearchLimits maxDepth. + * @member {number} maxDepth + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @instance + */ + SearchLimits.prototype.maxDepth = 0; + + /** + * SearchLimits maxResults. + * @member {number} maxResults + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @instance + */ + SearchLimits.prototype.maxResults = 0; + + /** + * SearchLimits maxProcessPerLink. + * @member {number} maxProcessPerLink + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @instance + */ + SearchLimits.prototype.maxProcessPerLink = 0; + + /** + * Creates a new SearchLimits instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits} SearchLimits instance + */ + SearchLimits.create = function create(properties) { + return new SearchLimits(properties); + }; + + /** + * Encodes the specified SearchLimits message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits} message SearchLimits message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchLimits.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxDepth != null && Object.hasOwnProperty.call(message, "maxDepth")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxDepth); + if (message.maxResults != null && Object.hasOwnProperty.call(message, "maxResults")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxResults); + if (message.maxProcessPerLink != null && Object.hasOwnProperty.call(message, "maxProcessPerLink")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxProcessPerLink); + return writer; + }; + + /** + * Encodes the specified SearchLimits message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.ISearchLimits} message SearchLimits message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchLimits.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchLimits message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits} SearchLimits + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchLimits.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.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.maxDepth = reader.int32(); + break; + } + case 2: { + message.maxResults = reader.int32(); + break; + } + case 3: { + message.maxProcessPerLink = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchLimits message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits} SearchLimits + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchLimits.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchLimits message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchLimits.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxDepth != null && message.hasOwnProperty("maxDepth")) + if (!$util.isInteger(message.maxDepth)) + return "maxDepth: integer expected"; + if (message.maxResults != null && message.hasOwnProperty("maxResults")) + if (!$util.isInteger(message.maxResults)) + return "maxResults: integer expected"; + if (message.maxProcessPerLink != null && message.hasOwnProperty("maxProcessPerLink")) + if (!$util.isInteger(message.maxProcessPerLink)) + return "maxProcessPerLink: integer expected"; + return null; + }; + + /** + * Creates a SearchLimits message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits} SearchLimits + */ + SearchLimits.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits(); + if (object.maxDepth != null) + message.maxDepth = object.maxDepth | 0; + if (object.maxResults != null) + message.maxResults = object.maxResults | 0; + if (object.maxProcessPerLink != null) + message.maxProcessPerLink = object.maxProcessPerLink | 0; + return message; + }; + + /** + * Creates a plain object from a SearchLimits message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits} message SearchLimits + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchLimits.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.maxDepth = 0; + object.maxResults = 0; + object.maxProcessPerLink = 0; + } + if (message.maxDepth != null && message.hasOwnProperty("maxDepth")) + object.maxDepth = message.maxDepth; + if (message.maxResults != null && message.hasOwnProperty("maxResults")) + object.maxResults = message.maxResults; + if (message.maxProcessPerLink != null && message.hasOwnProperty("maxProcessPerLink")) + object.maxProcessPerLink = message.maxProcessPerLink; + return object; + }; + + /** + * Converts this SearchLimits to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @instance + * @returns {Object.} JSON object + */ + SearchLimits.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchLimits + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchLimits.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits"; + }; + + return SearchLimits; + })(); + + SearchLineageStreamingRequest.RootCriteria = (function() { + + /** + * Properties of a RootCriteria. + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @interface IRootCriteria + * @property {google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null} [entities] RootCriteria entities + */ + + /** + * Constructs a new RootCriteria. + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest + * @classdesc Represents a RootCriteria. + * @implements IRootCriteria + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria=} [properties] Properties to set + */ + function RootCriteria(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]]; + } + + /** + * RootCriteria entities. + * @member {google.cloud.datacatalog.lineage.v1.IMultipleEntityReference|null|undefined} entities + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @instance + */ + RootCriteria.prototype.entities = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RootCriteria criteria. + * @member {"entities"|undefined} criteria + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @instance + */ + Object.defineProperty(RootCriteria.prototype, "criteria", { + get: $util.oneOfGetter($oneOfFields = ["entities"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RootCriteria instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria} RootCriteria instance + */ + RootCriteria.create = function create(properties) { + return new RootCriteria(properties); + }; + + /** + * Encodes the specified RootCriteria message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria} message RootCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RootCriteria.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entities != null && Object.hasOwnProperty.call(message, "entities")) + $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.encode(message.entities, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RootCriteria message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.IRootCriteria} message RootCriteria message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RootCriteria.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RootCriteria message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria} RootCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RootCriteria.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.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.entities = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RootCriteria message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria} RootCriteria + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RootCriteria.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RootCriteria message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RootCriteria.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.entities != null && message.hasOwnProperty("entities")) { + properties.criteria = 1; + { + var error = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.verify(message.entities); + if (error) + return "entities." + error; + } + } + return null; + }; + + /** + * Creates a RootCriteria message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria} RootCriteria + */ + RootCriteria.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria(); + if (object.entities != null) { + if (typeof object.entities !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria.entities: object expected"); + message.entities = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.fromObject(object.entities); + } + return message; + }; + + /** + * Creates a plain object from a RootCriteria message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria} message RootCriteria + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RootCriteria.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.entities != null && message.hasOwnProperty("entities")) { + object.entities = $root.google.cloud.datacatalog.lineage.v1.MultipleEntityReference.toObject(message.entities, options); + if (options.oneofs) + object.criteria = "entities"; + } + return object; + }; + + /** + * Converts this RootCriteria to JSON. + * @function toJSON + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @instance + * @returns {Object.} JSON object + */ + RootCriteria.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RootCriteria + * @function getTypeUrl + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RootCriteria.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria"; + }; + + return RootCriteria; + })(); + + return SearchLineageStreamingRequest; + })(); + + v1.SearchLineageStreamingResponse = (function() { + + /** + * Properties of a SearchLineageStreamingResponse. + * @memberof google.cloud.datacatalog.lineage.v1 + * @interface ISearchLineageStreamingResponse + * @property {Array.|null} [links] SearchLineageStreamingResponse links + * @property {Array.|null} [unreachable] SearchLineageStreamingResponse unreachable + */ + + /** + * Constructs a new SearchLineageStreamingResponse. + * @memberof google.cloud.datacatalog.lineage.v1 + * @classdesc Represents a SearchLineageStreamingResponse. + * @implements ISearchLineageStreamingResponse + * @constructor + * @param {google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingResponse=} [properties] Properties to set + */ + function SearchLineageStreamingResponse(properties) { + this.links = []; + this.unreachable = []; + 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]]; + } + + /** + * SearchLineageStreamingResponse links. + * @member {Array.} links + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse + * @instance + */ + SearchLineageStreamingResponse.prototype.links = $util.emptyArray; + + /** + * SearchLineageStreamingResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse + * @instance + */ + SearchLineageStreamingResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new SearchLineageStreamingResponse instance using the specified properties. + * @function create + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse + * @static + * @param {google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingResponse=} [properties] Properties to set + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse} SearchLineageStreamingResponse instance + */ + SearchLineageStreamingResponse.create = function create(properties) { + return new SearchLineageStreamingResponse(properties); + }; + + /** + * Encodes the specified SearchLineageStreamingResponse message. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse + * @static + * @param {google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingResponse} message SearchLineageStreamingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchLineageStreamingResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.links != null && message.links.length) + for (var i = 0; i < message.links.length; ++i) + $root.google.cloud.datacatalog.lineage.v1.LineageLink.encode(message.links[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified SearchLineageStreamingResponse message, length delimited. Does not implicitly {@link google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse + * @static + * @param {google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingResponse} message SearchLineageStreamingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchLineageStreamingResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchLineageStreamingResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse} SearchLineageStreamingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchLineageStreamingResponse.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.datacatalog.lineage.v1.SearchLineageStreamingResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.links && message.links.length)) + message.links = []; + message.links.push($root.google.cloud.datacatalog.lineage.v1.LineageLink.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchLineageStreamingResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse} SearchLineageStreamingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchLineageStreamingResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchLineageStreamingResponse message. + * @function verify + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchLineageStreamingResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.links != null && message.hasOwnProperty("links")) { + if (!Array.isArray(message.links)) + return "links: array expected"; + for (var i = 0; i < message.links.length; ++i) { + var error = $root.google.cloud.datacatalog.lineage.v1.LineageLink.verify(message.links[i]); + if (error) + return "links." + error; + } + } + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a SearchLineageStreamingResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse} SearchLineageStreamingResponse + */ + SearchLineageStreamingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse) + return object; + var message = new $root.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse(); + if (object.links) { + if (!Array.isArray(object.links)) + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse.links: array expected"); + message.links = []; + for (var i = 0; i < object.links.length; ++i) { + if (typeof object.links[i] !== "object") + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse.links: object expected"); + message.links[i] = $root.google.cloud.datacatalog.lineage.v1.LineageLink.fromObject(object.links[i]); + } + } + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a SearchLineageStreamingResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse + * @static + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse} message SearchLineageStreamingResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchLineageStreamingResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.links = []; + object.unreachable = []; + } + if (message.links && message.links.length) { + object.links = []; + for (var j = 0; j < message.links.length; ++j) + object.links[j] = $root.google.cloud.datacatalog.lineage.v1.LineageLink.toObject(message.links[j], options); + } + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } return object; }; /** - * Converts this Origin to JSON. + * Converts this SearchLineageStreamingResponse to JSON. * @function toJSON - * @memberof google.cloud.datacatalog.lineage.v1.Origin + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse * @instance * @returns {Object.} JSON object */ - Origin.prototype.toJSON = function toJSON() { + SearchLineageStreamingResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Origin + * Gets the default type url for SearchLineageStreamingResponse * @function getTypeUrl - * @memberof google.cloud.datacatalog.lineage.v1.Origin + * @memberof google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Origin.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchLineageStreamingResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.Origin"; + return typeUrlPrefix + "/google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse"; }; - /** - * SourceType enum. - * @name google.cloud.datacatalog.lineage.v1.Origin.SourceType - * @enum {number} - * @property {number} SOURCE_TYPE_UNSPECIFIED=0 SOURCE_TYPE_UNSPECIFIED value - * @property {number} CUSTOM=1 CUSTOM value - * @property {number} BIGQUERY=2 BIGQUERY value - * @property {number} DATA_FUSION=3 DATA_FUSION value - * @property {number} COMPOSER=4 COMPOSER value - * @property {number} LOOKER_STUDIO=5 LOOKER_STUDIO value - * @property {number} DATAPROC=6 DATAPROC value - */ - Origin.SourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CUSTOM"] = 1; - values[valuesById[2] = "BIGQUERY"] = 2; - values[valuesById[3] = "DATA_FUSION"] = 3; - values[valuesById[4] = "COMPOSER"] = 4; - values[valuesById[5] = "LOOKER_STUDIO"] = 5; - values[valuesById[6] = "DATAPROC"] = 6; - return values; - })(); + return SearchLineageStreamingResponse; + })(); - return Origin; + /** + * DependencyType enum. + * @name google.cloud.datacatalog.lineage.v1.DependencyType + * @enum {number} + * @property {number} DEPENDENCY_TYPE_UNSPECIFIED=0 DEPENDENCY_TYPE_UNSPECIFIED value + * @property {number} EXACT_COPY=1 EXACT_COPY value + * @property {number} OTHER=3 OTHER value + */ + v1.DependencyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEPENDENCY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT_COPY"] = 1; + values[valuesById[3] = "OTHER"] = 3; + return values; })(); return v1; @@ -14407,74 +17660,333 @@ 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; - })(); + /** + * 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; + })(); + + /** + * 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.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(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]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.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.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; - /** - * 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; - })(); + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); - /** - * 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; + return FieldInfo; })(); api.ResourceDescriptor = (function() { @@ -21370,6 +24882,7 @@ * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ @@ -21504,6 +25017,14 @@ */ FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + /** * FieldOptions .google.api.resourceReference. * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference @@ -21570,6 +25091,8 @@ writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); return writer; }; @@ -21680,6 +25203,10 @@ message[".google.api.fieldBehavior"].push(reader.int32()); break; } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } case 1055: { message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; @@ -21826,6 +25353,11 @@ break; } } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); if (error) @@ -22045,6 +25577,11 @@ break; } } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } if (object[".google.api.resourceReference"] != null) { if (typeof object[".google.api.resourceReference"] !== "object") throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); @@ -22084,6 +25621,7 @@ object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; object[".google.api.resourceReference"] = null; + object[".google.api.fieldInfo"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; @@ -22127,6 +25665,8 @@ } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); return object; }; @@ -31722,6 +35262,257 @@ return rpc; })(); + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Interval = (function() { + + /** + * Properties of an Interval. + * @memberof google.type + * @interface IInterval + * @property {google.protobuf.ITimestamp|null} [startTime] Interval startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Interval endTime + */ + + /** + * Constructs a new Interval. + * @memberof google.type + * @classdesc Represents an Interval. + * @implements IInterval + * @constructor + * @param {google.type.IInterval=} [properties] Properties to set + */ + function Interval(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]]; + } + + /** + * Interval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.startTime = null; + + /** + * Interval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.endTime = null; + + /** + * Creates a new Interval instance using the specified properties. + * @function create + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval=} [properties] Properties to set + * @returns {google.type.Interval} Interval instance + */ + Interval.create = function create(properties) { + return new Interval(properties); + }; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @function encode + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @function decode + * @memberof google.type.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.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.type.Interval(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interval message. + * @function verify + * @memberof google.type.Interval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Interval + * @static + * @param {Object.} object Plain object + * @returns {google.type.Interval} Interval + */ + Interval.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Interval) + return object; + var message = new $root.google.type.Interval(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.type.Interval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.type.Interval.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Interval + * @static + * @param {google.type.Interval} message Interval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this Interval to JSON. + * @function toJSON + * @memberof google.type.Interval + * @instance + * @returns {Object.} JSON object + */ + Interval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Interval + * @function getTypeUrl + * @memberof google.type.Interval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Interval"; + }; + + return Interval; + })(); + + return type; + })(); + return google; })(); diff --git a/packages/google-cloud-datacatalog-lineage/protos/protos.json b/packages/google-cloud-datacatalog-lineage/protos/protos.json index 4f7ae1769a1f..cd83cd71d8f3 100644 --- a/packages/google-cloud-datacatalog-lineage/protos/protos.json +++ b/packages/google-cloud-datacatalog-lineage/protos/protos.json @@ -354,13 +354,32 @@ } } ] + }, + "SearchLineageStreaming": { + "requestType": "SearchLineageStreamingRequest", + "responseType": "SearchLineageStreamingResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}:searchLineageStreaming", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}:searchLineageStreaming", + "body": "*" + } + } + ] } } }, "Process": { "options": { "(google.api.resource).type": "datalineage.googleapis.com/Process", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/processes/{process}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/processes/{process}", + "(google.api.resource).plural": "processes", + "(google.api.resource).singular": "process" }, "fields": { "name": { @@ -397,7 +416,9 @@ "Run": { "options": { "(google.api.resource).type": "datalineage.googleapis.com/Run", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/processes/{process}/runs/{run}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/processes/{process}/runs/{run}", + "(google.api.resource).plural": "runs", + "(google.api.resource).singular": "run" }, "fields": { "name": { @@ -459,7 +480,9 @@ "LineageEvent": { "options": { "(google.api.resource).type": "datalineage.googleapis.com/LineageEvent", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}", + "(google.api.resource).plural": "lineageEvents", + "(google.api.resource).singular": "lineageEvent" }, "fields": { "name": { @@ -508,6 +531,24 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "dependencyInfo": { + "type": "DependencyInfo", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DependencyInfo": { + "fields": { + "dependencyType": { + "type": "DependencyType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -519,6 +560,14 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "field": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -604,7 +653,11 @@ }, "requestId": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -653,7 +706,11 @@ }, "requestId": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -668,11 +725,25 @@ }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "allowMissing": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -700,11 +771,17 @@ }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -733,7 +810,10 @@ }, "allowMissing": { "type": "bool", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -756,7 +836,11 @@ }, "requestId": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -771,11 +855,17 @@ }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "allowMissing": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -798,16 +888,22 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datalineage.googleapis.com/Run" + "(google.api.resource_reference).type": "datalineage.googleapis.com/Process" } }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -836,7 +932,10 @@ }, "allowMissing": { "type": "bool", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -859,7 +958,11 @@ }, "requestId": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -882,16 +985,22 @@ "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datalineage.googleapis.com/LineageEvent" + "(google.api.resource_reference).type": "datalineage.googleapis.com/Run" } }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -920,7 +1029,10 @@ }, "allowMissing": { "type": "bool", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -929,7 +1041,9 @@ "criteria": { "oneof": [ "source", - "target" + "target", + "sources", + "targets" ] } }, @@ -956,6 +1070,20 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "sources": { + "type": "MultipleEntityReference", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "targets": { + "type": "MultipleEntityReference", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "pageSize": { "type": "int32", "id": 2, @@ -972,6 +1100,18 @@ } } }, + "MultipleEntityReference": { + "fields": { + "entities": { + "rule": "repeated", + "type": "EntityReference", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "SearchLinksResponse": { "fields": { "links": { @@ -1009,6 +1149,24 @@ "endTime": { "type": "google.protobuf.Timestamp", "id": 5 + }, + "dependencyInfo": { + "rule": "repeated", + "type": "DependencyInfo", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DependencyInfo": { + "fields": { + "dependencyType": { + "type": "DependencyType", + "id": 1 + } + } } } }, @@ -1032,11 +1190,17 @@ }, "pageSize": { "type": "int32", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1105,10 +1269,220 @@ "DATA_FUSION": 3, "COMPOSER": 4, "LOOKER_STUDIO": 5, - "DATAPROC": 6 + "DATAPROC": 6, + "VERTEX_AI": 7, + "DATAFLOW": 8, + "LOOKER_CORE": 9 + } + } + } + }, + "LineageLink": { + "fields": { + "source": { + "type": "EntityReference", + "id": 1 + }, + "target": { + "type": "EntityReference", + "id": 2 + }, + "processes": { + "rule": "repeated", + "type": "LineageProcess", + "id": 3 + }, + "dependencyInfo": { + "rule": "repeated", + "type": "DependencyInfo", + "id": 4 + }, + "depth": { + "type": "int32", + "id": 5 + }, + "location": { + "type": "string", + "id": 7 + } + }, + "nested": { + "LineageProcess": { + "fields": { + "process": { + "type": "Process", + "id": 3 + } + } + }, + "DependencyInfo": { + "fields": { + "dependencyType": { + "type": "DependencyType", + "id": 1 + } } } } + }, + "SearchLineageStreamingRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datalineage.googleapis.com/Process" + } + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rootCriteria": { + "type": "RootCriteria", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "direction": { + "type": "SearchDirection", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "filters": { + "type": "SearchFilters", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "limits": { + "type": "SearchLimits", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SearchDirection": { + "values": { + "SEARCH_DIRECTION_UNSPECIFIED": 0, + "DOWNSTREAM": 1, + "UPSTREAM": 2 + } + }, + "EntitySet": { + "values": { + "ENTITY_SET_UNSPECIFIED": 0, + "ENTITIES": 1 + } + }, + "SearchFilters": { + "fields": { + "dependencyTypes": { + "rule": "repeated", + "type": "DependencyType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "entitySet": { + "type": "EntitySet", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "timeRange": { + "type": "google.type.Interval", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchLimits": { + "fields": { + "maxDepth": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxResults": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxProcessPerLink": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RootCriteria": { + "oneofs": { + "criteria": { + "oneof": [ + "entities" + ] + } + }, + "fields": { + "entities": { + "type": "MultipleEntityReference", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SearchLineageStreamingResponse": { + "fields": { + "links": { + "rule": "repeated", + "type": "LineageLink", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST" + } + } + } + }, + "DependencyType": { + "values": { + "DEPENDENCY_TYPE_UNSPECIFIED": 0, + "EXACT_COPY": 1, + "OTHER": 3 + } } } } @@ -1541,6 +1915,30 @@ "IDENTIFIER": 8 } }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } + }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -3288,6 +3686,30 @@ } } } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/interval;interval", + "java_multiple_files": true, + "java_outer_classname": "IntervalProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Interval": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + } + } } } } diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.batch_search_link_processes.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.batch_search_link_processes.js index 5d10ccec4d8d..b3262d377079 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.batch_search_link_processes.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.batch_search_link_processes.js @@ -41,13 +41,13 @@ function main(parent, links) { */ // const links = ['abc','def'] /** - * The maximum number of processes to return in a single page of the response. - * A page may contain fewer results than this value. + * Optional. The maximum number of processes to return in a single page of the + * response. A page may contain fewer results than this value. */ // const pageSize = 1234 /** - * The page token received from a previous `BatchSearchLinkProcesses` call. - * Use it to get the next page. + * Optional. The page token received from a previous + * `BatchSearchLinkProcesses` call. Use it to get the next page. * When requesting subsequent pages of a response, remember that * all parameters must match the values you provided * in the original request. diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_lineage_event.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_lineage_event.js index b8bd2bb62e3a..9587eca5b3ac 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_lineage_event.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_lineage_event.js @@ -37,9 +37,9 @@ function main(parent, lineageEvent) { */ // const lineageEvent = {} /** - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. This request is idempotent only if a - * `request_id` is provided. + * Optional. A unique identifier for this request. Restricted to 36 ASCII + * characters. A random UUID is recommended. This request is idempotent only + * if a `request_id` is provided. */ // const requestId = 'abc123' diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_process.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_process.js index 03dd00d57646..4c2ba1d6bf8e 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_process.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_process.js @@ -38,9 +38,9 @@ function main(parent, process) { */ // const process = {} /** - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. This request is idempotent only if a - * `request_id` is provided. + * Optional. A unique identifier for this request. Restricted to 36 ASCII + * characters. A random UUID is recommended. This request is idempotent only + * if a `request_id` is provided. */ // const requestId = 'abc123' diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_run.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_run.js index ceeb31e562fc..72e308c79e31 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_run.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.create_run.js @@ -37,9 +37,9 @@ function main(parent, run) { */ // const run = {} /** - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. This request is idempotent only if a - * `request_id` is provided. + * Optional. A unique identifier for this request. Restricted to 36 ASCII + * characters. A random UUID is recommended. This request is idempotent only + * if a `request_id` is provided. */ // const requestId = 'abc123' diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_lineage_event.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_lineage_event.js index 915dd14bc543..34795e7f476f 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_lineage_event.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_lineage_event.js @@ -33,7 +33,7 @@ function main(name) { */ // const name = 'abc123' /** - * If set to true and the lineage event is not found, the request + * Optional. If set to true and the lineage event is not found, the request * succeeds but the server doesn't perform any actions. */ // const allowMissing = true diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_process.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_process.js index 14f227a7ce0b..9d8268c1537b 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_process.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_process.js @@ -33,7 +33,7 @@ function main(name) { */ // const name = 'abc123' /** - * If set to true and the process is not found, the request + * Optional. If set to true and the process is not found, the request * succeeds but the server doesn't perform any actions. */ // const allowMissing = true diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_run.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_run.js index ca8a15fdc85d..f5273d111d13 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_run.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.delete_run.js @@ -33,7 +33,7 @@ function main(name) { */ // const name = 'abc123' /** - * If set to true and the run is not found, the request + * Optional. If set to true and the run is not found, the request * succeeds but the server doesn't perform any actions. */ // const allowMissing = true diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_lineage_events.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_lineage_events.js index 13e944e916ad..48fe3fd56b4a 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_lineage_events.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_lineage_events.js @@ -34,15 +34,15 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of lineage events to return. + * Optional. The maximum number of lineage events to return. * The service may return fewer events than this value. * If unspecified, at most 50 events are returned. The maximum value is 100; * values greater than 100 are cut to 100. */ // const pageSize = 1234 /** - * The page token received from a previous `ListLineageEvents` call. Specify - * it to get the next page. + * Optional. The page token received from a previous `ListLineageEvents` call. + * Specify it to get the next page. * When paginating, all other parameters specified in this call must * match the parameters of the call that provided the page token. */ diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_processes.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_processes.js index 8ce8924884a1..a998b31d40f7 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_processes.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_processes.js @@ -34,15 +34,15 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of processes to return. The service may return + * Optional. The maximum number of processes to return. The service may return * fewer than this value. If unspecified, at most 50 processes are * returned. The maximum value is 100; values greater than 100 are cut to * 100. */ // const pageSize = 1234 /** - * The page token received from a previous `ListProcesses` call. Specify - * it to get the next page. + * Optional. The page token received from a previous `ListProcesses` call. + * Specify it to get the next page. * When paginating, all other parameters specified in this call must * match the parameters of the call that provided the page token. */ diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_runs.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_runs.js index e9ad1fcd60e5..9ac69d683822 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_runs.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.list_runs.js @@ -33,14 +33,14 @@ function main(parent) { */ // const parent = 'abc123' /** - * The maximum number of runs to return. The service may return + * Optional. The maximum number of runs to return. The service may return * fewer than this value. If unspecified, at most 50 runs are * returned. The maximum value is 100; values greater than 100 are cut to * 100. */ // const pageSize = 1234 /** - * The page token received from a previous `ListRuns` call. Specify + * Optional. The page token received from a previous `ListRuns` call. Specify * it to get the next page. * When paginating, all other parameters specified in this call must * match the parameters of the call that provided the page token. diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.process_open_lineage_run_event.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.process_open_lineage_run_event.js index d53e50e30cf1..47b2d5ef839c 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.process_open_lineage_run_event.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.process_open_lineage_run_event.js @@ -39,9 +39,9 @@ function main(parent, openLineage) { */ // const openLineage = {} /** - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. This request is idempotent only if a - * `request_id` is provided. + * Optional. A unique identifier for this request. Restricted to 36 ASCII + * characters. A random UUID is recommended. This request is idempotent only + * if a `request_id` is provided. */ // const requestId = 'abc123' diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.search_lineage_streaming.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.search_lineage_streaming.js new file mode 100644 index 000000000000..9ce6275bcd50 --- /dev/null +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.search_lineage_streaming.js @@ -0,0 +1,86 @@ +// 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. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, locations, rootCriteria, direction) { + // [START datalineage_v1_generated_Lineage_SearchLineageStreaming_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location to initiate the search from. + */ + // const parent = 'abc123' + /** + * Required. The locations to search in. + */ + // const locations = ['abc','def'] + /** + * Required. Criteria for the root of the search. + */ + // const rootCriteria = {} + /** + * Required. Direction of the search. + */ + // const direction = {} + /** + * Optional. Filters for the search. + */ + // const filters = {} + /** + * Optional. Limits for the search. + */ + // const limits = {} + + // Imports the Lineage library + const {LineageClient} = require('@google-cloud/lineage').v1; + + // Instantiates a client + const lineageClient = new LineageClient(); + + async function callSearchLineageStreaming() { + // Construct request + const request = { + parent, + locations, + rootCriteria, + direction, + }; + + // Run request + const stream = await lineageClient.searchLineageStreaming(request); + stream.on('data', (response) => { console.log(response) }); + stream.on('error', (err) => { throw(err) }); + stream.on('end', () => { /* API call completed */ }); + } + + callSearchLineageStreaming(); + // [END datalineage_v1_generated_Lineage_SearchLineageStreaming_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.search_links.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.search_links.js index 7a2cc2ed5c9c..af26e4c30325 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.search_links.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.search_links.js @@ -42,6 +42,26 @@ function main(parent) { * links that lead from upstream assets to the specified asset. */ // const target = {} + /** + * Optional. Send a list of asset information in the **sources** field to + * retrieve all links that lead from the specified assets to downstream + * assets. This field is similar to the `source` + * source google.cloud.datacatalog.lineage.v1.SearchLinksRequest.source + * field but allows providing multiple entities. + * All entities within the `MultipleEntityReference` must have the same + * `fully_qualified_name`. + */ + // const sources = {} + /** + * Optional. Send a list of asset information in the **targets** field to + * retrieve all links that lead from upstream assets to the specified + * assets. This field is similar to the `target` + * target google.cloud.datacatalog.lineage.v1.SearchLinksRequest.target + * field but allows providing multiple entities. + * All entities within the `MultipleEntityReference` must have the same + * `fully_qualified_name`. + */ + // const targets = {} /** * Optional. The maximum number of links to return in a single page of the * response. A page may contain fewer links than this value. If unspecified, diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.update_process.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.update_process.js index 63f5cc2bc942..2cf94c0fd629 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.update_process.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.update_process.js @@ -34,14 +34,21 @@ function main(process) { */ // const process = {} /** - * The list of fields to update. Currently not used. The whole message is - * updated. + * Optional. The list of fields to update. Currently not used. The whole + * message is updated. */ // const updateMask = {} /** - * If set to true and the process is not found, the request inserts it. + * Optional. If set to true and the process is not found, the request inserts + * it. */ // const allowMissing = true + /** + * Optional. A unique identifier for this request. Restricted to 36 ASCII + * characters. A random UUID is recommended. This request is idempotent only + * if a `request_id` is provided. + */ + // const requestId = 'abc123' // Imports the Lineage library const {LineageClient} = require('@google-cloud/lineage').v1; diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.update_run.js b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.update_run.js index 601141d9b9c4..ed4692870605 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.update_run.js +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/lineage.update_run.js @@ -36,12 +36,12 @@ function main(run) { */ // const run = {} /** - * The list of fields to update. Currently not used. The whole message is - * updated. + * Optional. The list of fields to update. Currently not used. The whole + * message is updated. */ // const updateMask = {} /** - * If set to true and the run is not found, the request creates it. + * Optional. If set to true and the run is not found, the request creates it. */ // const allowMissing = true diff --git a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json index baae0f464ada..2d45c360c3e7 100644 --- a/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json +++ b/packages/google-cloud-datacatalog-lineage/samples/generated/v1/snippet_metadata_google.cloud.datacatalog.lineage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lineage", - "version": "2.1.1", + "version": "0.1.0", "language": "TYPESCRIPT", "apis": [ { @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 70, "type": "FULL" } ], @@ -138,6 +138,10 @@ { "name": "allow_missing", "type": "TYPE_BOOL" + }, + { + "name": "request_id", + "type": "TYPE_STRING" } ], "resultType": ".google.cloud.datacatalog.lineage.v1.Process", @@ -706,7 +710,7 @@ "segments": [ { "start": 25, - "end": 80, + "end": 100, "type": "FULL" } ], @@ -727,6 +731,14 @@ "name": "target", "type": ".google.cloud.datacatalog.lineage.v1.EntityReference" }, + { + "name": "sources", + "type": ".google.cloud.datacatalog.lineage.v1.MultipleEntityReference" + }, + { + "name": "targets", + "type": ".google.cloud.datacatalog.lineage.v1.MultipleEntityReference" + }, { "name": "page_size", "type": "TYPE_INT32" @@ -802,6 +814,66 @@ } } } + }, + { + "regionTag": "datalineage_v1_generated_Lineage_SearchLineageStreaming_async", + "title": "Lineage searchLineageStreaming Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a streaming response of lineage links connected to the requested assets by performing a breadth-first search in the given direction. Links represent the data flow between **source** (upstream) and **target** (downstream) assets in transformation pipelines. Links are stored in the same project as the Lineage Events that create them. This method retrieves links from all valid locations provided in the request. This method supports Column-Level Lineage (CLL) along with wildcard support to retrieve all CLL for an Entity FQN. Following permissions are required to retrieve links: * `datalineage.events.get` permission for the project where the link is stored for entity-level lineage. * `datalineage.events.getFields` permission for the project where the link is stored for column-level lineage. This method also returns processes that created the links if explicitly requested by setting [max_process_per_link](google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.limits.max_process_per_link) is non-zero and full process details are requested via `links.processes.process` in the [FieldMask](https://developers.google.com/workspace/docs/api/how-tos/field-masks#read_with_a_field_mask). Permission required to retrieve processes: * `datalineage.processes.get` permission for the project where the process is stored.", + "canonical": true, + "file": "lineage.search_lineage_streaming.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchLineageStreaming", + "fullName": "google.cloud.datacatalog.lineage.v1.Lineage.SearchLineageStreaming", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "locations", + "type": "TYPE_STRING[]" + }, + { + "name": "root_criteria", + "type": ".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria" + }, + { + "name": "direction", + "type": ".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection" + }, + { + "name": "filters", + "type": ".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters" + }, + { + "name": "limits", + "type": ".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits" + } + ], + "resultType": ".google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse", + "client": { + "shortName": "LineageClient", + "fullName": "google.cloud.datacatalog.lineage.v1.LineageClient" + }, + "method": { + "shortName": "SearchLineageStreaming", + "fullName": "google.cloud.datacatalog.lineage.v1.Lineage.SearchLineageStreaming", + "service": { + "shortName": "Lineage", + "fullName": "google.cloud.datacatalog.lineage.v1.Lineage" + } + } + } } ] } diff --git a/packages/google-cloud-datacatalog-lineage/src/index.ts b/packages/google-cloud-datacatalog-lineage/src/index.ts index 6f84c23dcf22..be5917efc2a7 100644 --- a/packages/google-cloud-datacatalog-lineage/src/index.ts +++ b/packages/google-cloud-datacatalog-lineage/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2026 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-datacatalog-lineage/src/v1/gapic_metadata.json b/packages/google-cloud-datacatalog-lineage/src/v1/gapic_metadata.json index 14dd7c9d9391..941d15d535c2 100644 --- a/packages/google-cloud-datacatalog-lineage/src/v1/gapic_metadata.json +++ b/packages/google-cloud-datacatalog-lineage/src/v1/gapic_metadata.json @@ -60,6 +60,11 @@ "deleteLineageEvent" ] }, + "SearchLineageStreaming": { + "methods": [ + "searchLineageStreaming" + ] + }, "DeleteProcess": { "methods": [ "deleteProcess" diff --git a/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client.ts b/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client.ts index f6446bdec63e..6c879e35c983 100644 --- a/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client.ts +++ b/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client.ts @@ -17,9 +17,9 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import type * as gax from 'google-gax'; +import * as gax from 'google-gax'; import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; +import {Transform, PassThrough} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; @@ -214,6 +214,12 @@ export class LineageClient { new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'processLinks') }; + // Some of the methods on this service provide streaming responses. + // Provide descriptors for these. + this.descriptors.stream = { + searchLineageStreaming: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries) + }; + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, @@ -290,11 +296,18 @@ export class LineageClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const lineageStubMethods = - ['processOpenLineageRunEvent', 'createProcess', 'updateProcess', 'getProcess', 'listProcesses', 'deleteProcess', 'createRun', 'updateRun', 'getRun', 'listRuns', 'deleteRun', 'createLineageEvent', 'getLineageEvent', 'listLineageEvents', 'deleteLineageEvent', 'searchLinks', 'batchSearchLinkProcesses']; + ['processOpenLineageRunEvent', 'createProcess', 'updateProcess', 'getProcess', 'listProcesses', 'deleteProcess', 'createRun', 'updateRun', 'getRun', 'listRuns', 'deleteRun', 'createLineageEvent', 'getLineageEvent', 'listLineageEvents', 'deleteLineageEvent', 'searchLinks', 'batchSearchLinkProcesses', 'searchLineageStreaming']; for (const methodName of lineageStubMethods) { const callPromise = this.lineageStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { + if (methodName in this.descriptors.stream) { + const stream = new PassThrough({objectMode: true}); + setImmediate(() => { + stream.emit('error', new this._gaxModule.GoogleError('The client has already been closed.')); + }); + return stream; + } return Promise.reject('The client has already been closed.'); } const func = stub[methodName]; @@ -306,6 +319,7 @@ export class LineageClient { const descriptor = this.descriptors.page[methodName] || + this.descriptors.stream[methodName] || this.descriptors.longrunning[methodName] || undefined; const apiCall = this._gaxModule.createApiCall( @@ -408,10 +422,10 @@ export class LineageClient { * @param {google.protobuf.Struct} request.openLineage * Required. OpenLineage message following OpenLineage format: * https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json - * @param {string} request.requestId - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. This request is idempotent only if a - * `request_id` is provided. + * @param {string} [request.requestId] + * Optional. A unique identifier for this request. Restricted to 36 ASCII + * characters. A random UUID is recommended. This request is idempotent only + * if a `request_id` is provided. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -455,7 +469,10 @@ export class LineageClient { protos.google.cloud.datacatalog.lineage.v1.IProcessOpenLineageRunEventResponse, protos.google.cloud.datacatalog.lineage.v1.IProcessOpenLineageRunEventRequest|undefined, {}|undefined ]>|void { - request = request || {}; + request = request || {}; + if (!request.requestId) { + request.requestId = gax.makeUUID(); + } let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; @@ -509,10 +526,10 @@ export class LineageClient { * process. * @param {google.cloud.datacatalog.lineage.v1.Process} request.process * Required. The process to create. - * @param {string} request.requestId - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. This request is idempotent only if a - * `request_id` is provided. + * @param {string} [request.requestId] + * Optional. A unique identifier for this request. Restricted to 36 ASCII + * characters. A random UUID is recommended. This request is idempotent only + * if a `request_id` is provided. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -556,7 +573,10 @@ export class LineageClient { protos.google.cloud.datacatalog.lineage.v1.IProcess, protos.google.cloud.datacatalog.lineage.v1.ICreateProcessRequest|undefined, {}|undefined ]>|void { - request = request || {}; + request = request || {}; + if (!request.requestId) { + request.requestId = gax.makeUUID(); + } let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; @@ -609,11 +629,16 @@ export class LineageClient { * Required. The lineage process to update. * * The process's `name` field is used to identify the process to update. - * @param {google.protobuf.FieldMask} request.updateMask - * The list of fields to update. Currently not used. The whole message is - * updated. - * @param {boolean} request.allowMissing - * If set to true and the process is not found, the request inserts it. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. Currently not used. The whole + * message is updated. + * @param {boolean} [request.allowMissing] + * Optional. If set to true and the process is not found, the request inserts + * it. + * @param {string} [request.requestId] + * Optional. A unique identifier for this request. Restricted to 36 ASCII + * characters. A random UUID is recommended. This request is idempotent only + * if a `request_id` is provided. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -657,7 +682,10 @@ export class LineageClient { protos.google.cloud.datacatalog.lineage.v1.IProcess, protos.google.cloud.datacatalog.lineage.v1.IUpdateProcessRequest|undefined, {}|undefined ]>|void { - request = request || {}; + request = request || {}; + if (!request.requestId) { + request.requestId = gax.makeUUID(); + } let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; @@ -804,10 +832,10 @@ export class LineageClient { * Required. The name of the process that should own the run. * @param {google.cloud.datacatalog.lineage.v1.Run} request.run * Required. The run to create. - * @param {string} request.requestId - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. This request is idempotent only if a - * `request_id` is provided. + * @param {string} [request.requestId] + * Optional. A unique identifier for this request. Restricted to 36 ASCII + * characters. A random UUID is recommended. This request is idempotent only + * if a `request_id` is provided. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -851,7 +879,10 @@ export class LineageClient { protos.google.cloud.datacatalog.lineage.v1.IRun, protos.google.cloud.datacatalog.lineage.v1.ICreateRunRequest|undefined, {}|undefined ]>|void { - request = request || {}; + request = request || {}; + if (!request.requestId) { + request.requestId = gax.makeUUID(); + } let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; @@ -907,11 +938,11 @@ export class LineageClient { * * Format: * `projects/{project}/locations/{location}/processes/{process}/runs/{run}`. - * @param {google.protobuf.FieldMask} request.updateMask - * The list of fields to update. Currently not used. The whole message is - * updated. - * @param {boolean} request.allowMissing - * If set to true and the run is not found, the request creates it. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to update. Currently not used. The whole + * message is updated. + * @param {boolean} [request.allowMissing] + * Optional. If set to true and the run is not found, the request creates it. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1102,10 +1133,10 @@ export class LineageClient { * Required. The name of the run that should own the lineage event. * @param {google.cloud.datacatalog.lineage.v1.LineageEvent} request.lineageEvent * Required. The lineage event to create. - * @param {string} request.requestId - * A unique identifier for this request. Restricted to 36 ASCII characters. - * A random UUID is recommended. This request is idempotent only if a - * `request_id` is provided. + * @param {string} [request.requestId] + * Optional. A unique identifier for this request. Restricted to 36 ASCII + * characters. A random UUID is recommended. This request is idempotent only + * if a `request_id` is provided. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1149,7 +1180,10 @@ export class LineageClient { protos.google.cloud.datacatalog.lineage.v1.ILineageEvent, protos.google.cloud.datacatalog.lineage.v1.ICreateLineageEventRequest|undefined, {}|undefined ]>|void { - request = request || {}; + request = request || {}; + if (!request.requestId) { + request.requestId = gax.makeUUID(); + } let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; @@ -1294,8 +1328,8 @@ export class LineageClient { * The request object that will be sent. * @param {string} request.name * Required. The name of the lineage event to delete. - * @param {boolean} request.allowMissing - * If set to true and the lineage event is not found, the request + * @param {boolean} [request.allowMissing] + * Optional. If set to true and the lineage event is not found, the request * succeeds but the server doesn't perform any actions. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1385,6 +1419,74 @@ export class LineageClient { }); } +/** + * Retrieves a streaming response of lineage links connected to the requested + * assets by performing a breadth-first search in the given direction. Links + * represent the data flow between **source** (upstream) and **target** + * (downstream) assets in transformation pipelines. Links are stored in the + * same project as the Lineage Events that create them. This method retrieves + * links from all valid locations provided in the request. This method + * supports Column-Level Lineage (CLL) along with wildcard support to retrieve + * all CLL for an Entity FQN. + * + * Following permissions are required to retrieve links: + * * `datalineage.events.get` permission for the project where the link is + * stored for entity-level lineage. + * * `datalineage.events.getFields` permission for the project where the link + * is stored for column-level lineage. + * + * This method also returns processes that created the links if explicitly + * requested by setting + * [max_process_per_link](google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.limits.max_process_per_link) + * is non-zero and full process details are requested via + * `links.processes.process` in the + * [FieldMask](https://developers.google.com/workspace/docs/api/how-tos/field-masks#read_with_a_field_mask). + * + * Permission required to retrieve processes: + * * `datalineage.processes.get` permission for the project where the process + * is stored. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location to initiate the search from. + * @param {string[]} request.locations + * Required. The locations to search in. + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.RootCriteria} request.rootCriteria + * Required. Criteria for the root of the search. + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchDirection} request.direction + * Required. Direction of the search. + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchFilters} [request.filters] + * Optional. Filters for the search. + * @param {google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.SearchLimits} [request.limits] + * Optional. Limits for the search. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits {@link protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse|SearchLineageStreamingResponse} on 'data' event. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#server-streaming | documentation } + * for more details and examples. + * @example include:samples/generated/v1/lineage.search_lineage_streaming.js + * region_tag:datalineage_v1_generated_Lineage_SearchLineageStreaming_async + */ + searchLineageStreaming( + request?: protos.google.cloud.datacatalog.lineage.v1.ISearchLineageStreamingRequest, + options?: CallOptions): + gax.CancellableStream{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('searchLineageStreaming stream %j', options); + return this.innerApiCalls.searchLineageStreaming(request, options); + } + /** * Deletes the process with the specified name. * @@ -1392,8 +1494,8 @@ export class LineageClient { * The request object that will be sent. * @param {string} request.name * Required. The name of the process to delete. - * @param {boolean} request.allowMissing - * If set to true and the process is not found, the request + * @param {boolean} [request.allowMissing] + * Optional. If set to true and the process is not found, the request * succeeds but the server doesn't perform any actions. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1502,8 +1604,8 @@ export class LineageClient { * The request object that will be sent. * @param {string} request.name * Required. The name of the run to delete. - * @param {boolean} request.allowMissing - * If set to true and the run is not found, the request + * @param {boolean} [request.allowMissing] + * Optional. If set to true and the run is not found, the request * succeeds but the server doesn't perform any actions. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1614,14 +1716,14 @@ export class LineageClient { * @param {string} request.parent * Required. The name of the project and its location that owns this * collection of processes. - * @param {number} request.pageSize - * The maximum number of processes to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of processes to return. The service may return * fewer than this value. If unspecified, at most 50 processes are * returned. The maximum value is 100; values greater than 100 are cut to * 100. - * @param {string} request.pageToken - * The page token received from a previous `ListProcesses` call. Specify - * it to get the next page. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListProcesses` call. + * Specify it to get the next page. * * When paginating, all other parameters specified in this call must * match the parameters of the call that provided the page token. @@ -1720,14 +1822,14 @@ export class LineageClient { * @param {string} request.parent * Required. The name of the project and its location that owns this * collection of processes. - * @param {number} request.pageSize - * The maximum number of processes to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of processes to return. The service may return * fewer than this value. If unspecified, at most 50 processes are * returned. The maximum value is 100; values greater than 100 are cut to * 100. - * @param {string} request.pageToken - * The page token received from a previous `ListProcesses` call. Specify - * it to get the next page. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListProcesses` call. + * Specify it to get the next page. * * When paginating, all other parameters specified in this call must * match the parameters of the call that provided the page token. @@ -1775,14 +1877,14 @@ export class LineageClient { * @param {string} request.parent * Required. The name of the project and its location that owns this * collection of processes. - * @param {number} request.pageSize - * The maximum number of processes to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of processes to return. The service may return * fewer than this value. If unspecified, at most 50 processes are * returned. The maximum value is 100; values greater than 100 are cut to * 100. - * @param {string} request.pageToken - * The page token received from a previous `ListProcesses` call. Specify - * it to get the next page. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListProcesses` call. + * Specify it to get the next page. * * When paginating, all other parameters specified in this call must * match the parameters of the call that provided the page token. @@ -1829,13 +1931,13 @@ export class LineageClient { * The request object that will be sent. * @param {string} request.parent * Required. The name of process that owns this collection of runs. - * @param {number} request.pageSize - * The maximum number of runs to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of runs to return. The service may return * fewer than this value. If unspecified, at most 50 runs are * returned. The maximum value is 100; values greater than 100 are cut to * 100. - * @param {string} request.pageToken - * The page token received from a previous `ListRuns` call. Specify + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListRuns` call. Specify * it to get the next page. * * When paginating, all other parameters specified in this call must @@ -1934,13 +2036,13 @@ export class LineageClient { * The request object that will be sent. * @param {string} request.parent * Required. The name of process that owns this collection of runs. - * @param {number} request.pageSize - * The maximum number of runs to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of runs to return. The service may return * fewer than this value. If unspecified, at most 50 runs are * returned. The maximum value is 100; values greater than 100 are cut to * 100. - * @param {string} request.pageToken - * The page token received from a previous `ListRuns` call. Specify + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListRuns` call. Specify * it to get the next page. * * When paginating, all other parameters specified in this call must @@ -1988,13 +2090,13 @@ export class LineageClient { * The request object that will be sent. * @param {string} request.parent * Required. The name of process that owns this collection of runs. - * @param {number} request.pageSize - * The maximum number of runs to return. The service may return + * @param {number} [request.pageSize] + * Optional. The maximum number of runs to return. The service may return * fewer than this value. If unspecified, at most 50 runs are * returned. The maximum value is 100; values greater than 100 are cut to * 100. - * @param {string} request.pageToken - * The page token received from a previous `ListRuns` call. Specify + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListRuns` call. Specify * it to get the next page. * * When paginating, all other parameters specified in this call must @@ -2043,15 +2145,15 @@ export class LineageClient { * @param {string} request.parent * Required. The name of the run that owns the collection of lineage events to * get. - * @param {number} request.pageSize - * The maximum number of lineage events to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of lineage events to return. * * The service may return fewer events than this value. * If unspecified, at most 50 events are returned. The maximum value is 100; * values greater than 100 are cut to 100. - * @param {string} request.pageToken - * The page token received from a previous `ListLineageEvents` call. Specify - * it to get the next page. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListLineageEvents` call. + * Specify it to get the next page. * * When paginating, all other parameters specified in this call must * match the parameters of the call that provided the page token. @@ -2150,15 +2252,15 @@ export class LineageClient { * @param {string} request.parent * Required. The name of the run that owns the collection of lineage events to * get. - * @param {number} request.pageSize - * The maximum number of lineage events to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of lineage events to return. * * The service may return fewer events than this value. * If unspecified, at most 50 events are returned. The maximum value is 100; * values greater than 100 are cut to 100. - * @param {string} request.pageToken - * The page token received from a previous `ListLineageEvents` call. Specify - * it to get the next page. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListLineageEvents` call. + * Specify it to get the next page. * * When paginating, all other parameters specified in this call must * match the parameters of the call that provided the page token. @@ -2206,15 +2308,15 @@ export class LineageClient { * @param {string} request.parent * Required. The name of the run that owns the collection of lineage events to * get. - * @param {number} request.pageSize - * The maximum number of lineage events to return. + * @param {number} [request.pageSize] + * Optional. The maximum number of lineage events to return. * * The service may return fewer events than this value. * If unspecified, at most 50 events are returned. The maximum value is 100; * values greater than 100 are cut to 100. - * @param {string} request.pageToken - * The page token received from a previous `ListLineageEvents` call. Specify - * it to get the next page. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous `ListLineageEvents` call. + * Specify it to get the next page. * * When paginating, all other parameters specified in this call must * match the parameters of the call that provided the page token. @@ -2274,6 +2376,22 @@ export class LineageClient { * @param {google.cloud.datacatalog.lineage.v1.EntityReference} [request.target] * Optional. Send asset information in the **target** field to retrieve all * links that lead from upstream assets to the specified asset. + * @param {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} [request.sources] + * Optional. Send a list of asset information in the **sources** field to + * retrieve all links that lead from the specified assets to downstream + * assets. This field is similar to the `source` + * {@link protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.source|source} + * field but allows providing multiple entities. + * All entities within the `MultipleEntityReference` must have the same + * `fully_qualified_name`. + * @param {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} [request.targets] + * Optional. Send a list of asset information in the **targets** field to + * retrieve all links that lead from upstream assets to the specified + * assets. This field is similar to the `target` + * {@link protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.target|target} + * field but allows providing multiple entities. + * All entities within the `MultipleEntityReference` must have the same + * `fully_qualified_name`. * @param {number} [request.pageSize] * Optional. The maximum number of links to return in a single page of the * response. A page may contain fewer links than this value. If unspecified, @@ -2387,6 +2505,22 @@ export class LineageClient { * @param {google.cloud.datacatalog.lineage.v1.EntityReference} [request.target] * Optional. Send asset information in the **target** field to retrieve all * links that lead from upstream assets to the specified asset. + * @param {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} [request.sources] + * Optional. Send a list of asset information in the **sources** field to + * retrieve all links that lead from the specified assets to downstream + * assets. This field is similar to the `source` + * {@link protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.source|source} + * field but allows providing multiple entities. + * All entities within the `MultipleEntityReference` must have the same + * `fully_qualified_name`. + * @param {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} [request.targets] + * Optional. Send a list of asset information in the **targets** field to + * retrieve all links that lead from upstream assets to the specified + * assets. This field is similar to the `target` + * {@link protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.target|target} + * field but allows providing multiple entities. + * All entities within the `MultipleEntityReference` must have the same + * `fully_qualified_name`. * @param {number} [request.pageSize] * Optional. The maximum number of links to return in a single page of the * response. A page may contain fewer links than this value. If unspecified, @@ -2449,6 +2583,22 @@ export class LineageClient { * @param {google.cloud.datacatalog.lineage.v1.EntityReference} [request.target] * Optional. Send asset information in the **target** field to retrieve all * links that lead from upstream assets to the specified asset. + * @param {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} [request.sources] + * Optional. Send a list of asset information in the **sources** field to + * retrieve all links that lead from the specified assets to downstream + * assets. This field is similar to the `source` + * {@link protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.source|source} + * field but allows providing multiple entities. + * All entities within the `MultipleEntityReference` must have the same + * `fully_qualified_name`. + * @param {google.cloud.datacatalog.lineage.v1.MultipleEntityReference} [request.targets] + * Optional. Send a list of asset information in the **targets** field to + * retrieve all links that lead from upstream assets to the specified + * assets. This field is similar to the `target` + * {@link protos.google.cloud.datacatalog.lineage.v1.SearchLinksRequest.target|target} + * field but allows providing multiple entities. + * All entities within the `MultipleEntityReference` must have the same + * `fully_qualified_name`. * @param {number} [request.pageSize] * Optional. The maximum number of links to return in a single page of the * response. A page may contain fewer links than this value. If unspecified, @@ -2525,12 +2675,12 @@ export class LineageClient { * `INVALID_ARGUMENT` error. * * Format: `projects/{project}/locations/{location}/links/{link}`. - * @param {number} request.pageSize - * The maximum number of processes to return in a single page of the response. - * A page may contain fewer results than this value. - * @param {string} request.pageToken - * The page token received from a previous `BatchSearchLinkProcesses` call. - * Use it to get the next page. + * @param {number} [request.pageSize] + * Optional. The maximum number of processes to return in a single page of the + * response. A page may contain fewer results than this value. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous + * `BatchSearchLinkProcesses` call. Use it to get the next page. * * When requesting subsequent pages of a response, remember that * all parameters must match the values you provided @@ -2637,12 +2787,12 @@ export class LineageClient { * `INVALID_ARGUMENT` error. * * Format: `projects/{project}/locations/{location}/links/{link}`. - * @param {number} request.pageSize - * The maximum number of processes to return in a single page of the response. - * A page may contain fewer results than this value. - * @param {string} request.pageToken - * The page token received from a previous `BatchSearchLinkProcesses` call. - * Use it to get the next page. + * @param {number} [request.pageSize] + * Optional. The maximum number of processes to return in a single page of the + * response. A page may contain fewer results than this value. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous + * `BatchSearchLinkProcesses` call. Use it to get the next page. * * When requesting subsequent pages of a response, remember that * all parameters must match the values you provided @@ -2698,12 +2848,12 @@ export class LineageClient { * `INVALID_ARGUMENT` error. * * Format: `projects/{project}/locations/{location}/links/{link}`. - * @param {number} request.pageSize - * The maximum number of processes to return in a single page of the response. - * A page may contain fewer results than this value. - * @param {string} request.pageToken - * The page token received from a previous `BatchSearchLinkProcesses` call. - * Use it to get the next page. + * @param {number} [request.pageSize] + * Optional. The maximum number of processes to return in a single page of the + * response. A page may contain fewer results than this value. + * @param {string} [request.pageToken] + * Optional. The page token received from a previous + * `BatchSearchLinkProcesses` call. Use it to get the next page. * * When requesting subsequent pages of a response, remember that * all parameters must match the values you provided diff --git a/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client_config.json b/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client_config.json index 3d847aed847e..8955fc2d1d9e 100644 --- a/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client_config.json +++ b/packages/google-cloud-datacatalog-lineage/src/v1/lineage_client_config.json @@ -107,6 +107,11 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "default" + }, + "SearchLineageStreaming": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-datacatalog-lineage/system-test/install.ts b/packages/google-cloud-datacatalog-lineage/system-test/install.ts index 394f3362d203..f66069aa3940 100644 --- a/packages/google-cloud-datacatalog-lineage/system-test/install.ts +++ b/packages/google-cloud-datacatalog-lineage/system-test/install.ts @@ -40,7 +40,7 @@ describe('📦 pack-n-play test', () => { packageDir: process.cwd(), sample: { description: 'JavaScript user can use the library', - ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + cjs: readFileSync('./system-test/fixtures/sample/src/index.js').toString() } }; await packNTest(options); diff --git a/packages/google-cloud-datacatalog-lineage/test/gapic_lineage_v1.ts b/packages/google-cloud-datacatalog-lineage/test/gapic_lineage_v1.ts index 841a95df2e6a..9fc1d7443c9d 100644 --- a/packages/google-cloud-datacatalog-lineage/test/gapic_lineage_v1.ts +++ b/packages/google-cloud-datacatalog-lineage/test/gapic_lineage_v1.ts @@ -54,6 +54,18 @@ function stubSimpleCallWithCallback(response?: ResponseType, error return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); } +function stubServerStreamingCall(response?: ResponseType, error?: Error) { + const transformStub = error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // write something to the stream to trigger transformStub and send the response back to the client + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + return sinon.stub().returns(mockStream); +} + function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); const mockOperation = { @@ -300,7 +312,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.processOpenLineageRunEvent as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.processOpenLineageRunEvent as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes processOpenLineageRunEvent without error using callback', async () => { @@ -338,7 +352,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.processOpenLineageRunEvent as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.processOpenLineageRunEvent as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes processOpenLineageRunEvent with error', async () => { @@ -362,7 +378,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.processOpenLineageRunEvent as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.processOpenLineageRunEvent as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes processOpenLineageRunEvent with closed client', async () => { @@ -408,7 +426,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.createProcess as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.createProcess as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes createProcess without error using callback', async () => { @@ -446,7 +466,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.createProcess as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.createProcess as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes createProcess with error', async () => { @@ -470,7 +492,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.createProcess as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.createProcess as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes createProcess with closed client', async () => { @@ -517,7 +541,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.updateProcess as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.updateProcess as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes updateProcess without error using callback', async () => { @@ -556,7 +582,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.updateProcess as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.updateProcess as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes updateProcess with error', async () => { @@ -581,7 +609,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.updateProcess as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.updateProcess as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes updateProcess with closed client', async () => { @@ -736,7 +766,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.createRun as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.createRun as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes createRun without error using callback', async () => { @@ -774,7 +806,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.createRun as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.createRun as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes createRun with error', async () => { @@ -798,7 +832,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.createRun as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.createRun as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes createRun with closed client', async () => { @@ -1064,7 +1100,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.createLineageEvent as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.createLineageEvent as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes createLineageEvent without error using callback', async () => { @@ -1102,7 +1140,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.createLineageEvent as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.createLineageEvent as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes createLineageEvent with error', async () => { @@ -1126,7 +1166,9 @@ describe('v1.LineageClient', () => { assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = (client.innerApiCalls.createLineageEvent as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert.match((client.innerApiCalls.createLineageEvent as SinonStub) + .getCall(0).args[0].requestId, /[a-z0-9-]{36}/) }); it('invokes createLineageEvent with closed client', async () => { @@ -1671,6 +1713,146 @@ describe('v1.LineageClient', () => { }); }); + describe('searchLineageStreaming', () => { + it('invokes searchLineageStreaming without error', async () => { + const client = new lineageModule.v1.LineageClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse() + ); + client.innerApiCalls.searchLineageStreaming = stubServerStreamingCall(expectedResponse); + const stream = client.searchLineageStreaming(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.searchLineageStreaming as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchLineageStreaming as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchLineageStreaming without error and gaxServerStreamingRetries enabled', async () => { + const client = new lineageModule.v1.LineageClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + gaxServerStreamingRetries: true + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse() + ); + client.innerApiCalls.searchLineageStreaming = stubServerStreamingCall(expectedResponse); + const stream = client.searchLineageStreaming(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.searchLineageStreaming as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchLineageStreaming as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchLineageStreaming with error', async () => { + const client = new lineageModule.v1.LineageClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.searchLineageStreaming = stubServerStreamingCall(undefined, expectedError); + const stream = client.searchLineageStreaming(request); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + const actualRequest = (client.innerApiCalls.searchLineageStreaming as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.searchLineageStreaming as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchLineageStreaming with closed client', async () => { + const client = new lineageModule.v1.LineageClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + const stream = client.searchLineageStreaming(request, {retryRequestOptions: {noResponseRetries: 0}}); + const promise = new Promise((resolve, reject) => { + stream.on('data', (response: protos.google.cloud.datacatalog.lineage.v1.SearchLineageStreamingResponse) => { + resolve(response); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + }); + it('should create a client with gaxServerStreamingRetries enabled', () => { + const client = new lineageModule.v1.LineageClient({ + gaxServerStreamingRetries: true, + }); + assert(client); + }); + }); + describe('listProcesses', () => { it('invokes listProcesses without error', async () => { const client = new lineageModule.v1.LineageClient({ diff --git a/packages/google-cloud-datacatalog-lineage/webpack.config.js b/packages/google-cloud-datacatalog-lineage/webpack.config.js index 18b29dac9bb8..78eea17ca287 100644 --- a/packages/google-cloud-datacatalog-lineage/webpack.config.js +++ b/packages/google-cloud-datacatalog-lineage/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2026 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.