diff --git a/packages/google-cloud-dataplex/README.md b/packages/google-cloud-dataplex/README.md index 548e8c5f539..542664bbae1 100644 --- a/packages/google-cloud-dataplex/README.md +++ b/packages/google-cloud-dataplex/README.md @@ -96,6 +96,14 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Content_service.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.set_iam_policy.js,samples/README.md) | | Content_service.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.test_iam_permissions.js,samples/README.md) | | Content_service.update_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/content_service.update_content.js,samples/README.md) | +| Data_scan_service.create_data_scan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js,samples/README.md) | +| Data_scan_service.delete_data_scan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.delete_data_scan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.delete_data_scan.js,samples/README.md) | +| Data_scan_service.get_data_scan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan.js,samples/README.md) | +| Data_scan_service.get_data_scan_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js,samples/README.md) | +| Data_scan_service.list_data_scan_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scan_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scan_jobs.js,samples/README.md) | +| Data_scan_service.list_data_scans | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js,samples/README.md) | +| Data_scan_service.run_data_scan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.run_data_scan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.run_data_scan.js,samples/README.md) | +| Data_scan_service.update_data_scan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js,samples/README.md) | | Dataplex_service.cancel_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js,samples/README.md) | | Dataplex_service.create_asset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_asset.js,samples/README.md) | | Dataplex_service.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.create_environment.js,samples/README.md) | diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto new file mode 100644 index 00000000000..bb8695af09c --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto @@ -0,0 +1,207 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/cloud/dataplex/v1/processing.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "DataProfileProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// DataProfileScan related setting. +message DataProfileSpec {} + +// DataProfileResult defines the output of DataProfileScan. +// Each field of the table will have field type specific profile result. +message DataProfileResult { + // Profile information describing the structure and layout of the data + // and contains the profile info. + message Profile { + // Represents a column field within a table schema. + message Field { + // ProfileInfo defines the profile information for each schema field type. + message ProfileInfo { + // StringFieldInfo defines output info for any string type field. + message StringFieldInfo { + // The minimum length of the string field in the sampled data. + // Optional if zero non-null rows. + int64 min_length = 1; + + // The maximum length of a string field in the sampled data. + // Optional if zero non-null rows. + int64 max_length = 2; + + // The average length of a string field in the sampled data. + // Optional if zero non-null rows. + double average_length = 3; + } + + // IntegerFieldInfo defines output for any integer type field. + message IntegerFieldInfo { + // The average of non-null values of integer field in the sampled + // data. Return NaN, if the field has a NaN. Optional if zero non-null + // rows. + double average = 1; + + // The standard deviation of non-null of integer field in the sampled + // data. Return NaN, if the field has a NaN. Optional if zero non-null + // rows. + double standard_deviation = 3; + + // The minimum value of an integer field in the sampled data. + // Return NaN, if the field has a NaN. Optional if zero non-null + // rows. + int64 min = 4; + + // A quartile divide the number of data points into four parts, or + // quarters, of more-or-less equal size. Three main quartiles used + // are: The first quartile (Q1) splits off the lowest 25% of data from + // the highest 75%. It is also known as the lower or 25th empirical + // quartile, as 25% of the data is below this point. The second + // quartile (Q2) is the median of a data set. So, 50% of the data lies + // below this point. The third quartile (Q3) splits off the highest + // 25% of data from the lowest 75%. It is known as the upper or 75th + // empirical quartile, as 75% of the data lies below this point. So, + // here the quartiles is provided as an ordered list of quartile + // values, occurring in order Q1, median, Q3. + repeated int64 quartiles = 6; + + // The maximum value of an integer field in the sampled data. + // Return NaN, if the field has a NaN. Optional if zero non-null + // rows. + int64 max = 5; + } + + // DoubleFieldInfo defines output for any double type field. + message DoubleFieldInfo { + // The average of non-null values of double field in the sampled data. + // Return NaN, if the field has a NaN. Optional if zero non-null rows. + double average = 1; + + // The standard deviation of non-null of double field in the sampled + // data. Return NaN, if the field has a NaN. Optional if zero non-null + // rows. + double standard_deviation = 3; + + // The minimum value of a double field in the sampled data. + // Return NaN, if the field has a NaN. Optional if zero non-null + // rows. + double min = 4; + + // A quartile divide the numebr of data points into four parts, or + // quarters, of more-or-less equal size. Three main quartiles used + // are: The first quartile (Q1) splits off the lowest 25% of data from + // the highest 75%. It is also known as the lower or 25th empirical + // quartile, as 25% of the data is below this point. The second + // quartile (Q2) is the median of a data set. So, 50% of the data lies + // below this point. The third quartile (Q3) splits off the highest + // 25% of data from the lowest 75%. It is known as the upper or 75th + // empirical quartile, as 75% of the data lies below this point. So, + // here the quartiles is provided as an ordered list of quartile + // values, occurring in order Q1, median, Q3. + repeated double quartiles = 6; + + // The maximum value of a double field in the sampled data. + // Return NaN, if the field has a NaN. Optional if zero non-null + // rows. + double max = 5; + } + + // The TopNValue defines the structure of output of top N values of a + // field. + message TopNValue { + // The value is the string value of the actual value from the field. + string value = 1; + + // The frequency count of the corresponding value in the field. + int64 count = 2; + } + + // The ratio of null rows against the rows in the sampled data. + double null_ratio = 2; + + // The ratio of rows that are distinct against the rows in the sampled + // data. + double distinct_ratio = 3; + + // The array of top N values of the field in the sampled data. + // Currently N is set as 10 or equal to distinct values in the field, + // whichever is smaller. This will be optional for complex non-groupable + // data-types such as JSON, ARRAY, JSON, STRUCT. + repeated TopNValue top_n_values = 4; + + // The corresponding profile for specific field type. + // Each field will have only one field type specific profile output. + oneof field_info { + // The corresponding string field profile. + StringFieldInfo string_profile = 101; + + // The corresponding integer field profile. + IntegerFieldInfo integer_profile = 102; + + // The corresponding double field profile. + DoubleFieldInfo double_profile = 103; + } + } + + // The name of the field. + string name = 1; + + // The field data type. Possible values include: + // + // * STRING + // * BYTE + // * INT64 + // * INT32 + // * INT16 + // * DOUBLE + // * FLOAT + // * DECIMAL + // * BOOLEAN + // * BINARY + // * TIMESTAMP + // * DATE + // * TIME + // * NULL + // * RECORD + string type = 2; + + // The mode of the field. Its value will be: + // REQUIRED, if it is a required field. + // NULLABLE, if it is an optional field. + // REPEATED, if it is a repeated field. + string mode = 3; + + // The profile information for the corresponding field. + ProfileInfo profile = 4; + } + + // The sequence of fields describing data in table entities. + repeated Field fields = 2; + } + + // The count of all rows in the sampled data. + // Return 0, if zero rows. + int64 row_count = 3; + + // This represents the profile information per field. + Profile profile = 4; + + // The data scanned for this profile. + ScannedData scanned_data = 5; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto new file mode 100644 index 00000000000..b0953a0ebcf --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto @@ -0,0 +1,236 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/dataplex/v1/processing.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "DataQualityProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// DataQualityScan related setting. +message DataQualitySpec { + // The list of rules to evaluate against a data source. At least one rule is + // required. + repeated DataQualityRule rules = 1; +} + +// The output of a DataQualityScan. +message DataQualityResult { + // Overall data quality result -- `true` if all rules passed. + bool passed = 5; + + // A list of results at the dimension-level. + repeated DataQualityDimensionResult dimensions = 2; + + // A list of all the rules in a job, and their results. + repeated DataQualityRuleResult rules = 3; + + // The count of rows processed. + int64 row_count = 4; + + // The data scanned for this result. + ScannedData scanned_data = 7; +} + +// DataQualityRuleResult provides a more detailed, per-rule level view of the +// results. +message DataQualityRuleResult { + // The rule specified in the DataQualitySpec, as is. + DataQualityRule rule = 1; + + // Whether the rule passed or failed. + bool passed = 7; + + // The number of rows a rule was evaluated against. + // This field is only valid for ColumnMap type rules. + // Evaluated count can be configured to either + // (1) include all rows (default) - with null rows automatically failing rule + // evaluation OR (2) exclude null rows from the evaluated_count, by setting + // ignore_nulls = true + int64 evaluated_count = 9; + + // The number of rows which passed a rule evaluation. + // This field is only valid for ColumnMap type rules. + int64 passed_count = 8; + + // The number of rows with null values in the specified column. + int64 null_count = 5; + + // The ratio of passed_count / evaluated_count. + // This field is only valid for ColumnMap type rules. + double pass_ratio = 6; + + // The query to find rows that did not pass this rule. + // Only applies to ColumnMap and RowCondition rules. + string failing_rows_query = 10; +} + +// DataQualityDimensionResult provides a more detailed, per-dimension level view +// of the results. +message DataQualityDimensionResult { + // Whether the dimension passed or failed. + bool passed = 3; +} + +// A rule captures data quality intent about a data source. +message DataQualityRule { + // Evaluates whether each column value lies between a specified range. + message RangeExpectation { + // Optional. The minimum column value allowed for a row to pass this + // validation. At least one of min_value and max_value need to be provided. + string min_value = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum column value allowed for a row to pass this + // validation. At least one of min_value and max_value need to be provided. + string max_value = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether each value needs to be strictly greater than ('>') the + // minimum, or if equality is allowed. Only relevant if a min_value has been + // defined. Default = false. + bool strict_min_enabled = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether each value needs to be strictly lesser than ('<') the + // maximum, or if equality is allowed. Only relevant if a max_value has been + // defined. Default = false. + bool strict_max_enabled = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Evaluates whether each column value is null. + message NonNullExpectation {} + + // Evaluates whether each column value is contained by a specified set. + message SetExpectation { + repeated string values = 1; + } + + // Evaluates whether each column value matches a specified regex. + message RegexExpectation { + string regex = 1; + } + + // Evaluates whether the column has duplicates. + message UniquenessExpectation {} + + // Evaluates whether the column aggregate statistic lies between a specified + // range. + message StatisticRangeExpectation { + enum ColumnStatistic { + // Unspecified statistic type + STATISTIC_UNDEFINED = 0; + + // Evaluate the column mean + MEAN = 1; + + // Evaluate the column min + MIN = 2; + + // Evaluate the column max + MAX = 3; + } + + ColumnStatistic statistic = 1; + + // The minimum column statistic value allowed for a row to pass this + // validation. + // At least one of min_value and max_value need to be provided. + string min_value = 2; + + // The maximum column statistic value allowed for a row to pass this + // validation. + // At least one of min_value and max_value need to be provided. + string max_value = 3; + + // Whether column statistic needs to be strictly greater than ('>') + // the minimum, or if equality is allowed. Only relevant if a min_value has + // been defined. Default = false. + bool strict_min_enabled = 4; + + // Whether column statistic needs to be strictly lesser than ('<') the + // maximum, or if equality is allowed. Only relevant if a max_value has been + // defined. Default = false. + bool strict_max_enabled = 5; + } + + // Evaluates whether each row passes the specified condition. + // The SQL expression needs to use BigQuery standard SQL syntax and should + // produce a boolean per row as the result. + // Example: col1 >= 0 AND col2 < 10 + message RowConditionExpectation { + string sql_expression = 1; + } + + // Evaluates whether the provided expression is true. + // The SQL expression needs to use BigQuery standard SQL syntax and should + // produce a scalar boolean result. + // Example: MIN(col1) >= 0 + message TableConditionExpectation { + string sql_expression = 1; + } + + oneof rule_type { + // ColumnMap rule which evaluates whether each column value lies between a + // specified range. + RangeExpectation range_expectation = 1; + + // ColumnMap rule which evaluates whether each column value is null. + NonNullExpectation non_null_expectation = 2; + + // ColumnMap rule which evaluates whether each column value is contained by + // a specified set. + SetExpectation set_expectation = 3; + + // ColumnMap rule which evaluates whether each column value matches a + // specified regex. + RegexExpectation regex_expectation = 4; + + // ColumnAggregate rule which evaluates whether the column has duplicates. + UniquenessExpectation uniqueness_expectation = 100; + + // ColumnAggregate rule which evaluates whether the column aggregate + // statistic lies between a specified range. + StatisticRangeExpectation statistic_range_expectation = 101; + + // Table rule which evaluates whether each row passes the specified + // condition. + RowConditionExpectation row_condition_expectation = 200; + + // Table rule which evaluates whether the provided expression is true. + TableConditionExpectation table_condition_expectation = 201; + } + + // Optional. The unnested column which this rule is evaluated against. + string column = 500 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rows with null values will automatically fail a rule, unless + // ignore_null is true. In that case, such null rows are trivially considered + // passing. Only applicable to ColumnMap rules. + bool ignore_null = 501 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The dimension a rule belongs to. Results are also aggregated at + // the dimension-level. Supported dimensions are ["COMPLETENESS", "ACCURACY", + // "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"] + string dimension = 502 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The minimum ratio of passing_rows / total_rows required to pass + // this rule, with a range of [0.0, 1.0] + // + // 0 indicates default value (i.e. 1.0) + double threshold = 503 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto new file mode 100644 index 00000000000..b3cc2763d2c --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto @@ -0,0 +1,535 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/data_profile.proto"; +import "google/cloud/dataplex/v1/data_quality.proto"; +import "google/cloud/dataplex/v1/processing.proto"; +import "google/cloud/dataplex/v1/resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "DataScansProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +service DataScanService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a dataScan resource. + rpc CreateDataScan(CreateDataScanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/dataScans" + body: "data_scan" + }; + option (google.api.method_signature) = "parent,data_scan,data_scan_id"; + option (google.longrunning.operation_info) = { + response_type: "DataScan" + metadata_type: "OperationMetadata" + }; + } + + // Update the dataScan resource. + rpc UpdateDataScan(UpdateDataScanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_scan.name=projects/*/locations/*/dataScans/*}" + body: "data_scan" + }; + option (google.api.method_signature) = "data_scan,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataScan" + metadata_type: "OperationMetadata" + }; + } + + // Delete the dataScan resource. + rpc DeleteDataScan(DeleteDataScanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataScans/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Get dataScan resource. + rpc GetDataScan(GetDataScanRequest) returns (DataScan) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataScans/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists dataScans. + rpc ListDataScans(ListDataScansRequest) returns (ListDataScansResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dataScans" + }; + option (google.api.method_signature) = "parent"; + } + + // Run an on demand execution of a DataScan. + rpc RunDataScan(RunDataScanRequest) returns (RunDataScanResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/dataScans/*}:run" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Get DataScanJob resource. + rpc GetDataScanJob(GetDataScanJobRequest) returns (DataScanJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists DataScanJobs under the given dataScan. + rpc ListDataScanJobs(ListDataScanJobsRequest) + returns (ListDataScanJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/dataScans/*}/jobs" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Create dataScan request. +message CreateDataScanRequest { + // Required. The resource name of the parent location: + // projects/{project}/locations/{location_id} + // where `{project}` refers to a project_id or project_number and + // `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. DataScan resource. + DataScan data_scan = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. DataScan identifier. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must end with a number or a letter. + // * Must be between 1-63 characters. + // * Must be unique within the customer project / location. + string data_scan_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Update dataScan request. +message UpdateDataScanRequest { + // Required. Update description. + // Only fields specified in `update_mask` are updated. + DataScan data_scan = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Delete dataScan request. +message DeleteDataScanRequest { + // Required. The resource name of the dataScan: + // projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + // where `{project}` refers to a project_id or project_number and + // `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataScan" + } + ]; +} + +// Get dataScan request. +message GetDataScanRequest { + // DataScan views for getting a partial dataScan. + enum DataScanView { + // The API will default to the `BASIC` view. + DATA_SCAN_VIEW_UNSPECIFIED = 0; + + // Basic view that does not include spec and result. + BASIC = 1; + + // Include everything. + FULL = 10; + } + + // Required. The resource name of the dataScan: + // projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + // where `{project}` refers to a project_id or project_number and + // `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataScan" + } + ]; + + // Optional. Used to select the subset of DataScan information to return. + // Defaults to `BASIC`. + DataScanView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// List dataScans request. +message ListDataScansRequest { + // Required. projects/{project}/locations/{location_id} + // where `{project}` refers to a project_id or project_number and + // `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of dataScans to return. The service may return + // fewer than this value. If unspecified, at most 10 scans will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListDataScans` call. Provide + // this to retrieve the subsequent page. When paginating, all other parameters + // provided to `ListDataScans` must match the call that provided the + // page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields (name or create_time) for the result. + // If not specified, the ordering is undefined. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List dataScans response. +message ListDataScansResponse { + // DataScans (metadata only) under the given parent location. + repeated DataScan data_scans = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Run DataScan Request +message RunDataScanRequest { + // Required. The resource name of the DataScan: + // projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. + // where `{project}` refers to a project_id or project_number and + // `location_id` refers to a GCP region. + // Only on-demand DataScans are allowed. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataScan" + } + ]; +} + +// Run DataScan Response. +message RunDataScanResponse { + // DataScanJob created by RunDataScan API. + DataScanJob job = 1; +} + +// Get DataScanJob request. +message GetDataScanJobRequest { + // DataScanJob views for getting a partial dataScanJob. + enum DataScanJobView { + // The API will default to the `BASIC` view. + DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0; + + // Basic view that does not include spec and result. + BASIC = 1; + + // Include everything. + FULL = 10; + } + + // Required. The resource name of the DataScanJob: + // projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/dataScanJobs/{data_scan_job_id} + // where `{project}` refers to a project_id or project_number and + // `location_id` refers to a GCP region. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataScanJob" + } + ]; + + // Optional. Used to select the subset of DataScan information to return. + // Defaults to `BASIC`. + DataScanJobView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// List DataScanJobs request. +message ListDataScanJobsRequest { + // Required. The resource name of the parent environment: + // projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + // where `{project}` refers to a project_id or project_number and + // `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataScan" + } + ]; + + // Optional. Maximum number of DataScanJobs to return. The service may return + // fewer than this value. If unspecified, at most 10 DataScanJobs will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListDataScanJobs` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `ListDataScanJobs` must match the call that provided + // the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List DataScanJobs response. +message ListDataScanJobsResponse { + // DataScanJobs (metadata only) under a given dataScan. + repeated DataScanJob data_scan_jobs = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Represents a user-visible job which provides the insights for the related +// data source. +// For examples: +// - Data Quality: generates queries based on the rules and run against the +// data to get data quality check results. +// - Data Profile: analyzes the data in table(s) and generates insights about +// the structure, content and relationships (such as null percent, +// cardinality, min/max/mean, etc). +message DataScan { + option (google.api.resource) = { + type: "dataplex.googleapis.com/DataScan" + pattern: "projects/{project}/locations/{location}/dataScans/{dataScan}" + }; + + // DataScan execution settings. + message ExecutionSpec { + // Optional. Spec related to how often and when a scan should be triggered. + // If not specified, the default is OnDemand, which means the scan will not + // run until the user calls RunDataScan API. + Trigger trigger = 1 [(google.api.field_behavior) = OPTIONAL]; + + // If not specified, run a data scan on all data in the table. + // The incremental is immutable, which means once the field is set, + // it cannot be unset, and vice versa. + oneof incremental { + // Immutable. The unnested field (Date or Timestamp) that contains values + // that monotonically increase over time. + string field = 100 [(google.api.field_behavior) = IMMUTABLE]; + } + } + + // Status of the data scan execution. + message ExecutionStatus { + // The time when the latest DataScanJob started. + google.protobuf.Timestamp latest_job_start_time = 4; + + // The time when the latest DataScanJob ended. + google.protobuf.Timestamp latest_job_end_time = 5; + } + + // Output only. The relative resource name of the scan, of the form: + // projects/{project}/locations/{location_id}/dataScans/{datascan_id}. + // where `{project}` refers to a project_id or project_number and + // `location_id` refers to a GCP region. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. System generated globally unique ID for the scan. This ID will + // be different if the scan is deleted and re-created with the same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the scan. + // * Must be between 1-1024 characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + // * Must be between 1-256 characters. + string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the scan. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state of the DataScan. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the scan was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the scan was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The data source for DataScan. + DataSource data = 9 [(google.api.field_behavior) = REQUIRED]; + + // Optional. DataScan execution settings. + // If not specified, the fields under it will use their default values. + ExecutionSpec execution_spec = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Status of the data scan execution. + ExecutionStatus execution_status = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of DataScan. + DataScanType type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Data Scan related setting. + // It is required and immutable which means once data_quality_spec is set, it + // cannot be changed to data_profile_spec. + oneof spec { + // DataQualityScan related setting. + DataQualitySpec data_quality_spec = 100; + + // DataProfileScan related setting. + DataProfileSpec data_profile_spec = 101; + } + + // The result of the data scan. + oneof result { + // Output only. The result of the data quality scan. + DataQualityResult data_quality_result = 200 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The result of the data profile scan. + DataProfileResult data_profile_result = 201 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// A DataScanJob represents an instance of a data scan. +message DataScanJob { + option (google.api.resource) = { + type: "dataplex.googleapis.com/DataScanJob" + pattern: "projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}" + }; + + // Execution state for the DataScanJob. + enum State { + // The DataScanJob state is unspecified. + STATE_UNSPECIFIED = 0; + + // The DataScanJob is running. + RUNNING = 1; + + // The DataScanJob is canceling. + CANCELING = 2; + + // The DataScanJob cancellation was successful. + CANCELLED = 3; + + // The DataScanJob completed successfully. + SUCCEEDED = 4; + + // The DataScanJob is no longer running due to an error. + FAILED = 5; + + // The DataScanJob has been created but not started to run yet. + PENDING = 7; + } + + // Output only. The relative resource name of the DataScanJob, of the form: + // projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}. + // where `{project}` refers to a project_id or project_number and + // `location_id` refers to a GCP region. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. System generated globally unique ID for the DataScanJob. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataScanJob was started. + google.protobuf.Timestamp start_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataScanJob ended. + google.protobuf.Timestamp end_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Execution state for the DataScanJob. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the current state. + string message = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the parent DataScan. + DataScanType type = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Data Scan related setting. + oneof spec { + // Output only. DataQualityScan related setting. + DataQualitySpec data_quality_spec = 100 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. DataProfileScan related setting. + DataProfileSpec data_profile_spec = 101 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The result of the data scan. + oneof result { + // Output only. The result of the data quality scan. + DataQualityResult data_quality_result = 200 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The result of the data profile scan. + DataProfileResult data_profile_result = 201 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// The type of DataScan. +enum DataScanType { + // The DataScan Type is unspecified. + DATA_SCAN_TYPE_UNSPECIFIED = 0; + + // Data Quality Scan. + DATA_QUALITY = 1; + + // Data Profile Scan. + DATA_PROFILE = 2; +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto index 0cec184809b..f788c47eaeb 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/logs.proto @@ -291,10 +291,128 @@ message SessionEvent { // The status of the event. bool event_succeeded = 6; - // If the session is associated with an Environment with fast startup enabled, - // and was pre-created before being assigned to a user. + // If the session is associated with an environment with fast startup enabled, + // and was created before being assigned to a user. bool fast_startup_enabled = 7; // The idle duration of a warm pooled session before it is assigned to user. google.protobuf.Duration unassigned_duration = 8; } + +// These messages contain information about the execution of a datascan. +// The monitored resource is 'DataScan' +message DataScanEvent { + // The type of the data scan. + enum ScanType { + // An unspecified data scan type. + SCAN_TYPE_UNSPECIFIED = 0; + + // Data scan for data profile. + DATA_PROFILE = 1; + + // Data scan for data quality. + DATA_QUALITY = 2; + } + + // The job state of the data scan. + enum State { + // Unspecified job state. + STATE_UNSPECIFIED = 0; + + // Data scan started. + STARTED = 1; + + // Data scan successfully completed. + SUCCEEDED = 2; + + // Data scan was unsuccessful. + FAILED = 3; + + // Data scan was cancelled. + CANCELLED = 4; + } + + // The trigger type for the data scan. + enum Trigger { + // An unspecified trigger type. + TRIGGER_UNSPECIFIED = 0; + + // Data scan triggers on demand. + ON_DEMAND = 1; + + // Data scan triggers as per schedule. + SCHEDULE = 2; + } + + // The scope of job for the data scan. + enum Scope { + // An unspecified scope type. + SCOPE_UNSPECIFIED = 0; + + // Data scan runs on all of the data. + FULL = 1; + + // Data scan runs on incremental data. + INCREMENTAL = 2; + } + + // Data profile result for data scan job. + message DataProfileResult { + // The count of rows processed in the data scan job. + int64 row_count = 1; + } + + // Data quality result for data scan job. + message DataQualityResult { + // The count of rows processed in the data scan job. + int64 row_count = 1; + + // Whether the data quality result was `pass` or not. + bool passed = 2; + + // The result of each dimension for data quality result. + // The key of the map is the name of the dimension. + // The value is the bool value depicting whether the dimension result was + // `pass` or not. + map dimension_passed = 3; + } + + // The data source of the data scan + string data_source = 1; + + // The identifier of the specific data scan job this log entry is for. + string job_id = 2; + + // The time when the data scan job started to run. + google.protobuf.Timestamp start_time = 3; + + // The time when the data scan job finished. + google.protobuf.Timestamp end_time = 4; + + // The type of the data scan. + ScanType type = 5; + + // The status of the data scan job. + State state = 6; + + // The message describing the data scan job event. + string message = 7; + + // A version identifier of the spec which was used to execute this job. + string spec_version = 8; + + // The trigger type of the data scan job. + Trigger trigger = 9; + + // The scope of the data scan (e.g. full, incremental). + Scope scope = 10; + + // The result of the data scan job. + oneof result { + // Data profile result for data profile type data scan. + DataProfileResult data_profile = 101; + + // Data quality result for data quality type data scan. + DataQualityResult data_quality = 102; + } +} diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto index 5aac7eb1406..99c817eed8c 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto @@ -682,6 +682,13 @@ message StorageFormat { string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; } + // Describes Iceberg data format. + message IcebergOptions { + // Optional. The location of where the iceberg metadata is present, must be + // within the table path + string metadata_location = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // The specific file format of the data. enum Format { // Format unspecified. @@ -752,6 +759,9 @@ message StorageFormat { // - application/x-avro // - application/x-orc // - application/x-tfrecord + // - application/x-parquet+iceberg + // - application/x-avro+iceberg + // - application/x-orc+iceberg // - application/json // - application/{subtypes} // - text/csv @@ -768,6 +778,9 @@ message StorageFormat { // Optional. Additional information about CSV formatted data. JsonOptions json = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information about iceberg tables. + IcebergOptions iceberg = 12 [(google.api.field_behavior) = OPTIONAL]; } } diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/processing.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/processing.proto new file mode 100644 index 00000000000..49d962eb0c5 --- /dev/null +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/processing.proto @@ -0,0 +1,94 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dataplex.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/dataplex/v1;dataplex"; +option java_multiple_files = true; +option java_outer_classname = "ProcessingProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// DataScan scheduling and trigger settings. +message Trigger { + // The scan runs one-time via RunDataScan API. + message OnDemand {} + + // The scan is scheduled to run periodically. + message Schedule { + // Required. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running + // scans periodically. + // To explicitly set a timezone to the cron tab, apply a prefix in the + // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". + // The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone + // database. For example, "CRON_TZ=America/New_York 1 * * * *", or + // "TZ=America/New_York 1 * * * *". + // This field is required for Schedule scans. + string cron = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // DataScan scheduling and trigger settings. + // If not specified, the default is OnDemand, which means the scan will not + // run until the user calls RunDataScan API. + oneof mode { + // The scan runs one-time shortly after DataScan Creation. + OnDemand on_demand = 100; + + // The scan is scheduled to run periodically. + Schedule schedule = 101; + } +} + +// The data source for DataScan. +message DataSource { + // The source is required and immutable which means once entity is set, it + // cannot be change to others, and vice versa. + oneof source { + // Immutable. The dataplex entity that contains the data for DataScan, of + // the form: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. + string entity = 100 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/Entity" + } + ]; + } +} + +// The data scanned during processing (e.g. in incremental DataScan) +message ScannedData { + // A data range denoted by a pair of start/end values of a field. + message IncrementalField { + // The field that contains values which monotonically increases over time + // (e.g. timestamp). + string field = 1; + + // Value that marks the start of the range + string start = 2; + + // Value that marks the end of the range + string end = 3; + } + + // The range of scanned data + oneof data_range { + // The range denoted by values of an incremental field + IncrementalField incremental_field = 1; + } +} diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts index fb36a5b551d..8907cf71334 100644 --- a/packages/google-cloud-dataplex/protos/protos.d.ts +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -5433,587 +5433,1304 @@ export namespace google { } } - /** Properties of a DiscoveryEvent. */ - interface IDiscoveryEvent { - - /** DiscoveryEvent message */ - message?: (string|null); - - /** DiscoveryEvent lakeId */ - lakeId?: (string|null); + /** Properties of a DataProfileSpec. */ + interface IDataProfileSpec { + } - /** DiscoveryEvent zoneId */ - zoneId?: (string|null); + /** Represents a DataProfileSpec. */ + class DataProfileSpec implements IDataProfileSpec { - /** DiscoveryEvent assetId */ - assetId?: (string|null); + /** + * Constructs a new DataProfileSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataProfileSpec); - /** DiscoveryEvent dataLocation */ - dataLocation?: (string|null); + /** + * Creates a new DataProfileSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataProfileSpec): google.cloud.dataplex.v1.DataProfileSpec; - /** DiscoveryEvent type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); + /** + * Encodes the specified DataProfileSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. + * @param message DataProfileSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataProfileSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** DiscoveryEvent config */ - config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + /** + * Encodes the specified DataProfileSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. + * @param message DataProfileSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataProfileSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** DiscoveryEvent entity */ - entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + /** + * Decodes a DataProfileSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileSpec + * @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.dataplex.v1.DataProfileSpec; - /** DiscoveryEvent partition */ - partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + /** + * Decodes a DataProfileSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileSpec + * @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.dataplex.v1.DataProfileSpec; - /** DiscoveryEvent action */ - action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); - } + /** + * Verifies a DataProfileSpec 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); - /** Represents a DiscoveryEvent. */ - class DiscoveryEvent implements IDiscoveryEvent { + /** + * Creates a DataProfileSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileSpec; /** - * Constructs a new DiscoveryEvent. - * @param [properties] Properties to set + * Creates a plain object from a DataProfileSpec message. Also converts values to other types if specified. + * @param message DataProfileSpec + * @param [options] Conversion options + * @returns Plain object */ - constructor(properties?: google.cloud.dataplex.v1.IDiscoveryEvent); + public static toObject(message: google.cloud.dataplex.v1.DataProfileSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DiscoveryEvent message. */ - public message: string; + /** + * Converts this DataProfileSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** DiscoveryEvent lakeId. */ - public lakeId: string; + /** + * Gets the default type url for DataProfileSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** DiscoveryEvent zoneId. */ - public zoneId: string; + /** Properties of a DataProfileResult. */ + interface IDataProfileResult { - /** DiscoveryEvent assetId. */ - public assetId: string; + /** DataProfileResult rowCount */ + rowCount?: (number|Long|string|null); - /** DiscoveryEvent dataLocation. */ - public dataLocation: string; + /** DataProfileResult profile */ + profile?: (google.cloud.dataplex.v1.DataProfileResult.IProfile|null); - /** DiscoveryEvent type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); + /** DataProfileResult scannedData */ + scannedData?: (google.cloud.dataplex.v1.IScannedData|null); + } - /** DiscoveryEvent config. */ - public config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + /** Represents a DataProfileResult. */ + class DataProfileResult implements IDataProfileResult { - /** DiscoveryEvent entity. */ - public entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + /** + * Constructs a new DataProfileResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataProfileResult); - /** DiscoveryEvent partition. */ - public partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + /** DataProfileResult rowCount. */ + public rowCount: (number|Long|string); - /** DiscoveryEvent action. */ - public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + /** DataProfileResult profile. */ + public profile?: (google.cloud.dataplex.v1.DataProfileResult.IProfile|null); - /** DiscoveryEvent details. */ - public details?: ("config"|"entity"|"partition"|"action"); + /** DataProfileResult scannedData. */ + public scannedData?: (google.cloud.dataplex.v1.IScannedData|null); /** - * Creates a new DiscoveryEvent instance using the specified properties. + * Creates a new DataProfileResult instance using the specified properties. * @param [properties] Properties to set - * @returns DiscoveryEvent instance + * @returns DataProfileResult instance */ - public static create(properties?: google.cloud.dataplex.v1.IDiscoveryEvent): google.cloud.dataplex.v1.DiscoveryEvent; + public static create(properties?: google.cloud.dataplex.v1.IDataProfileResult): google.cloud.dataplex.v1.DataProfileResult; /** - * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @param message DiscoveryEvent message or plain object to encode + * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. + * @param message DataProfileResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @param message DiscoveryEvent message or plain object to encode + * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. + * @param message DataProfileResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer. + * Decodes a DataProfileResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DiscoveryEvent + * @returns DataProfileResult * @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.dataplex.v1.DiscoveryEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DiscoveryEvent + * @returns DataProfileResult * @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.dataplex.v1.DiscoveryEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult; /** - * Verifies a DiscoveryEvent message. + * Verifies a DataProfileResult 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 DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DiscoveryEvent + * @returns DataProfileResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult; /** - * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. - * @param message DiscoveryEvent + * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. + * @param message DataProfileResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DiscoveryEvent to JSON. + * Converts this DataProfileResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DiscoveryEvent + * Gets the default type url for DataProfileResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DiscoveryEvent { - - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - CONFIG = 1, - ENTITY_CREATED = 2, - ENTITY_UPDATED = 3, - ENTITY_DELETED = 4, - PARTITION_CREATED = 5, - PARTITION_UPDATED = 6, - PARTITION_DELETED = 7 - } - - /** EntityType enum. */ - enum EntityType { - ENTITY_TYPE_UNSPECIFIED = 0, - TABLE = 1, - FILESET = 2 - } + namespace DataProfileResult { - /** Properties of a ConfigDetails. */ - interface IConfigDetails { + /** Properties of a Profile. */ + interface IProfile { - /** ConfigDetails parameters */ - parameters?: ({ [k: string]: string }|null); + /** Profile fields */ + fields?: (google.cloud.dataplex.v1.DataProfileResult.Profile.IField[]|null); } - /** Represents a ConfigDetails. */ - class ConfigDetails implements IConfigDetails { + /** Represents a Profile. */ + class Profile implements IProfile { /** - * Constructs a new ConfigDetails. + * Constructs a new Profile. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails); + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.IProfile); - /** ConfigDetails parameters. */ - public parameters: { [k: string]: string }; + /** Profile fields. */ + public fields: google.cloud.dataplex.v1.DataProfileResult.Profile.IField[]; /** - * Creates a new ConfigDetails instance using the specified properties. + * Creates a new Profile instance using the specified properties. * @param [properties] Properties to set - * @returns ConfigDetails instance + * @returns Profile instance */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.IProfile): google.cloud.dataplex.v1.DataProfileResult.Profile; /** - * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @param message ConfigDetails message or plain object to encode + * Encodes the specified Profile message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. + * @param message Profile message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.IProfile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @param message ConfigDetails message or plain object to encode + * Encodes the specified Profile message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. + * @param message Profile message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.IProfile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConfigDetails message from the specified reader or buffer. + * Decodes a Profile message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConfigDetails + * @returns Profile * @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.dataplex.v1.DiscoveryEvent.ConfigDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataProfileResult.Profile; /** - * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * Decodes a Profile message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConfigDetails + * @returns Profile * @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.dataplex.v1.DiscoveryEvent.ConfigDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataProfileResult.Profile; /** - * Verifies a ConfigDetails message. + * Verifies a Profile 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 ConfigDetails message from a plain object. Also converts values to their respective internal types. + * Creates a Profile message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConfigDetails + * @returns Profile */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile; /** - * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. - * @param message ConfigDetails + * Creates a plain object from a Profile message. Also converts values to other types if specified. + * @param message Profile * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConfigDetails to JSON. + * Converts this Profile to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConfigDetails + * Gets the default type url for Profile * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EntityDetails. */ - interface IEntityDetails { - - /** EntityDetails entity */ - entity?: (string|null); + namespace Profile { - /** EntityDetails type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); - } + /** Properties of a Field. */ + interface IField { - /** Represents an EntityDetails. */ - class EntityDetails implements IEntityDetails { + /** Field name */ + name?: (string|null); - /** - * Constructs a new EntityDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails); + /** Field type */ + type?: (string|null); - /** EntityDetails entity. */ - public entity: string; + /** Field mode */ + mode?: (string|null); - /** EntityDetails type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + /** Field profile */ + profile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null); + } - /** - * Creates a new EntityDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns EntityDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + /** Represents a Field. */ + class Field implements IField { - /** - * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @param message EntityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Field. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.IField); - /** - * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @param message EntityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** Field name. */ + public name: string; - /** - * Decodes an EntityDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EntityDetails - * @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.dataplex.v1.DiscoveryEvent.EntityDetails; + /** Field type. */ + public type: string; - /** - * Decodes an EntityDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EntityDetails - * @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.dataplex.v1.DiscoveryEvent.EntityDetails; + /** Field mode. */ + public mode: string; - /** - * Verifies an EntityDetails 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); + /** Field profile. */ + public profile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null); - /** - * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EntityDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + /** + * Creates a new Field instance using the specified properties. + * @param [properties] Properties to set + * @returns Field instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.IField): google.cloud.dataplex.v1.DataProfileResult.Profile.Field; - /** - * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. - * @param message EntityDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified Field message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.IField, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this EntityDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.IField, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for EntityDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a Field message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Field + * @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.dataplex.v1.DataProfileResult.Profile.Field; - /** Properties of a PartitionDetails. */ - interface IPartitionDetails { + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Field + * @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.dataplex.v1.DataProfileResult.Profile.Field; - /** PartitionDetails partition */ - partition?: (string|null); + /** + * Verifies a Field 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); - /** PartitionDetails entity */ - entity?: (string|null); + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Field + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field; - /** PartitionDetails type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @param message Field + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** PartitionDetails sampledDataLocations */ - sampledDataLocations?: (string[]|null); + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Field + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Field { + + /** Properties of a ProfileInfo. */ + interface IProfileInfo { + + /** ProfileInfo nullRatio */ + nullRatio?: (number|null); + + /** ProfileInfo distinctRatio */ + distinctRatio?: (number|null); + + /** ProfileInfo topNValues */ + topNValues?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue[]|null); + + /** ProfileInfo stringProfile */ + stringProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null); + + /** ProfileInfo integerProfile */ + integerProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null); + + /** ProfileInfo doubleProfile */ + doubleProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null); + } + + /** Represents a ProfileInfo. */ + class ProfileInfo implements IProfileInfo { + + /** + * Constructs a new ProfileInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo); + + /** ProfileInfo nullRatio. */ + public nullRatio: number; + + /** ProfileInfo distinctRatio. */ + public distinctRatio: number; + + /** ProfileInfo topNValues. */ + public topNValues: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue[]; + + /** ProfileInfo stringProfile. */ + public stringProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null); + + /** ProfileInfo integerProfile. */ + public integerProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null); + + /** ProfileInfo doubleProfile. */ + public doubleProfile?: (google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null); + + /** ProfileInfo fieldInfo. */ + public fieldInfo?: ("stringProfile"|"integerProfile"|"doubleProfile"); + + /** + * Creates a new ProfileInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ProfileInfo instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; + + /** + * Encodes the specified ProfileInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. + * @param message ProfileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProfileInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. + * @param message ProfileInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProfileInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProfileInfo + * @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.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; + + /** + * Decodes a ProfileInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProfileInfo + * @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.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; + + /** + * Verifies a ProfileInfo 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 ProfileInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProfileInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo; + + /** + * Creates a plain object from a ProfileInfo message. Also converts values to other types if specified. + * @param message ProfileInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProfileInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProfileInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProfileInfo { + + /** Properties of a StringFieldInfo. */ + interface IStringFieldInfo { + + /** StringFieldInfo minLength */ + minLength?: (number|Long|string|null); + + /** StringFieldInfo maxLength */ + maxLength?: (number|Long|string|null); + + /** StringFieldInfo averageLength */ + averageLength?: (number|null); + } + + /** Represents a StringFieldInfo. */ + class StringFieldInfo implements IStringFieldInfo { + + /** + * Constructs a new StringFieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo); + + /** StringFieldInfo minLength. */ + public minLength: (number|Long|string); + + /** StringFieldInfo maxLength. */ + public maxLength: (number|Long|string); + + /** StringFieldInfo averageLength. */ + public averageLength: number; + + /** + * Creates a new StringFieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFieldInfo instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; + + /** + * Encodes the specified StringFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. + * @param message StringFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. + * @param message StringFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFieldInfo + * @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.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; + + /** + * Decodes a StringFieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFieldInfo + * @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.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; + + /** + * Verifies a StringFieldInfo 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 StringFieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo; + + /** + * Creates a plain object from a StringFieldInfo message. Also converts values to other types if specified. + * @param message StringFieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IntegerFieldInfo. */ + interface IIntegerFieldInfo { + + /** IntegerFieldInfo average */ + average?: (number|null); + + /** IntegerFieldInfo standardDeviation */ + standardDeviation?: (number|null); + + /** IntegerFieldInfo min */ + min?: (number|Long|string|null); + + /** IntegerFieldInfo quartiles */ + quartiles?: ((number|Long|string)[]|null); + + /** IntegerFieldInfo max */ + max?: (number|Long|string|null); + } + + /** Represents an IntegerFieldInfo. */ + class IntegerFieldInfo implements IIntegerFieldInfo { + + /** + * Constructs a new IntegerFieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo); + + /** IntegerFieldInfo average. */ + public average: number; + + /** IntegerFieldInfo standardDeviation. */ + public standardDeviation: number; + + /** IntegerFieldInfo min. */ + public min: (number|Long|string); + + /** IntegerFieldInfo quartiles. */ + public quartiles: (number|Long|string)[]; + + /** IntegerFieldInfo max. */ + public max: (number|Long|string); + + /** + * Creates a new IntegerFieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns IntegerFieldInfo instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; + + /** + * Encodes the specified IntegerFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. + * @param message IntegerFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IntegerFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. + * @param message IntegerFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntegerFieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IntegerFieldInfo + * @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.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; + + /** + * Decodes an IntegerFieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IntegerFieldInfo + * @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.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; + + /** + * Verifies an IntegerFieldInfo 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 IntegerFieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntegerFieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo; + + /** + * Creates a plain object from an IntegerFieldInfo message. Also converts values to other types if specified. + * @param message IntegerFieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IntegerFieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IntegerFieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DoubleFieldInfo. */ + interface IDoubleFieldInfo { + + /** DoubleFieldInfo average */ + average?: (number|null); + + /** DoubleFieldInfo standardDeviation */ + standardDeviation?: (number|null); + + /** DoubleFieldInfo min */ + min?: (number|null); + + /** DoubleFieldInfo quartiles */ + quartiles?: (number[]|null); + + /** DoubleFieldInfo max */ + max?: (number|null); + } + + /** Represents a DoubleFieldInfo. */ + class DoubleFieldInfo implements IDoubleFieldInfo { + + /** + * Constructs a new DoubleFieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo); + + /** DoubleFieldInfo average. */ + public average: number; + + /** DoubleFieldInfo standardDeviation. */ + public standardDeviation: number; + + /** DoubleFieldInfo min. */ + public min: number; + + /** DoubleFieldInfo quartiles. */ + public quartiles: number[]; + + /** DoubleFieldInfo max. */ + public max: number; + + /** + * Creates a new DoubleFieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleFieldInfo instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; + + /** + * Encodes the specified DoubleFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. + * @param message DoubleFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. + * @param message DoubleFieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleFieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleFieldInfo + * @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.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; + + /** + * Decodes a DoubleFieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleFieldInfo + * @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.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; + + /** + * Verifies a DoubleFieldInfo 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 DoubleFieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleFieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo; + + /** + * Creates a plain object from a DoubleFieldInfo message. Also converts values to other types if specified. + * @param message DoubleFieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleFieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleFieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TopNValue. */ + interface ITopNValue { + + /** TopNValue value */ + value?: (string|null); + + /** TopNValue count */ + count?: (number|Long|string|null); + } + + /** Represents a TopNValue. */ + class TopNValue implements ITopNValue { + + /** + * Constructs a new TopNValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue); + + /** TopNValue value. */ + public value: string; + + /** TopNValue count. */ + public count: (number|Long|string); + + /** + * Creates a new TopNValue instance using the specified properties. + * @param [properties] Properties to set + * @returns TopNValue instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; + + /** + * Encodes the specified TopNValue message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. + * @param message TopNValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TopNValue message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. + * @param message TopNValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TopNValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TopNValue + * @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.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; + + /** + * Decodes a TopNValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TopNValue + * @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.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; + + /** + * Verifies a TopNValue 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 TopNValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TopNValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue; + + /** + * Creates a plain object from a TopNValue message. Also converts values to other types if specified. + * @param message TopNValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TopNValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TopNValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } } + } - /** Represents a PartitionDetails. */ - class PartitionDetails implements IPartitionDetails { + /** Properties of a Trigger. */ + interface ITrigger { - /** - * Constructs a new PartitionDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails); + /** Trigger onDemand */ + onDemand?: (google.cloud.dataplex.v1.Trigger.IOnDemand|null); - /** PartitionDetails partition. */ - public partition: string; + /** Trigger schedule */ + schedule?: (google.cloud.dataplex.v1.Trigger.ISchedule|null); + } - /** PartitionDetails entity. */ - public entity: string; + /** Represents a Trigger. */ + class Trigger implements ITrigger { - /** PartitionDetails type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + /** + * Constructs a new Trigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ITrigger); - /** PartitionDetails sampledDataLocations. */ - public sampledDataLocations: string[]; + /** Trigger onDemand. */ + public onDemand?: (google.cloud.dataplex.v1.Trigger.IOnDemand|null); + + /** Trigger schedule. */ + public schedule?: (google.cloud.dataplex.v1.Trigger.ISchedule|null); + + /** Trigger mode. */ + public mode?: ("onDemand"|"schedule"); + + /** + * Creates a new Trigger instance using the specified properties. + * @param [properties] Properties to set + * @returns Trigger instance + */ + public static create(properties?: google.cloud.dataplex.v1.ITrigger): google.cloud.dataplex.v1.Trigger; + + /** + * Encodes the specified Trigger message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. + * @param message Trigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. + * @param message Trigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Trigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trigger + * @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.dataplex.v1.Trigger; + + /** + * Decodes a Trigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trigger + * @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.dataplex.v1.Trigger; + + /** + * Verifies a Trigger 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 Trigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trigger + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Trigger; + + /** + * Creates a plain object from a Trigger message. Also converts values to other types if specified. + * @param message Trigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Trigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Trigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Trigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Trigger { + + /** Properties of an OnDemand. */ + interface IOnDemand { + } + + /** Represents an OnDemand. */ + class OnDemand implements IOnDemand { /** - * Creates a new PartitionDetails instance using the specified properties. + * Constructs a new OnDemand. * @param [properties] Properties to set - * @returns PartitionDetails instance */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + constructor(properties?: google.cloud.dataplex.v1.Trigger.IOnDemand); /** - * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @param message PartitionDetails message or plain object to encode + * Creates a new OnDemand instance using the specified properties. + * @param [properties] Properties to set + * @returns OnDemand instance + */ + public static create(properties?: google.cloud.dataplex.v1.Trigger.IOnDemand): google.cloud.dataplex.v1.Trigger.OnDemand; + + /** + * Encodes the specified OnDemand message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. + * @param message OnDemand message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Trigger.IOnDemand, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @param message PartitionDetails message or plain object to encode + * Encodes the specified OnDemand message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. + * @param message OnDemand message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Trigger.IOnDemand, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PartitionDetails message from the specified reader or buffer. + * Decodes an OnDemand message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PartitionDetails + * @returns OnDemand * @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.dataplex.v1.DiscoveryEvent.PartitionDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Trigger.OnDemand; /** - * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * Decodes an OnDemand message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PartitionDetails + * @returns OnDemand * @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.dataplex.v1.DiscoveryEvent.PartitionDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Trigger.OnDemand; /** - * Verifies a PartitionDetails message. + * Verifies an OnDemand 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 PartitionDetails message from a plain object. Also converts values to their respective internal types. + * Creates an OnDemand message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PartitionDetails + * @returns OnDemand */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Trigger.OnDemand; /** - * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. - * @param message PartitionDetails + * Creates a plain object from an OnDemand message. Also converts values to other types if specified. + * @param message OnDemand * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Trigger.OnDemand, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PartitionDetails to JSON. + * Converts this OnDemand to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PartitionDetails + * Gets the default type url for OnDemand * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ActionDetails. */ - interface IActionDetails { + /** Properties of a Schedule. */ + interface ISchedule { - /** ActionDetails type */ - type?: (string|null); + /** Schedule cron */ + cron?: (string|null); } - /** Represents an ActionDetails. */ - class ActionDetails implements IActionDetails { + /** Represents a Schedule. */ + class Schedule implements ISchedule { /** - * Constructs a new ActionDetails. + * Constructs a new Schedule. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails); + constructor(properties?: google.cloud.dataplex.v1.Trigger.ISchedule); - /** ActionDetails type. */ - public type: string; + /** Schedule cron. */ + public cron: string; /** - * Creates a new ActionDetails instance using the specified properties. + * Creates a new Schedule instance using the specified properties. * @param [properties] Properties to set - * @returns ActionDetails instance + * @returns Schedule instance */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + public static create(properties?: google.cloud.dataplex.v1.Trigger.ISchedule): google.cloud.dataplex.v1.Trigger.Schedule; /** - * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @param message ActionDetails message or plain object to encode + * Encodes the specified Schedule message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. + * @param message Schedule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Trigger.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @param message ActionDetails message or plain object to encode + * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. + * @param message Schedule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Trigger.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ActionDetails message from the specified reader or buffer. + * Decodes a Schedule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ActionDetails + * @returns Schedule * @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.dataplex.v1.DiscoveryEvent.ActionDetails; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Trigger.Schedule; /** - * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * Decodes a Schedule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ActionDetails + * @returns Schedule * @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.dataplex.v1.DiscoveryEvent.ActionDetails; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Trigger.Schedule; /** - * Verifies an ActionDetails message. + * Verifies a Schedule 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 ActionDetails message from a plain object. Also converts values to their respective internal types. + * Creates a Schedule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ActionDetails + * @returns Schedule */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Trigger.Schedule; /** - * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. - * @param message ActionDetails + * Creates a plain object from a Schedule message. Also converts values to other types if specified. + * @param message Schedule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Trigger.Schedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ActionDetails to JSON. + * Converts this Schedule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ActionDetails + * Gets the default type url for Schedule * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -6021,465 +6738,5156 @@ export namespace google { } } - /** Properties of a JobEvent. */ - interface IJobEvent { - - /** JobEvent message */ - message?: (string|null); - - /** JobEvent jobId */ - jobId?: (string|null); - - /** JobEvent startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** JobEvent endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** JobEvent state */ - state?: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State|null); - - /** JobEvent retries */ - retries?: (number|null); - - /** JobEvent type */ - type?: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type|null); - - /** JobEvent service */ - service?: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service|null); + /** Properties of a DataSource. */ + interface IDataSource { - /** JobEvent serviceJob */ - serviceJob?: (string|null); + /** DataSource entity */ + entity?: (string|null); } - /** Represents a JobEvent. */ - class JobEvent implements IJobEvent { + /** Represents a DataSource. */ + class DataSource implements IDataSource { /** - * Constructs a new JobEvent. + * Constructs a new DataSource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IJobEvent); + constructor(properties?: google.cloud.dataplex.v1.IDataSource); - /** JobEvent message. */ - public message: string; + /** DataSource entity. */ + public entity?: (string|null); - /** JobEvent jobId. */ - public jobId: string; + /** DataSource source. */ + public source?: "entity"; - /** JobEvent startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new DataSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSource instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataSource): google.cloud.dataplex.v1.DataSource; - /** JobEvent endTime. */ + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.dataplex.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSource + * @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.dataplex.v1.DataSource; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSource + * @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.dataplex.v1.DataSource; + + /** + * Verifies a DataSource 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 DataSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataSource; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @param message DataSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ScannedData. */ + interface IScannedData { + + /** ScannedData incrementalField */ + incrementalField?: (google.cloud.dataplex.v1.ScannedData.IIncrementalField|null); + } + + /** Represents a ScannedData. */ + class ScannedData implements IScannedData { + + /** + * Constructs a new ScannedData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IScannedData); + + /** ScannedData incrementalField. */ + public incrementalField?: (google.cloud.dataplex.v1.ScannedData.IIncrementalField|null); + + /** ScannedData dataRange. */ + public dataRange?: "incrementalField"; + + /** + * Creates a new ScannedData instance using the specified properties. + * @param [properties] Properties to set + * @returns ScannedData instance + */ + public static create(properties?: google.cloud.dataplex.v1.IScannedData): google.cloud.dataplex.v1.ScannedData; + + /** + * Encodes the specified ScannedData message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. + * @param message ScannedData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IScannedData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScannedData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. + * @param message ScannedData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IScannedData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScannedData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScannedData + * @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.dataplex.v1.ScannedData; + + /** + * Decodes a ScannedData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScannedData + * @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.dataplex.v1.ScannedData; + + /** + * Verifies a ScannedData 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 ScannedData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScannedData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ScannedData; + + /** + * Creates a plain object from a ScannedData message. Also converts values to other types if specified. + * @param message ScannedData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ScannedData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScannedData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScannedData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScannedData { + + /** Properties of an IncrementalField. */ + interface IIncrementalField { + + /** IncrementalField field */ + field?: (string|null); + + /** IncrementalField start */ + start?: (string|null); + + /** IncrementalField end */ + end?: (string|null); + } + + /** Represents an IncrementalField. */ + class IncrementalField implements IIncrementalField { + + /** + * Constructs a new IncrementalField. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ScannedData.IIncrementalField); + + /** IncrementalField field. */ + public field: string; + + /** IncrementalField start. */ + public start: string; + + /** IncrementalField end. */ + public end: string; + + /** + * Creates a new IncrementalField instance using the specified properties. + * @param [properties] Properties to set + * @returns IncrementalField instance + */ + public static create(properties?: google.cloud.dataplex.v1.ScannedData.IIncrementalField): google.cloud.dataplex.v1.ScannedData.IncrementalField; + + /** + * Encodes the specified IncrementalField message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. + * @param message IncrementalField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ScannedData.IIncrementalField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IncrementalField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. + * @param message IncrementalField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ScannedData.IIncrementalField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IncrementalField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IncrementalField + * @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.dataplex.v1.ScannedData.IncrementalField; + + /** + * Decodes an IncrementalField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IncrementalField + * @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.dataplex.v1.ScannedData.IncrementalField; + + /** + * Verifies an IncrementalField 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 IncrementalField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IncrementalField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ScannedData.IncrementalField; + + /** + * Creates a plain object from an IncrementalField message. Also converts values to other types if specified. + * @param message IncrementalField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ScannedData.IncrementalField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IncrementalField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IncrementalField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataQualitySpec. */ + interface IDataQualitySpec { + + /** DataQualitySpec rules */ + rules?: (google.cloud.dataplex.v1.IDataQualityRule[]|null); + } + + /** Represents a DataQualitySpec. */ + class DataQualitySpec implements IDataQualitySpec { + + /** + * Constructs a new DataQualitySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualitySpec); + + /** DataQualitySpec rules. */ + public rules: google.cloud.dataplex.v1.IDataQualityRule[]; + + /** + * Creates a new DataQualitySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualitySpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualitySpec): google.cloud.dataplex.v1.DataQualitySpec; + + /** + * Encodes the specified DataQualitySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. + * @param message DataQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualitySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. + * @param message DataQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualitySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualitySpec + * @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.dataplex.v1.DataQualitySpec; + + /** + * Decodes a DataQualitySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualitySpec + * @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.dataplex.v1.DataQualitySpec; + + /** + * Verifies a DataQualitySpec 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 DataQualitySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualitySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualitySpec; + + /** + * Creates a plain object from a DataQualitySpec message. Also converts values to other types if specified. + * @param message DataQualitySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualitySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualitySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualitySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityResult. */ + interface IDataQualityResult { + + /** DataQualityResult passed */ + passed?: (boolean|null); + + /** DataQualityResult dimensions */ + dimensions?: (google.cloud.dataplex.v1.IDataQualityDimensionResult[]|null); + + /** DataQualityResult rules */ + rules?: (google.cloud.dataplex.v1.IDataQualityRuleResult[]|null); + + /** DataQualityResult rowCount */ + rowCount?: (number|Long|string|null); + + /** DataQualityResult scannedData */ + scannedData?: (google.cloud.dataplex.v1.IScannedData|null); + } + + /** Represents a DataQualityResult. */ + class DataQualityResult implements IDataQualityResult { + + /** + * Constructs a new DataQualityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityResult); + + /** DataQualityResult passed. */ + public passed: boolean; + + /** DataQualityResult dimensions. */ + public dimensions: google.cloud.dataplex.v1.IDataQualityDimensionResult[]; + + /** DataQualityResult rules. */ + public rules: google.cloud.dataplex.v1.IDataQualityRuleResult[]; + + /** DataQualityResult rowCount. */ + public rowCount: (number|Long|string); + + /** DataQualityResult scannedData. */ + public scannedData?: (google.cloud.dataplex.v1.IScannedData|null); + + /** + * Creates a new DataQualityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityResult): google.cloud.dataplex.v1.DataQualityResult; + + /** + * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. + * @param message DataQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. + * @param message DataQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityResult + * @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.dataplex.v1.DataQualityResult; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityResult + * @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.dataplex.v1.DataQualityResult; + + /** + * Verifies a DataQualityResult 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 DataQualityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityResult; + + /** + * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. + * @param message DataQualityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityRuleResult. */ + interface IDataQualityRuleResult { + + /** DataQualityRuleResult rule */ + rule?: (google.cloud.dataplex.v1.IDataQualityRule|null); + + /** DataQualityRuleResult passed */ + passed?: (boolean|null); + + /** DataQualityRuleResult evaluatedCount */ + evaluatedCount?: (number|Long|string|null); + + /** DataQualityRuleResult passedCount */ + passedCount?: (number|Long|string|null); + + /** DataQualityRuleResult nullCount */ + nullCount?: (number|Long|string|null); + + /** DataQualityRuleResult passRatio */ + passRatio?: (number|null); + + /** DataQualityRuleResult failingRowsQuery */ + failingRowsQuery?: (string|null); + } + + /** Represents a DataQualityRuleResult. */ + class DataQualityRuleResult implements IDataQualityRuleResult { + + /** + * Constructs a new DataQualityRuleResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityRuleResult); + + /** DataQualityRuleResult rule. */ + public rule?: (google.cloud.dataplex.v1.IDataQualityRule|null); + + /** DataQualityRuleResult passed. */ + public passed: boolean; + + /** DataQualityRuleResult evaluatedCount. */ + public evaluatedCount: (number|Long|string); + + /** DataQualityRuleResult passedCount. */ + public passedCount: (number|Long|string); + + /** DataQualityRuleResult nullCount. */ + public nullCount: (number|Long|string); + + /** DataQualityRuleResult passRatio. */ + public passRatio: number; + + /** DataQualityRuleResult failingRowsQuery. */ + public failingRowsQuery: string; + + /** + * Creates a new DataQualityRuleResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityRuleResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityRuleResult): google.cloud.dataplex.v1.DataQualityRuleResult; + + /** + * Encodes the specified DataQualityRuleResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. + * @param message DataQualityRuleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityRuleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityRuleResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. + * @param message DataQualityRuleResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityRuleResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityRuleResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityRuleResult + * @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.dataplex.v1.DataQualityRuleResult; + + /** + * Decodes a DataQualityRuleResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityRuleResult + * @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.dataplex.v1.DataQualityRuleResult; + + /** + * Verifies a DataQualityRuleResult 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 DataQualityRuleResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityRuleResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRuleResult; + + /** + * Creates a plain object from a DataQualityRuleResult message. Also converts values to other types if specified. + * @param message DataQualityRuleResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRuleResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityRuleResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityRuleResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityDimensionResult. */ + interface IDataQualityDimensionResult { + + /** DataQualityDimensionResult passed */ + passed?: (boolean|null); + } + + /** Represents a DataQualityDimensionResult. */ + class DataQualityDimensionResult implements IDataQualityDimensionResult { + + /** + * Constructs a new DataQualityDimensionResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityDimensionResult); + + /** DataQualityDimensionResult passed. */ + public passed: boolean; + + /** + * Creates a new DataQualityDimensionResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityDimensionResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityDimensionResult): google.cloud.dataplex.v1.DataQualityDimensionResult; + + /** + * Encodes the specified DataQualityDimensionResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. + * @param message DataQualityDimensionResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityDimensionResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityDimensionResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. + * @param message DataQualityDimensionResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityDimensionResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityDimensionResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityDimensionResult + * @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.dataplex.v1.DataQualityDimensionResult; + + /** + * Decodes a DataQualityDimensionResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityDimensionResult + * @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.dataplex.v1.DataQualityDimensionResult; + + /** + * Verifies a DataQualityDimensionResult 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 DataQualityDimensionResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityDimensionResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityDimensionResult; + + /** + * Creates a plain object from a DataQualityDimensionResult message. Also converts values to other types if specified. + * @param message DataQualityDimensionResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityDimensionResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityDimensionResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityDimensionResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityRule. */ + interface IDataQualityRule { + + /** DataQualityRule rangeExpectation */ + rangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null); + + /** DataQualityRule nonNullExpectation */ + nonNullExpectation?: (google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null); + + /** DataQualityRule setExpectation */ + setExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null); + + /** DataQualityRule regexExpectation */ + regexExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null); + + /** DataQualityRule uniquenessExpectation */ + uniquenessExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null); + + /** DataQualityRule statisticRangeExpectation */ + statisticRangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null); + + /** DataQualityRule rowConditionExpectation */ + rowConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null); + + /** DataQualityRule tableConditionExpectation */ + tableConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null); + + /** DataQualityRule column */ + column?: (string|null); + + /** DataQualityRule ignoreNull */ + ignoreNull?: (boolean|null); + + /** DataQualityRule dimension */ + dimension?: (string|null); + + /** DataQualityRule threshold */ + threshold?: (number|null); + } + + /** Represents a DataQualityRule. */ + class DataQualityRule implements IDataQualityRule { + + /** + * Constructs a new DataQualityRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataQualityRule); + + /** DataQualityRule rangeExpectation. */ + public rangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null); + + /** DataQualityRule nonNullExpectation. */ + public nonNullExpectation?: (google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null); + + /** DataQualityRule setExpectation. */ + public setExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null); + + /** DataQualityRule regexExpectation. */ + public regexExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null); + + /** DataQualityRule uniquenessExpectation. */ + public uniquenessExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null); + + /** DataQualityRule statisticRangeExpectation. */ + public statisticRangeExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null); + + /** DataQualityRule rowConditionExpectation. */ + public rowConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null); + + /** DataQualityRule tableConditionExpectation. */ + public tableConditionExpectation?: (google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null); + + /** DataQualityRule column. */ + public column: string; + + /** DataQualityRule ignoreNull. */ + public ignoreNull: boolean; + + /** DataQualityRule dimension. */ + public dimension: string; + + /** DataQualityRule threshold. */ + public threshold: number; + + /** DataQualityRule ruleType. */ + public ruleType?: ("rangeExpectation"|"nonNullExpectation"|"setExpectation"|"regexExpectation"|"uniquenessExpectation"|"statisticRangeExpectation"|"rowConditionExpectation"|"tableConditionExpectation"); + + /** + * Creates a new DataQualityRule instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityRule instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataQualityRule): google.cloud.dataplex.v1.DataQualityRule; + + /** + * Encodes the specified DataQualityRule message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. + * @param message DataQualityRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataQualityRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityRule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. + * @param message DataQualityRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataQualityRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataQualityRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityRule + * @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.dataplex.v1.DataQualityRule; + + /** + * Decodes a DataQualityRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityRule + * @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.dataplex.v1.DataQualityRule; + + /** + * Verifies a DataQualityRule 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 DataQualityRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule; + + /** + * Creates a plain object from a DataQualityRule message. Also converts values to other types if specified. + * @param message DataQualityRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataQualityRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataQualityRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataQualityRule { + + /** Properties of a RangeExpectation. */ + interface IRangeExpectation { + + /** RangeExpectation minValue */ + minValue?: (string|null); + + /** RangeExpectation maxValue */ + maxValue?: (string|null); + + /** RangeExpectation strictMinEnabled */ + strictMinEnabled?: (boolean|null); + + /** RangeExpectation strictMaxEnabled */ + strictMaxEnabled?: (boolean|null); + } + + /** Represents a RangeExpectation. */ + class RangeExpectation implements IRangeExpectation { + + /** + * Constructs a new RangeExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation); + + /** RangeExpectation minValue. */ + public minValue: string; + + /** RangeExpectation maxValue. */ + public maxValue: string; + + /** RangeExpectation strictMinEnabled. */ + public strictMinEnabled: boolean; + + /** RangeExpectation strictMaxEnabled. */ + public strictMaxEnabled: boolean; + + /** + * Creates a new RangeExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns RangeExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation): google.cloud.dataplex.v1.DataQualityRule.RangeExpectation; + + /** + * Encodes the specified RangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. + * @param message RangeExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. + * @param message RangeExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RangeExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RangeExpectation + * @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.dataplex.v1.DataQualityRule.RangeExpectation; + + /** + * Decodes a RangeExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RangeExpectation + * @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.dataplex.v1.DataQualityRule.RangeExpectation; + + /** + * Verifies a RangeExpectation 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 RangeExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RangeExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.RangeExpectation; + + /** + * Creates a plain object from a RangeExpectation message. Also converts values to other types if specified. + * @param message RangeExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.RangeExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RangeExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RangeExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NonNullExpectation. */ + interface INonNullExpectation { + } + + /** Represents a NonNullExpectation. */ + class NonNullExpectation implements INonNullExpectation { + + /** + * Constructs a new NonNullExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation); + + /** + * Creates a new NonNullExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns NonNullExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation): google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation; + + /** + * Encodes the specified NonNullExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. + * @param message NonNullExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NonNullExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. + * @param message NonNullExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NonNullExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NonNullExpectation + * @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.dataplex.v1.DataQualityRule.NonNullExpectation; + + /** + * Decodes a NonNullExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NonNullExpectation + * @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.dataplex.v1.DataQualityRule.NonNullExpectation; + + /** + * Verifies a NonNullExpectation 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 NonNullExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NonNullExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation; + + /** + * Creates a plain object from a NonNullExpectation message. Also converts values to other types if specified. + * @param message NonNullExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NonNullExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NonNullExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetExpectation. */ + interface ISetExpectation { + + /** SetExpectation values */ + values?: (string[]|null); + } + + /** Represents a SetExpectation. */ + class SetExpectation implements ISetExpectation { + + /** + * Constructs a new SetExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation); + + /** SetExpectation values. */ + public values: string[]; + + /** + * Creates a new SetExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns SetExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation): google.cloud.dataplex.v1.DataQualityRule.SetExpectation; + + /** + * Encodes the specified SetExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. + * @param message SetExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. + * @param message SetExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.ISetExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetExpectation + * @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.dataplex.v1.DataQualityRule.SetExpectation; + + /** + * Decodes a SetExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetExpectation + * @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.dataplex.v1.DataQualityRule.SetExpectation; + + /** + * Verifies a SetExpectation 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 SetExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.SetExpectation; + + /** + * Creates a plain object from a SetExpectation message. Also converts values to other types if specified. + * @param message SetExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.SetExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RegexExpectation. */ + interface IRegexExpectation { + + /** RegexExpectation regex */ + regex?: (string|null); + } + + /** Represents a RegexExpectation. */ + class RegexExpectation implements IRegexExpectation { + + /** + * Constructs a new RegexExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation); + + /** RegexExpectation regex. */ + public regex: string; + + /** + * Creates a new RegexExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns RegexExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation): google.cloud.dataplex.v1.DataQualityRule.RegexExpectation; + + /** + * Encodes the specified RegexExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. + * @param message RegexExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegexExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. + * @param message RegexExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegexExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegexExpectation + * @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.dataplex.v1.DataQualityRule.RegexExpectation; + + /** + * Decodes a RegexExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegexExpectation + * @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.dataplex.v1.DataQualityRule.RegexExpectation; + + /** + * Verifies a RegexExpectation 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 RegexExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegexExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.RegexExpectation; + + /** + * Creates a plain object from a RegexExpectation message. Also converts values to other types if specified. + * @param message RegexExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.RegexExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegexExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegexExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UniquenessExpectation. */ + interface IUniquenessExpectation { + } + + /** Represents an UniquenessExpectation. */ + class UniquenessExpectation implements IUniquenessExpectation { + + /** + * Constructs a new UniquenessExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation); + + /** + * Creates a new UniquenessExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns UniquenessExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation): google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation; + + /** + * Encodes the specified UniquenessExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. + * @param message UniquenessExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UniquenessExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. + * @param message UniquenessExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UniquenessExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UniquenessExpectation + * @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.dataplex.v1.DataQualityRule.UniquenessExpectation; + + /** + * Decodes an UniquenessExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UniquenessExpectation + * @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.dataplex.v1.DataQualityRule.UniquenessExpectation; + + /** + * Verifies an UniquenessExpectation 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 UniquenessExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UniquenessExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation; + + /** + * Creates a plain object from an UniquenessExpectation message. Also converts values to other types if specified. + * @param message UniquenessExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UniquenessExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UniquenessExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StatisticRangeExpectation. */ + interface IStatisticRangeExpectation { + + /** StatisticRangeExpectation statistic */ + statistic?: (google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|keyof typeof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|null); + + /** StatisticRangeExpectation minValue */ + minValue?: (string|null); + + /** StatisticRangeExpectation maxValue */ + maxValue?: (string|null); + + /** StatisticRangeExpectation strictMinEnabled */ + strictMinEnabled?: (boolean|null); + + /** StatisticRangeExpectation strictMaxEnabled */ + strictMaxEnabled?: (boolean|null); + } + + /** Represents a StatisticRangeExpectation. */ + class StatisticRangeExpectation implements IStatisticRangeExpectation { + + /** + * Constructs a new StatisticRangeExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation); + + /** StatisticRangeExpectation statistic. */ + public statistic: (google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|keyof typeof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic); + + /** StatisticRangeExpectation minValue. */ + public minValue: string; + + /** StatisticRangeExpectation maxValue. */ + public maxValue: string; + + /** StatisticRangeExpectation strictMinEnabled. */ + public strictMinEnabled: boolean; + + /** StatisticRangeExpectation strictMaxEnabled. */ + public strictMaxEnabled: boolean; + + /** + * Creates a new StatisticRangeExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns StatisticRangeExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation): google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation; + + /** + * Encodes the specified StatisticRangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. + * @param message StatisticRangeExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatisticRangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. + * @param message StatisticRangeExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatisticRangeExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatisticRangeExpectation + * @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.dataplex.v1.DataQualityRule.StatisticRangeExpectation; + + /** + * Decodes a StatisticRangeExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatisticRangeExpectation + * @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.dataplex.v1.DataQualityRule.StatisticRangeExpectation; + + /** + * Verifies a StatisticRangeExpectation 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 StatisticRangeExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatisticRangeExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation; + + /** + * Creates a plain object from a StatisticRangeExpectation message. Also converts values to other types if specified. + * @param message StatisticRangeExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatisticRangeExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatisticRangeExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StatisticRangeExpectation { + + /** ColumnStatistic enum. */ + enum ColumnStatistic { + STATISTIC_UNDEFINED = 0, + MEAN = 1, + MIN = 2, + MAX = 3 + } + } + + /** Properties of a RowConditionExpectation. */ + interface IRowConditionExpectation { + + /** RowConditionExpectation sqlExpression */ + sqlExpression?: (string|null); + } + + /** Represents a RowConditionExpectation. */ + class RowConditionExpectation implements IRowConditionExpectation { + + /** + * Constructs a new RowConditionExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation); + + /** RowConditionExpectation sqlExpression. */ + public sqlExpression: string; + + /** + * Creates a new RowConditionExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns RowConditionExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation): google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation; + + /** + * Encodes the specified RowConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. + * @param message RowConditionExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RowConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. + * @param message RowConditionExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RowConditionExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RowConditionExpectation + * @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.dataplex.v1.DataQualityRule.RowConditionExpectation; + + /** + * Decodes a RowConditionExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RowConditionExpectation + * @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.dataplex.v1.DataQualityRule.RowConditionExpectation; + + /** + * Verifies a RowConditionExpectation 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 RowConditionExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RowConditionExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation; + + /** + * Creates a plain object from a RowConditionExpectation message. Also converts values to other types if specified. + * @param message RowConditionExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RowConditionExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RowConditionExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableConditionExpectation. */ + interface ITableConditionExpectation { + + /** TableConditionExpectation sqlExpression */ + sqlExpression?: (string|null); + } + + /** Represents a TableConditionExpectation. */ + class TableConditionExpectation implements ITableConditionExpectation { + + /** + * Constructs a new TableConditionExpectation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation); + + /** TableConditionExpectation sqlExpression. */ + public sqlExpression: string; + + /** + * Creates a new TableConditionExpectation instance using the specified properties. + * @param [properties] Properties to set + * @returns TableConditionExpectation instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation): google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation; + + /** + * Encodes the specified TableConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. + * @param message TableConditionExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. + * @param message TableConditionExpectation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableConditionExpectation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableConditionExpectation + * @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.dataplex.v1.DataQualityRule.TableConditionExpectation; + + /** + * Decodes a TableConditionExpectation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableConditionExpectation + * @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.dataplex.v1.DataQualityRule.TableConditionExpectation; + + /** + * Verifies a TableConditionExpectation 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 TableConditionExpectation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableConditionExpectation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation; + + /** + * Creates a plain object from a TableConditionExpectation message. Also converts values to other types if specified. + * @param message TableConditionExpectation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableConditionExpectation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableConditionExpectation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Represents a DataScanService */ + class DataScanService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataScanService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new DataScanService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataScanService; + + /** + * Calls CreateDataScan. + * @param request CreateDataScanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createDataScan(request: google.cloud.dataplex.v1.ICreateDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.CreateDataScanCallback): void; + + /** + * Calls CreateDataScan. + * @param request CreateDataScanRequest message or plain object + * @returns Promise + */ + public createDataScan(request: google.cloud.dataplex.v1.ICreateDataScanRequest): Promise; + + /** + * Calls UpdateDataScan. + * @param request UpdateDataScanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataScan(request: google.cloud.dataplex.v1.IUpdateDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.UpdateDataScanCallback): void; + + /** + * Calls UpdateDataScan. + * @param request UpdateDataScanRequest message or plain object + * @returns Promise + */ + public updateDataScan(request: google.cloud.dataplex.v1.IUpdateDataScanRequest): Promise; + + /** + * Calls DeleteDataScan. + * @param request DeleteDataScanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteDataScan(request: google.cloud.dataplex.v1.IDeleteDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.DeleteDataScanCallback): void; + + /** + * Calls DeleteDataScan. + * @param request DeleteDataScanRequest message or plain object + * @returns Promise + */ + public deleteDataScan(request: google.cloud.dataplex.v1.IDeleteDataScanRequest): Promise; + + /** + * Calls GetDataScan. + * @param request GetDataScanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataScan + */ + public getDataScan(request: google.cloud.dataplex.v1.IGetDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.GetDataScanCallback): void; + + /** + * Calls GetDataScan. + * @param request GetDataScanRequest message or plain object + * @returns Promise + */ + public getDataScan(request: google.cloud.dataplex.v1.IGetDataScanRequest): Promise; + + /** + * Calls ListDataScans. + * @param request ListDataScansRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataScansResponse + */ + public listDataScans(request: google.cloud.dataplex.v1.IListDataScansRequest, callback: google.cloud.dataplex.v1.DataScanService.ListDataScansCallback): void; + + /** + * Calls ListDataScans. + * @param request ListDataScansRequest message or plain object + * @returns Promise + */ + public listDataScans(request: google.cloud.dataplex.v1.IListDataScansRequest): Promise; + + /** + * Calls RunDataScan. + * @param request RunDataScanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunDataScanResponse + */ + public runDataScan(request: google.cloud.dataplex.v1.IRunDataScanRequest, callback: google.cloud.dataplex.v1.DataScanService.RunDataScanCallback): void; + + /** + * Calls RunDataScan. + * @param request RunDataScanRequest message or plain object + * @returns Promise + */ + public runDataScan(request: google.cloud.dataplex.v1.IRunDataScanRequest): Promise; + + /** + * Calls GetDataScanJob. + * @param request GetDataScanJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataScanJob + */ + public getDataScanJob(request: google.cloud.dataplex.v1.IGetDataScanJobRequest, callback: google.cloud.dataplex.v1.DataScanService.GetDataScanJobCallback): void; + + /** + * Calls GetDataScanJob. + * @param request GetDataScanJobRequest message or plain object + * @returns Promise + */ + public getDataScanJob(request: google.cloud.dataplex.v1.IGetDataScanJobRequest): Promise; + + /** + * Calls ListDataScanJobs. + * @param request ListDataScanJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataScanJobsResponse + */ + public listDataScanJobs(request: google.cloud.dataplex.v1.IListDataScanJobsRequest, callback: google.cloud.dataplex.v1.DataScanService.ListDataScanJobsCallback): void; + + /** + * Calls ListDataScanJobs. + * @param request ListDataScanJobsRequest message or plain object + * @returns Promise + */ + public listDataScanJobs(request: google.cloud.dataplex.v1.IListDataScanJobsRequest): Promise; + } + + namespace DataScanService { + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|createDataScan}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateDataScanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|updateDataScan}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataScanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|deleteDataScan}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteDataScanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScan}. + * @param error Error, if any + * @param [response] DataScan + */ + type GetDataScanCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataScan) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScans}. + * @param error Error, if any + * @param [response] ListDataScansResponse + */ + type ListDataScansCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataScansResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|runDataScan}. + * @param error Error, if any + * @param [response] RunDataScanResponse + */ + type RunDataScanCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.RunDataScanResponse) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScanJob}. + * @param error Error, if any + * @param [response] DataScanJob + */ + type GetDataScanJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.DataScanJob) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScanJobs}. + * @param error Error, if any + * @param [response] ListDataScanJobsResponse + */ + type ListDataScanJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListDataScanJobsResponse) => void; + } + + /** Properties of a CreateDataScanRequest. */ + interface ICreateDataScanRequest { + + /** CreateDataScanRequest parent */ + parent?: (string|null); + + /** CreateDataScanRequest dataScan */ + dataScan?: (google.cloud.dataplex.v1.IDataScan|null); + + /** CreateDataScanRequest dataScanId */ + dataScanId?: (string|null); + } + + /** Represents a CreateDataScanRequest. */ + class CreateDataScanRequest implements ICreateDataScanRequest { + + /** + * Constructs a new CreateDataScanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateDataScanRequest); + + /** CreateDataScanRequest parent. */ + public parent: string; + + /** CreateDataScanRequest dataScan. */ + public dataScan?: (google.cloud.dataplex.v1.IDataScan|null); + + /** CreateDataScanRequest dataScanId. */ + public dataScanId: string; + + /** + * Creates a new CreateDataScanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataScanRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateDataScanRequest): google.cloud.dataplex.v1.CreateDataScanRequest; + + /** + * Encodes the specified CreateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. + * @param message CreateDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. + * @param message CreateDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataScanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataScanRequest + * @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.dataplex.v1.CreateDataScanRequest; + + /** + * Decodes a CreateDataScanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataScanRequest + * @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.dataplex.v1.CreateDataScanRequest; + + /** + * Verifies a CreateDataScanRequest 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 CreateDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataScanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateDataScanRequest; + + /** + * Creates a plain object from a CreateDataScanRequest message. Also converts values to other types if specified. + * @param message CreateDataScanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataScanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataScanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataScanRequest. */ + interface IUpdateDataScanRequest { + + /** UpdateDataScanRequest dataScan */ + dataScan?: (google.cloud.dataplex.v1.IDataScan|null); + + /** UpdateDataScanRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDataScanRequest. */ + class UpdateDataScanRequest implements IUpdateDataScanRequest { + + /** + * Constructs a new UpdateDataScanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateDataScanRequest); + + /** UpdateDataScanRequest dataScan. */ + public dataScan?: (google.cloud.dataplex.v1.IDataScan|null); + + /** UpdateDataScanRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDataScanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataScanRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateDataScanRequest): google.cloud.dataplex.v1.UpdateDataScanRequest; + + /** + * Encodes the specified UpdateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. + * @param message UpdateDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. + * @param message UpdateDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataScanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataScanRequest + * @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.dataplex.v1.UpdateDataScanRequest; + + /** + * Decodes an UpdateDataScanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataScanRequest + * @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.dataplex.v1.UpdateDataScanRequest; + + /** + * Verifies an UpdateDataScanRequest 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 UpdateDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataScanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateDataScanRequest; + + /** + * Creates a plain object from an UpdateDataScanRequest message. Also converts values to other types if specified. + * @param message UpdateDataScanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataScanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataScanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataScanRequest. */ + interface IDeleteDataScanRequest { + + /** DeleteDataScanRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDataScanRequest. */ + class DeleteDataScanRequest implements IDeleteDataScanRequest { + + /** + * Constructs a new DeleteDataScanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteDataScanRequest); + + /** DeleteDataScanRequest name. */ + public name: string; + + /** + * Creates a new DeleteDataScanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataScanRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteDataScanRequest): google.cloud.dataplex.v1.DeleteDataScanRequest; + + /** + * Encodes the specified DeleteDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. + * @param message DeleteDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. + * @param message DeleteDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataScanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataScanRequest + * @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.dataplex.v1.DeleteDataScanRequest; + + /** + * Decodes a DeleteDataScanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataScanRequest + * @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.dataplex.v1.DeleteDataScanRequest; + + /** + * Verifies a DeleteDataScanRequest 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 DeleteDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataScanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteDataScanRequest; + + /** + * Creates a plain object from a DeleteDataScanRequest message. Also converts values to other types if specified. + * @param message DeleteDataScanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataScanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataScanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataScanRequest. */ + interface IGetDataScanRequest { + + /** GetDataScanRequest name */ + name?: (string|null); + + /** GetDataScanRequest view */ + view?: (google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|keyof typeof google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|null); + } + + /** Represents a GetDataScanRequest. */ + class GetDataScanRequest implements IGetDataScanRequest { + + /** + * Constructs a new GetDataScanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetDataScanRequest); + + /** GetDataScanRequest name. */ + public name: string; + + /** GetDataScanRequest view. */ + public view: (google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|keyof typeof google.cloud.dataplex.v1.GetDataScanRequest.DataScanView); + + /** + * Creates a new GetDataScanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataScanRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetDataScanRequest): google.cloud.dataplex.v1.GetDataScanRequest; + + /** + * Encodes the specified GetDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. + * @param message GetDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. + * @param message GetDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataScanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataScanRequest + * @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.dataplex.v1.GetDataScanRequest; + + /** + * Decodes a GetDataScanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataScanRequest + * @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.dataplex.v1.GetDataScanRequest; + + /** + * Verifies a GetDataScanRequest 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 GetDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataScanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataScanRequest; + + /** + * Creates a plain object from a GetDataScanRequest message. Also converts values to other types if specified. + * @param message GetDataScanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataScanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataScanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GetDataScanRequest { + + /** DataScanView enum. */ + enum DataScanView { + DATA_SCAN_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 10 + } + } + + /** Properties of a ListDataScansRequest. */ + interface IListDataScansRequest { + + /** ListDataScansRequest parent */ + parent?: (string|null); + + /** ListDataScansRequest pageSize */ + pageSize?: (number|null); + + /** ListDataScansRequest pageToken */ + pageToken?: (string|null); + + /** ListDataScansRequest filter */ + filter?: (string|null); + + /** ListDataScansRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataScansRequest. */ + class ListDataScansRequest implements IListDataScansRequest { + + /** + * Constructs a new ListDataScansRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataScansRequest); + + /** ListDataScansRequest parent. */ + public parent: string; + + /** ListDataScansRequest pageSize. */ + public pageSize: number; + + /** ListDataScansRequest pageToken. */ + public pageToken: string; + + /** ListDataScansRequest filter. */ + public filter: string; + + /** ListDataScansRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataScansRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataScansRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataScansRequest): google.cloud.dataplex.v1.ListDataScansRequest; + + /** + * Encodes the specified ListDataScansRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. + * @param message ListDataScansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataScansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataScansRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. + * @param message ListDataScansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataScansRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataScansRequest + * @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.dataplex.v1.ListDataScansRequest; + + /** + * Decodes a ListDataScansRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataScansRequest + * @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.dataplex.v1.ListDataScansRequest; + + /** + * Verifies a ListDataScansRequest 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 ListDataScansRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataScansRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScansRequest; + + /** + * Creates a plain object from a ListDataScansRequest message. Also converts values to other types if specified. + * @param message ListDataScansRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataScansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataScansRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataScansRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataScansResponse. */ + interface IListDataScansResponse { + + /** ListDataScansResponse dataScans */ + dataScans?: (google.cloud.dataplex.v1.IDataScan[]|null); + + /** ListDataScansResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataScansResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataScansResponse. */ + class ListDataScansResponse implements IListDataScansResponse { + + /** + * Constructs a new ListDataScansResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataScansResponse); + + /** ListDataScansResponse dataScans. */ + public dataScans: google.cloud.dataplex.v1.IDataScan[]; + + /** ListDataScansResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataScansResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataScansResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataScansResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataScansResponse): google.cloud.dataplex.v1.ListDataScansResponse; + + /** + * Encodes the specified ListDataScansResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. + * @param message ListDataScansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataScansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataScansResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. + * @param message ListDataScansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataScansResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataScansResponse + * @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.dataplex.v1.ListDataScansResponse; + + /** + * Decodes a ListDataScansResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataScansResponse + * @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.dataplex.v1.ListDataScansResponse; + + /** + * Verifies a ListDataScansResponse 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 ListDataScansResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataScansResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScansResponse; + + /** + * Creates a plain object from a ListDataScansResponse message. Also converts values to other types if specified. + * @param message ListDataScansResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataScansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataScansResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataScansResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunDataScanRequest. */ + interface IRunDataScanRequest { + + /** RunDataScanRequest name */ + name?: (string|null); + } + + /** Represents a RunDataScanRequest. */ + class RunDataScanRequest implements IRunDataScanRequest { + + /** + * Constructs a new RunDataScanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IRunDataScanRequest); + + /** RunDataScanRequest name. */ + public name: string; + + /** + * Creates a new RunDataScanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunDataScanRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IRunDataScanRequest): google.cloud.dataplex.v1.RunDataScanRequest; + + /** + * Encodes the specified RunDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. + * @param message RunDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IRunDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. + * @param message RunDataScanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IRunDataScanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunDataScanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunDataScanRequest + * @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.dataplex.v1.RunDataScanRequest; + + /** + * Decodes a RunDataScanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunDataScanRequest + * @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.dataplex.v1.RunDataScanRequest; + + /** + * Verifies a RunDataScanRequest 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 RunDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunDataScanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunDataScanRequest; + + /** + * Creates a plain object from a RunDataScanRequest message. Also converts values to other types if specified. + * @param message RunDataScanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.RunDataScanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunDataScanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunDataScanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunDataScanResponse. */ + interface IRunDataScanResponse { + + /** RunDataScanResponse job */ + job?: (google.cloud.dataplex.v1.IDataScanJob|null); + } + + /** Represents a RunDataScanResponse. */ + class RunDataScanResponse implements IRunDataScanResponse { + + /** + * Constructs a new RunDataScanResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IRunDataScanResponse); + + /** RunDataScanResponse job. */ + public job?: (google.cloud.dataplex.v1.IDataScanJob|null); + + /** + * Creates a new RunDataScanResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunDataScanResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IRunDataScanResponse): google.cloud.dataplex.v1.RunDataScanResponse; + + /** + * Encodes the specified RunDataScanResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. + * @param message RunDataScanResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IRunDataScanResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunDataScanResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. + * @param message RunDataScanResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IRunDataScanResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunDataScanResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunDataScanResponse + * @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.dataplex.v1.RunDataScanResponse; + + /** + * Decodes a RunDataScanResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunDataScanResponse + * @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.dataplex.v1.RunDataScanResponse; + + /** + * Verifies a RunDataScanResponse 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 RunDataScanResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunDataScanResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunDataScanResponse; + + /** + * Creates a plain object from a RunDataScanResponse message. Also converts values to other types if specified. + * @param message RunDataScanResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.RunDataScanResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunDataScanResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunDataScanResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataScanJobRequest. */ + interface IGetDataScanJobRequest { + + /** GetDataScanJobRequest name */ + name?: (string|null); + + /** GetDataScanJobRequest view */ + view?: (google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|keyof typeof google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|null); + } + + /** Represents a GetDataScanJobRequest. */ + class GetDataScanJobRequest implements IGetDataScanJobRequest { + + /** + * Constructs a new GetDataScanJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IGetDataScanJobRequest); + + /** GetDataScanJobRequest name. */ + public name: string; + + /** GetDataScanJobRequest view. */ + public view: (google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|keyof typeof google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView); + + /** + * Creates a new GetDataScanJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataScanJobRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IGetDataScanJobRequest): google.cloud.dataplex.v1.GetDataScanJobRequest; + + /** + * Encodes the specified GetDataScanJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. + * @param message GetDataScanJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IGetDataScanJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataScanJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. + * @param message GetDataScanJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetDataScanJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataScanJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataScanJobRequest + * @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.dataplex.v1.GetDataScanJobRequest; + + /** + * Decodes a GetDataScanJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataScanJobRequest + * @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.dataplex.v1.GetDataScanJobRequest; + + /** + * Verifies a GetDataScanJobRequest 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 GetDataScanJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataScanJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetDataScanJobRequest; + + /** + * Creates a plain object from a GetDataScanJobRequest message. Also converts values to other types if specified. + * @param message GetDataScanJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.GetDataScanJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataScanJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataScanJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GetDataScanJobRequest { + + /** DataScanJobView enum. */ + enum DataScanJobView { + DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0, + BASIC = 1, + FULL = 10 + } + } + + /** Properties of a ListDataScanJobsRequest. */ + interface IListDataScanJobsRequest { + + /** ListDataScanJobsRequest parent */ + parent?: (string|null); + + /** ListDataScanJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListDataScanJobsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDataScanJobsRequest. */ + class ListDataScanJobsRequest implements IListDataScanJobsRequest { + + /** + * Constructs a new ListDataScanJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataScanJobsRequest); + + /** ListDataScanJobsRequest parent. */ + public parent: string; + + /** ListDataScanJobsRequest pageSize. */ + public pageSize: number; + + /** ListDataScanJobsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDataScanJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataScanJobsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataScanJobsRequest): google.cloud.dataplex.v1.ListDataScanJobsRequest; + + /** + * Encodes the specified ListDataScanJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. + * @param message ListDataScanJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataScanJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataScanJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. + * @param message ListDataScanJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScanJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataScanJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataScanJobsRequest + * @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.dataplex.v1.ListDataScanJobsRequest; + + /** + * Decodes a ListDataScanJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataScanJobsRequest + * @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.dataplex.v1.ListDataScanJobsRequest; + + /** + * Verifies a ListDataScanJobsRequest 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 ListDataScanJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataScanJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScanJobsRequest; + + /** + * Creates a plain object from a ListDataScanJobsRequest message. Also converts values to other types if specified. + * @param message ListDataScanJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataScanJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataScanJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataScanJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataScanJobsResponse. */ + interface IListDataScanJobsResponse { + + /** ListDataScanJobsResponse dataScanJobs */ + dataScanJobs?: (google.cloud.dataplex.v1.IDataScanJob[]|null); + + /** ListDataScanJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDataScanJobsResponse. */ + class ListDataScanJobsResponse implements IListDataScanJobsResponse { + + /** + * Constructs a new ListDataScanJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListDataScanJobsResponse); + + /** ListDataScanJobsResponse dataScanJobs. */ + public dataScanJobs: google.cloud.dataplex.v1.IDataScanJob[]; + + /** ListDataScanJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDataScanJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataScanJobsResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListDataScanJobsResponse): google.cloud.dataplex.v1.ListDataScanJobsResponse; + + /** + * Encodes the specified ListDataScanJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. + * @param message ListDataScanJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListDataScanJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataScanJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. + * @param message ListDataScanJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListDataScanJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataScanJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataScanJobsResponse + * @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.dataplex.v1.ListDataScanJobsResponse; + + /** + * Decodes a ListDataScanJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataScanJobsResponse + * @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.dataplex.v1.ListDataScanJobsResponse; + + /** + * Verifies a ListDataScanJobsResponse 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 ListDataScanJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataScanJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListDataScanJobsResponse; + + /** + * Creates a plain object from a ListDataScanJobsResponse message. Also converts values to other types if specified. + * @param message ListDataScanJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListDataScanJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataScanJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataScanJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataScan. */ + interface IDataScan { + + /** DataScan name */ + name?: (string|null); + + /** DataScan uid */ + uid?: (string|null); + + /** DataScan description */ + description?: (string|null); + + /** DataScan displayName */ + displayName?: (string|null); + + /** DataScan labels */ + labels?: ({ [k: string]: string }|null); + + /** DataScan state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + + /** DataScan createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataScan updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataScan data */ + data?: (google.cloud.dataplex.v1.IDataSource|null); + + /** DataScan executionSpec */ + executionSpec?: (google.cloud.dataplex.v1.DataScan.IExecutionSpec|null); + + /** DataScan executionStatus */ + executionStatus?: (google.cloud.dataplex.v1.DataScan.IExecutionStatus|null); + + /** DataScan type */ + type?: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType|null); + + /** DataScan dataQualitySpec */ + dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); + + /** DataScan dataProfileSpec */ + dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + + /** DataScan dataQualityResult */ + dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); + + /** DataScan dataProfileResult */ + dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + } + + /** Represents a DataScan. */ + class DataScan implements IDataScan { + + /** + * Constructs a new DataScan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataScan); + + /** DataScan name. */ + public name: string; + + /** DataScan uid. */ + public uid: string; + + /** DataScan description. */ + public description: string; + + /** DataScan displayName. */ + public displayName: string; + + /** DataScan labels. */ + public labels: { [k: string]: string }; + + /** DataScan state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** DataScan createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataScan updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataScan data. */ + public data?: (google.cloud.dataplex.v1.IDataSource|null); + + /** DataScan executionSpec. */ + public executionSpec?: (google.cloud.dataplex.v1.DataScan.IExecutionSpec|null); + + /** DataScan executionStatus. */ + public executionStatus?: (google.cloud.dataplex.v1.DataScan.IExecutionStatus|null); + + /** DataScan type. */ + public type: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType); + + /** DataScan dataQualitySpec. */ + public dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); + + /** DataScan dataProfileSpec. */ + public dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + + /** DataScan dataQualityResult. */ + public dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); + + /** DataScan dataProfileResult. */ + public dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + + /** DataScan spec. */ + public spec?: ("dataQualitySpec"|"dataProfileSpec"); + + /** DataScan result. */ + public result?: ("dataQualityResult"|"dataProfileResult"); + + /** + * Creates a new DataScan instance using the specified properties. + * @param [properties] Properties to set + * @returns DataScan instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataScan): google.cloud.dataplex.v1.DataScan; + + /** + * Encodes the specified DataScan message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. + * @param message DataScan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataScan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataScan message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. + * @param message DataScan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataScan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataScan + * @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.dataplex.v1.DataScan; + + /** + * Decodes a DataScan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataScan + * @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.dataplex.v1.DataScan; + + /** + * Verifies a DataScan 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 DataScan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataScan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScan; + + /** + * Creates a plain object from a DataScan message. Also converts values to other types if specified. + * @param message DataScan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataScan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataScan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataScan { + + /** Properties of an ExecutionSpec. */ + interface IExecutionSpec { + + /** ExecutionSpec trigger */ + trigger?: (google.cloud.dataplex.v1.ITrigger|null); + + /** ExecutionSpec field */ + field?: (string|null); + } + + /** Represents an ExecutionSpec. */ + class ExecutionSpec implements IExecutionSpec { + + /** + * Constructs a new ExecutionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScan.IExecutionSpec); + + /** ExecutionSpec trigger. */ + public trigger?: (google.cloud.dataplex.v1.ITrigger|null); + + /** ExecutionSpec field. */ + public field?: (string|null); + + /** ExecutionSpec incremental. */ + public incremental?: "field"; + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScan.IExecutionSpec): google.cloud.dataplex.v1.DataScan.ExecutionSpec; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScan.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScan.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionSpec + * @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.dataplex.v1.DataScan.ExecutionSpec; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionSpec + * @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.dataplex.v1.DataScan.ExecutionSpec; + + /** + * Verifies an ExecutionSpec 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 ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScan.ExecutionSpec; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @param message ExecutionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScan.ExecutionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecutionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecutionStatus. */ + interface IExecutionStatus { + + /** ExecutionStatus latestJobStartTime */ + latestJobStartTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJobEndTime */ + latestJobEndTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an ExecutionStatus. */ + class ExecutionStatus implements IExecutionStatus { + + /** + * Constructs a new ExecutionStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScan.IExecutionStatus); + + /** ExecutionStatus latestJobStartTime. */ + public latestJobStartTime?: (google.protobuf.ITimestamp|null); + + /** ExecutionStatus latestJobEndTime. */ + public latestJobEndTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScan.IExecutionStatus): google.cloud.dataplex.v1.DataScan.ExecutionStatus; + + /** + * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. + * @param message ExecutionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScan.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. + * @param message ExecutionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScan.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionStatus + * @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.dataplex.v1.DataScan.ExecutionStatus; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionStatus + * @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.dataplex.v1.DataScan.ExecutionStatus; + + /** + * Verifies an ExecutionStatus 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 ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScan.ExecutionStatus; + + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @param message ExecutionStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScan.ExecutionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecutionStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecutionStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataScanJob. */ + interface IDataScanJob { + + /** DataScanJob name */ + name?: (string|null); + + /** DataScanJob uid */ + uid?: (string|null); + + /** DataScanJob startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** DataScanJob endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** DataScanJob state */ + state?: (google.cloud.dataplex.v1.DataScanJob.State|keyof typeof google.cloud.dataplex.v1.DataScanJob.State|null); + + /** DataScanJob message */ + message?: (string|null); + + /** DataScanJob type */ + type?: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType|null); + + /** DataScanJob dataQualitySpec */ + dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); + + /** DataScanJob dataProfileSpec */ + dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + + /** DataScanJob dataQualityResult */ + dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); + + /** DataScanJob dataProfileResult */ + dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + } + + /** Represents a DataScanJob. */ + class DataScanJob implements IDataScanJob { + + /** + * Constructs a new DataScanJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDataScanJob); + + /** DataScanJob name. */ + public name: string; + + /** DataScanJob uid. */ + public uid: string; + + /** DataScanJob startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** DataScanJob endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** DataScanJob state. */ + public state: (google.cloud.dataplex.v1.DataScanJob.State|keyof typeof google.cloud.dataplex.v1.DataScanJob.State); + + /** DataScanJob message. */ + public message: string; + + /** DataScanJob type. */ + public type: (google.cloud.dataplex.v1.DataScanType|keyof typeof google.cloud.dataplex.v1.DataScanType); + + /** DataScanJob dataQualitySpec. */ + public dataQualitySpec?: (google.cloud.dataplex.v1.IDataQualitySpec|null); + + /** DataScanJob dataProfileSpec. */ + public dataProfileSpec?: (google.cloud.dataplex.v1.IDataProfileSpec|null); + + /** DataScanJob dataQualityResult. */ + public dataQualityResult?: (google.cloud.dataplex.v1.IDataQualityResult|null); + + /** DataScanJob dataProfileResult. */ + public dataProfileResult?: (google.cloud.dataplex.v1.IDataProfileResult|null); + + /** DataScanJob spec. */ + public spec?: ("dataQualitySpec"|"dataProfileSpec"); + + /** DataScanJob result. */ + public result?: ("dataQualityResult"|"dataProfileResult"); + + /** + * Creates a new DataScanJob instance using the specified properties. + * @param [properties] Properties to set + * @returns DataScanJob instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDataScanJob): google.cloud.dataplex.v1.DataScanJob; + + /** + * Encodes the specified DataScanJob message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. + * @param message DataScanJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDataScanJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataScanJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. + * @param message DataScanJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScanJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataScanJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataScanJob + * @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.dataplex.v1.DataScanJob; + + /** + * Decodes a DataScanJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataScanJob + * @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.dataplex.v1.DataScanJob; + + /** + * Verifies a DataScanJob 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 DataScanJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataScanJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanJob; + + /** + * Creates a plain object from a DataScanJob message. Also converts values to other types if specified. + * @param message DataScanJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataScanJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataScanJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataScanJob { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + CANCELING = 2, + CANCELLED = 3, + SUCCEEDED = 4, + FAILED = 5, + PENDING = 7 + } + } + + /** DataScanType enum. */ + enum DataScanType { + DATA_SCAN_TYPE_UNSPECIFIED = 0, + DATA_QUALITY = 1, + DATA_PROFILE = 2 + } + + /** Properties of a DiscoveryEvent. */ + interface IDiscoveryEvent { + + /** DiscoveryEvent message */ + message?: (string|null); + + /** DiscoveryEvent lakeId */ + lakeId?: (string|null); + + /** DiscoveryEvent zoneId */ + zoneId?: (string|null); + + /** DiscoveryEvent assetId */ + assetId?: (string|null); + + /** DiscoveryEvent dataLocation */ + dataLocation?: (string|null); + + /** DiscoveryEvent type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); + + /** DiscoveryEvent config */ + config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + + /** DiscoveryEvent entity */ + entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + + /** DiscoveryEvent partition */ + partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + + /** DiscoveryEvent action */ + action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + } + + /** Represents a DiscoveryEvent. */ + class DiscoveryEvent implements IDiscoveryEvent { + + /** + * Constructs a new DiscoveryEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDiscoveryEvent); + + /** DiscoveryEvent message. */ + public message: string; + + /** DiscoveryEvent lakeId. */ + public lakeId: string; + + /** DiscoveryEvent zoneId. */ + public zoneId: string; + + /** DiscoveryEvent assetId. */ + public assetId: string; + + /** DiscoveryEvent dataLocation. */ + public dataLocation: string; + + /** DiscoveryEvent type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); + + /** DiscoveryEvent config. */ + public config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + + /** DiscoveryEvent entity. */ + public entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + + /** DiscoveryEvent partition. */ + public partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + + /** DiscoveryEvent action. */ + public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + + /** DiscoveryEvent details. */ + public details?: ("config"|"entity"|"partition"|"action"); + + /** + * Creates a new DiscoveryEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDiscoveryEvent): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryEvent + * @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.dataplex.v1.DiscoveryEvent; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryEvent + * @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.dataplex.v1.DiscoveryEvent; + + /** + * Verifies a DiscoveryEvent 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 DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent; + + /** + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @param message DiscoveryEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoveryEvent { + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + CONFIG = 1, + ENTITY_CREATED = 2, + ENTITY_UPDATED = 3, + ENTITY_DELETED = 4, + PARTITION_CREATED = 5, + PARTITION_UPDATED = 6, + PARTITION_DELETED = 7 + } + + /** EntityType enum. */ + enum EntityType { + ENTITY_TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } + + /** Properties of a ConfigDetails. */ + interface IConfigDetails { + + /** ConfigDetails parameters */ + parameters?: ({ [k: string]: string }|null); + } + + /** Represents a ConfigDetails. */ + class ConfigDetails implements IConfigDetails { + + /** + * Constructs a new ConfigDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails); + + /** ConfigDetails parameters. */ + public parameters: { [k: string]: string }; + + /** + * Creates a new ConfigDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigDetails + * @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.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigDetails + * @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.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Verifies a ConfigDetails 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 ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @param message ConfigDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfigDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EntityDetails. */ + interface IEntityDetails { + + /** EntityDetails entity */ + entity?: (string|null); + + /** EntityDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + } + + /** Represents an EntityDetails. */ + class EntityDetails implements IEntityDetails { + + /** + * Constructs a new EntityDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails); + + /** EntityDetails entity. */ + public entity: string; + + /** EntityDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + + /** + * Creates a new EntityDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityDetails + * @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.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityDetails + * @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.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Verifies an EntityDetails 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 EntityDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @param message EntityDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntityDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartitionDetails. */ + interface IPartitionDetails { + + /** PartitionDetails partition */ + partition?: (string|null); + + /** PartitionDetails entity */ + entity?: (string|null); + + /** PartitionDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + + /** PartitionDetails sampledDataLocations */ + sampledDataLocations?: (string[]|null); + } + + /** Represents a PartitionDetails. */ + class PartitionDetails implements IPartitionDetails { + + /** + * Constructs a new PartitionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails); + + /** PartitionDetails partition. */ + public partition: string; + + /** PartitionDetails entity. */ + public entity: string; + + /** PartitionDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + + /** PartitionDetails sampledDataLocations. */ + public sampledDataLocations: string[]; + + /** + * Creates a new PartitionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PartitionDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartitionDetails + * @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.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionDetails + * @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.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Verifies a PartitionDetails 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 PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @param message PartitionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartitionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActionDetails. */ + interface IActionDetails { + + /** ActionDetails type */ + type?: (string|null); + } + + /** Represents an ActionDetails. */ + class ActionDetails implements IActionDetails { + + /** + * Constructs a new ActionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails); + + /** ActionDetails type. */ + public type: string; + + /** + * Creates a new ActionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ActionDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActionDetails + * @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.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActionDetails + * @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.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Verifies an ActionDetails 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 ActionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @param message ActionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActionDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a JobEvent. */ + interface IJobEvent { + + /** JobEvent message */ + message?: (string|null); + + /** JobEvent jobId */ + jobId?: (string|null); + + /** JobEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent state */ + state?: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State|null); + + /** JobEvent retries */ + retries?: (number|null); + + /** JobEvent type */ + type?: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type|null); + + /** JobEvent service */ + service?: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service|null); + + /** JobEvent serviceJob */ + serviceJob?: (string|null); + } + + /** Represents a JobEvent. */ + class JobEvent implements IJobEvent { + + /** + * Constructs a new JobEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IJobEvent); + + /** JobEvent message. */ + public message: string; + + /** JobEvent jobId. */ + public jobId: string; + + /** JobEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** JobEvent endTime. */ public endTime?: (google.protobuf.ITimestamp|null); - /** JobEvent state. */ - public state: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State); + /** JobEvent state. */ + public state: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State); + + /** JobEvent retries. */ + public retries: number; + + /** JobEvent type. */ + public type: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type); + + /** JobEvent service. */ + public service: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service); + + /** JobEvent serviceJob. */ + public serviceJob: string; + + /** + * Creates a new JobEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns JobEvent instance + */ + public static create(properties?: google.cloud.dataplex.v1.IJobEvent): google.cloud.dataplex.v1.JobEvent; + + /** + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobEvent + * @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.dataplex.v1.JobEvent; + + /** + * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobEvent + * @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.dataplex.v1.JobEvent; + + /** + * Verifies a JobEvent 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 JobEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.JobEvent; + + /** + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @param message JobEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.JobEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JobEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace JobEvent { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + SPARK = 1, + NOTEBOOK = 2 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + CANCELLED = 3, + ABORTED = 4 + } + + /** Service enum. */ + enum Service { + SERVICE_UNSPECIFIED = 0, + DATAPROC = 1 + } + } + + /** Properties of a SessionEvent. */ + interface ISessionEvent { + + /** SessionEvent message */ + message?: (string|null); + + /** SessionEvent userId */ + userId?: (string|null); + + /** SessionEvent sessionId */ + sessionId?: (string|null); + + /** SessionEvent type */ + type?: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType|null); + + /** SessionEvent query */ + query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + + /** SessionEvent eventSucceeded */ + eventSucceeded?: (boolean|null); + + /** SessionEvent fastStartupEnabled */ + fastStartupEnabled?: (boolean|null); + + /** SessionEvent unassignedDuration */ + unassignedDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a SessionEvent. */ + class SessionEvent implements ISessionEvent { + + /** + * Constructs a new SessionEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISessionEvent); + + /** SessionEvent message. */ + public message: string; + + /** SessionEvent userId. */ + public userId: string; + + /** SessionEvent sessionId. */ + public sessionId: string; + + /** SessionEvent type. */ + public type: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType); + + /** SessionEvent query. */ + public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); - /** JobEvent retries. */ - public retries: number; + /** SessionEvent eventSucceeded. */ + public eventSucceeded: boolean; - /** JobEvent type. */ - public type: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type); + /** SessionEvent fastStartupEnabled. */ + public fastStartupEnabled: boolean; - /** JobEvent service. */ - public service: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service); + /** SessionEvent unassignedDuration. */ + public unassignedDuration?: (google.protobuf.IDuration|null); - /** JobEvent serviceJob. */ - public serviceJob: string; + /** SessionEvent detail. */ + public detail?: "query"; /** - * Creates a new JobEvent instance using the specified properties. + * Creates a new SessionEvent instance using the specified properties. * @param [properties] Properties to set - * @returns JobEvent instance + * @returns SessionEvent instance */ - public static create(properties?: google.cloud.dataplex.v1.IJobEvent): google.cloud.dataplex.v1.JobEvent; + public static create(properties?: google.cloud.dataplex.v1.ISessionEvent): google.cloud.dataplex.v1.SessionEvent; /** - * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. - * @param message JobEvent message or plain object to encode + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. - * @param message JobEvent message or plain object to encode + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a JobEvent message from the specified reader or buffer. + * Decodes a SessionEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns JobEvent + * @returns SessionEvent * @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.dataplex.v1.JobEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent; /** - * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns JobEvent + * @returns SessionEvent * @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.dataplex.v1.JobEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent; /** - * Verifies a JobEvent message. + * Verifies a SessionEvent 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 JobEvent message from a plain object. Also converts values to their respective internal types. + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns JobEvent + * @returns SessionEvent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.JobEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent; /** - * Creates a plain object from a JobEvent message. Also converts values to other types if specified. - * @param message JobEvent + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @param message SessionEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.JobEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.SessionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this JobEvent to JSON. + * Converts this SessionEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for JobEvent + * Gets the default type url for SessionEvent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace JobEvent { + namespace SessionEvent { - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - SPARK = 1, - NOTEBOOK = 2 + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + START = 1, + STOP = 2, + QUERY = 3, + CREATE = 4 } - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - SUCCEEDED = 1, - FAILED = 2, - CANCELLED = 3, - ABORTED = 4 + /** Properties of a QueryDetail. */ + interface IQueryDetail { + + /** QueryDetail queryId */ + queryId?: (string|null); + + /** QueryDetail queryText */ + queryText?: (string|null); + + /** QueryDetail engine */ + engine?: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null); + + /** QueryDetail duration */ + duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes */ + resultSizeBytes?: (number|Long|string|null); + + /** QueryDetail dataProcessedBytes */ + dataProcessedBytes?: (number|Long|string|null); } - /** Service enum. */ - enum Service { - SERVICE_UNSPECIFIED = 0, - DATAPROC = 1 + /** Represents a QueryDetail. */ + class QueryDetail implements IQueryDetail { + + /** + * Constructs a new QueryDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail); + + /** QueryDetail queryId. */ + public queryId: string; + + /** QueryDetail queryText. */ + public queryText: string; + + /** QueryDetail engine. */ + public engine: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine); + + /** QueryDetail duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes. */ + public resultSizeBytes: (number|Long|string); + + /** QueryDetail dataProcessedBytes. */ + public dataProcessedBytes: (number|Long|string); + + /** + * Creates a new QueryDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDetail instance + */ + public static create(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDetail + * @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.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDetail + * @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.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Verifies a QueryDetail 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 QueryDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @param message QueryDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SessionEvent.QueryDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QueryDetail { + + /** Engine enum. */ + enum Engine { + ENGINE_UNSPECIFIED = 0, + SPARK_SQL = 1, + BIGQUERY = 2 + } } } - /** Properties of a SessionEvent. */ - interface ISessionEvent { + /** Properties of a DataScanEvent. */ + interface IDataScanEvent { - /** SessionEvent message */ - message?: (string|null); + /** DataScanEvent dataSource */ + dataSource?: (string|null); - /** SessionEvent userId */ - userId?: (string|null); + /** DataScanEvent jobId */ + jobId?: (string|null); - /** SessionEvent sessionId */ - sessionId?: (string|null); + /** DataScanEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** SessionEvent type */ - type?: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType|null); + /** DataScanEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** SessionEvent query */ - query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + /** DataScanEvent type */ + type?: (google.cloud.dataplex.v1.DataScanEvent.ScanType|keyof typeof google.cloud.dataplex.v1.DataScanEvent.ScanType|null); - /** SessionEvent eventSucceeded */ - eventSucceeded?: (boolean|null); + /** DataScanEvent state */ + state?: (google.cloud.dataplex.v1.DataScanEvent.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.State|null); - /** SessionEvent fastStartupEnabled */ - fastStartupEnabled?: (boolean|null); + /** DataScanEvent message */ + message?: (string|null); - /** SessionEvent unassignedDuration */ - unassignedDuration?: (google.protobuf.IDuration|null); + /** DataScanEvent specVersion */ + specVersion?: (string|null); + + /** DataScanEvent trigger */ + trigger?: (google.cloud.dataplex.v1.DataScanEvent.Trigger|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Trigger|null); + + /** DataScanEvent scope */ + scope?: (google.cloud.dataplex.v1.DataScanEvent.Scope|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Scope|null); + + /** DataScanEvent dataProfile */ + dataProfile?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null); + + /** DataScanEvent dataQuality */ + dataQuality?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null); } - /** Represents a SessionEvent. */ - class SessionEvent implements ISessionEvent { + /** Represents a DataScanEvent. */ + class DataScanEvent implements IDataScanEvent { /** - * Constructs a new SessionEvent. + * Constructs a new DataScanEvent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ISessionEvent); + constructor(properties?: google.cloud.dataplex.v1.IDataScanEvent); - /** SessionEvent message. */ - public message: string; + /** DataScanEvent dataSource. */ + public dataSource: string; - /** SessionEvent userId. */ - public userId: string; + /** DataScanEvent jobId. */ + public jobId: string; - /** SessionEvent sessionId. */ - public sessionId: string; + /** DataScanEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** SessionEvent type. */ - public type: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType); + /** DataScanEvent endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** SessionEvent query. */ - public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + /** DataScanEvent type. */ + public type: (google.cloud.dataplex.v1.DataScanEvent.ScanType|keyof typeof google.cloud.dataplex.v1.DataScanEvent.ScanType); - /** SessionEvent eventSucceeded. */ - public eventSucceeded: boolean; + /** DataScanEvent state. */ + public state: (google.cloud.dataplex.v1.DataScanEvent.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.State); - /** SessionEvent fastStartupEnabled. */ - public fastStartupEnabled: boolean; + /** DataScanEvent message. */ + public message: string; - /** SessionEvent unassignedDuration. */ - public unassignedDuration?: (google.protobuf.IDuration|null); + /** DataScanEvent specVersion. */ + public specVersion: string; - /** SessionEvent detail. */ - public detail?: "query"; + /** DataScanEvent trigger. */ + public trigger: (google.cloud.dataplex.v1.DataScanEvent.Trigger|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Trigger); + + /** DataScanEvent scope. */ + public scope: (google.cloud.dataplex.v1.DataScanEvent.Scope|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Scope); + + /** DataScanEvent dataProfile. */ + public dataProfile?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null); + + /** DataScanEvent dataQuality. */ + public dataQuality?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null); + + /** DataScanEvent result. */ + public result?: ("dataProfile"|"dataQuality"); /** - * Creates a new SessionEvent instance using the specified properties. + * Creates a new DataScanEvent instance using the specified properties. * @param [properties] Properties to set - * @returns SessionEvent instance + * @returns DataScanEvent instance */ - public static create(properties?: google.cloud.dataplex.v1.ISessionEvent): google.cloud.dataplex.v1.SessionEvent; + public static create(properties?: google.cloud.dataplex.v1.IDataScanEvent): google.cloud.dataplex.v1.DataScanEvent; /** - * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @param message SessionEvent message or plain object to encode + * Encodes the specified DataScanEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. + * @param message DataScanEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDataScanEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @param message SessionEvent message or plain object to encode + * Encodes the specified DataScanEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. + * @param message DataScanEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScanEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SessionEvent message from the specified reader or buffer. + * Decodes a DataScanEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SessionEvent + * @returns DataScanEvent * @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.dataplex.v1.SessionEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent; /** - * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * Decodes a DataScanEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SessionEvent + * @returns DataScanEvent * @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.dataplex.v1.SessionEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent; /** - * Verifies a SessionEvent message. + * Verifies a DataScanEvent 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 SessionEvent message from a plain object. Also converts values to their respective internal types. + * Creates a DataScanEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SessionEvent + * @returns DataScanEvent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent; /** - * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. - * @param message SessionEvent + * Creates a plain object from a DataScanEvent message. Also converts values to other types if specified. + * @param message DataScanEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.SessionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SessionEvent to JSON. + * Converts this DataScanEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SessionEvent + * Gets the default type url for DataScanEvent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SessionEvent { + namespace DataScanEvent { - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - START = 1, - STOP = 2, - QUERY = 3, - CREATE = 4 + /** ScanType enum. */ + enum ScanType { + SCAN_TYPE_UNSPECIFIED = 0, + DATA_PROFILE = 1, + DATA_QUALITY = 2 } - /** Properties of a QueryDetail. */ - interface IQueryDetail { + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STARTED = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4 + } - /** QueryDetail queryId */ - queryId?: (string|null); + /** Trigger enum. */ + enum Trigger { + TRIGGER_UNSPECIFIED = 0, + ON_DEMAND = 1, + SCHEDULE = 2 + } - /** QueryDetail queryText */ - queryText?: (string|null); + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + FULL = 1, + INCREMENTAL = 2 + } - /** QueryDetail engine */ - engine?: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null); + /** Properties of a DataProfileResult. */ + interface IDataProfileResult { - /** QueryDetail duration */ - duration?: (google.protobuf.IDuration|null); + /** DataProfileResult rowCount */ + rowCount?: (number|Long|string|null); + } - /** QueryDetail resultSizeBytes */ - resultSizeBytes?: (number|Long|string|null); + /** Represents a DataProfileResult. */ + class DataProfileResult implements IDataProfileResult { - /** QueryDetail dataProcessedBytes */ - dataProcessedBytes?: (number|Long|string|null); - } + /** + * Constructs a new DataProfileResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult); - /** Represents a QueryDetail. */ - class QueryDetail implements IQueryDetail { + /** DataProfileResult rowCount. */ + public rowCount: (number|Long|string); /** - * Constructs a new QueryDetail. + * Creates a new DataProfileResult instance using the specified properties. * @param [properties] Properties to set + * @returns DataProfileResult instance */ - constructor(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail); + public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; - /** QueryDetail queryId. */ - public queryId: string; + /** + * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @param message DataProfileResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** QueryDetail queryText. */ - public queryText: string; + /** + * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @param message DataProfileResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** QueryDetail engine. */ - public engine: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine); + /** + * Decodes a DataProfileResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileResult + * @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.dataplex.v1.DataScanEvent.DataProfileResult; - /** QueryDetail duration. */ - public duration?: (google.protobuf.IDuration|null); + /** + * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileResult + * @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.dataplex.v1.DataScanEvent.DataProfileResult; - /** QueryDetail resultSizeBytes. */ - public resultSizeBytes: (number|Long|string); + /** + * Verifies a DataProfileResult 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); - /** QueryDetail dataProcessedBytes. */ - public dataProcessedBytes: (number|Long|string); + /** + * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; /** - * Creates a new QueryDetail instance using the specified properties. + * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. + * @param message DataProfileResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityResult. */ + interface IDataQualityResult { + + /** DataQualityResult rowCount */ + rowCount?: (number|Long|string|null); + + /** DataQualityResult passed */ + passed?: (boolean|null); + + /** DataQualityResult dimensionPassed */ + dimensionPassed?: ({ [k: string]: boolean }|null); + } + + /** Represents a DataQualityResult. */ + class DataQualityResult implements IDataQualityResult { + + /** + * Constructs a new DataQualityResult. * @param [properties] Properties to set - * @returns QueryDetail instance */ - public static create(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult); + + /** DataQualityResult rowCount. */ + public rowCount: (number|Long|string); + + /** DataQualityResult passed. */ + public passed: boolean; + + /** DataQualityResult dimensionPassed. */ + public dimensionPassed: { [k: string]: boolean }; /** - * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @param message QueryDetail message or plain object to encode + * Creates a new DataQualityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; + + /** + * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. + * @param message DataQualityResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @param message QueryDetail message or plain object to encode + * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. + * @param message DataQualityResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryDetail message from the specified reader or buffer. + * Decodes a DataQualityResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryDetail + * @returns DataQualityResult * @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.dataplex.v1.SessionEvent.QueryDetail; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; /** - * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryDetail + * @returns DataQualityResult * @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.dataplex.v1.SessionEvent.QueryDetail; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; /** - * Verifies a QueryDetail message. + * Verifies a DataQualityResult 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 QueryDetail message from a plain object. Also converts values to their respective internal types. + * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryDetail + * @returns DataQualityResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; /** - * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. - * @param message QueryDetail + * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. + * @param message DataQualityResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.SessionEvent.QueryDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryDetail to JSON. + * Converts this DataQualityResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for QueryDetail + * Gets the default type url for DataQualityResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - namespace QueryDetail { - - /** Engine enum. */ - enum Engine { - ENGINE_UNSPECIFIED = 0, - SPARK_SQL = 1, - BIGQUERY = 2 - } - } } /** Represents a MetadataService */ @@ -8799,6 +14207,9 @@ export namespace google { /** StorageFormat json */ json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + + /** StorageFormat iceberg */ + iceberg?: (google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null); } /** Represents a StorageFormat. */ @@ -8825,8 +14236,11 @@ export namespace google { /** StorageFormat json. */ public json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + /** StorageFormat iceberg. */ + public iceberg?: (google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null); + /** StorageFormat options. */ - public options?: ("csv"|"json"); + public options?: ("csv"|"json"|"iceberg"); /** * Creates a new StorageFormat instance using the specified properties. @@ -9120,6 +14534,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an IcebergOptions. */ + interface IIcebergOptions { + + /** IcebergOptions metadataLocation */ + metadataLocation?: (string|null); + } + + /** Represents an IcebergOptions. */ + class IcebergOptions implements IIcebergOptions { + + /** + * Constructs a new IcebergOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions); + + /** IcebergOptions metadataLocation. */ + public metadataLocation: string; + + /** + * Creates a new IcebergOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns IcebergOptions instance + */ + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; + + /** + * Encodes the specified IcebergOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. + * @param message IcebergOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IcebergOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. + * @param message IcebergOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IcebergOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IcebergOptions + * @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.dataplex.v1.StorageFormat.IcebergOptions; + + /** + * Decodes an IcebergOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IcebergOptions + * @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.dataplex.v1.StorageFormat.IcebergOptions; + + /** + * Verifies an IcebergOptions 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 IcebergOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IcebergOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; + + /** + * Creates a plain object from an IcebergOptions message. Also converts values to other types if specified. + * @param message IcebergOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.IcebergOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IcebergOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IcebergOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Format enum. */ enum Format { FORMAT_UNSPECIFIED = 0, diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js index 70dfacd9bef..0b22f9455a8 100644 --- a/packages/google-cloud-dataplex/protos/protos.js +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -13866,33 +13866,23 @@ return GetContentRequest; })(); - v1.DiscoveryEvent = (function() { + v1.DataProfileSpec = (function() { /** - * Properties of a DiscoveryEvent. + * Properties of a DataProfileSpec. * @memberof google.cloud.dataplex.v1 - * @interface IDiscoveryEvent - * @property {string|null} [message] DiscoveryEvent message - * @property {string|null} [lakeId] DiscoveryEvent lakeId - * @property {string|null} [zoneId] DiscoveryEvent zoneId - * @property {string|null} [assetId] DiscoveryEvent assetId - * @property {string|null} [dataLocation] DiscoveryEvent dataLocation - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action + * @interface IDataProfileSpec */ /** - * Constructs a new DiscoveryEvent. + * Constructs a new DataProfileSpec. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DiscoveryEvent. - * @implements IDiscoveryEvent + * @classdesc Represents a DataProfileSpec. + * @implements IDataProfileSpec * @constructor - * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDataProfileSpec=} [properties] Properties to set */ - function DiscoveryEvent(properties) { + function DataProfileSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13900,215 +13890,281 @@ } /** - * DiscoveryEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance + * Creates a new DataProfileSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {google.cloud.dataplex.v1.IDataProfileSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec instance */ - DiscoveryEvent.prototype.message = ""; + DataProfileSpec.create = function create(properties) { + return new DataProfileSpec(properties); + }; /** - * DiscoveryEvent lakeId. - * @member {string} lakeId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance + * Encodes the specified DataProfileSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {google.cloud.dataplex.v1.IDataProfileSpec} message DataProfileSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - DiscoveryEvent.prototype.lakeId = ""; + DataProfileSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * DiscoveryEvent zoneId. - * @member {string} zoneId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance + * Encodes the specified DataProfileSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {google.cloud.dataplex.v1.IDataProfileSpec} message DataProfileSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - DiscoveryEvent.prototype.zoneId = ""; + DataProfileSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * DiscoveryEvent assetId. - * @member {string} assetId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance + * Decodes a DataProfileSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryEvent.prototype.assetId = ""; + DataProfileSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * DiscoveryEvent dataLocation. - * @member {string} dataLocation - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance + * Decodes a DataProfileSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryEvent.prototype.dataLocation = ""; + DataProfileSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * DiscoveryEvent type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance + * Verifies a DataProfileSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryEvent.prototype.type = 0; + DataProfileSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * DiscoveryEvent config. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null|undefined} config - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance + * Creates a DataProfileSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileSpec} DataProfileSpec */ - DiscoveryEvent.prototype.config = null; + DataProfileSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileSpec) + return object; + return new $root.google.cloud.dataplex.v1.DataProfileSpec(); + }; /** - * DiscoveryEvent entity. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null|undefined} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @instance + * Creates a plain object from a DataProfileSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {google.cloud.dataplex.v1.DataProfileSpec} message DataProfileSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - DiscoveryEvent.prototype.entity = null; + DataProfileSpec.toObject = function toObject() { + return {}; + }; /** - * DiscoveryEvent partition. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null|undefined} partition - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Converts this DataProfileSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileSpec * @instance + * @returns {Object.} JSON object */ - DiscoveryEvent.prototype.partition = null; + DataProfileSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * DiscoveryEvent action. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null|undefined} action - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Gets the default type url for DataProfileSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileSpec"; + }; + + return DataProfileSpec; + })(); + + v1.DataProfileResult = (function() { + + /** + * Properties of a DataProfileResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataProfileResult + * @property {number|Long|null} [rowCount] DataProfileResult rowCount + * @property {google.cloud.dataplex.v1.DataProfileResult.IProfile|null} [profile] DataProfileResult profile + * @property {google.cloud.dataplex.v1.IScannedData|null} [scannedData] DataProfileResult scannedData + */ + + /** + * Constructs a new DataProfileResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataProfileResult. + * @implements IDataProfileResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataProfileResult=} [properties] Properties to set + */ + function DataProfileResult(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]]; + } + + /** + * DataProfileResult rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.dataplex.v1.DataProfileResult * @instance */ - DiscoveryEvent.prototype.action = null; + DataProfileResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * DataProfileResult profile. + * @member {google.cloud.dataplex.v1.DataProfileResult.IProfile|null|undefined} profile + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @instance + */ + DataProfileResult.prototype.profile = null; /** - * DiscoveryEvent details. - * @member {"config"|"entity"|"partition"|"action"|undefined} details - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * DataProfileResult scannedData. + * @member {google.cloud.dataplex.v1.IScannedData|null|undefined} scannedData + * @memberof google.cloud.dataplex.v1.DataProfileResult * @instance */ - Object.defineProperty(DiscoveryEvent.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action"]), - set: $util.oneOfSetter($oneOfFields) - }); + DataProfileResult.prototype.scannedData = null; /** - * Creates a new DiscoveryEvent instance using the specified properties. + * Creates a new DataProfileResult instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.DataProfileResult * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent instance + * @param {google.cloud.dataplex.v1.IDataProfileResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult instance */ - DiscoveryEvent.create = function create(properties) { - return new DiscoveryEvent(properties); + DataProfileResult.create = function create(properties) { + return new DataProfileResult(properties); }; /** - * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.DataProfileResult * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IDataProfileResult} message DataProfileResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryEvent.encode = function encode(message, writer) { + DataProfileResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); - if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.zoneId); - if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); - if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.encode(message.config, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.encode(message.entity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.rowCount); + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.encode(message.profile, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.scannedData != null && Object.hasOwnProperty.call(message, "scannedData")) + $root.google.cloud.dataplex.v1.ScannedData.encode(message.scannedData, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.DataProfileResult * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IDataProfileResult} message DataProfileResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryEvent.encodeDelimited = function encodeDelimited(message, writer) { + DataProfileResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer. + * Decodes a DataProfileResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.DataProfileResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryEvent.decode = function decode(reader, length) { + DataProfileResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.message = reader.string(); - break; - } - case 2: { - message.lakeId = reader.string(); - break; - } case 3: { - message.zoneId = reader.string(); + message.rowCount = reader.int64(); break; } case 4: { - message.assetId = reader.string(); + message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.decode(reader, reader.uint32()); break; } case 5: { - message.dataLocation = reader.string(); - break; - } - case 10: { - message.type = reader.int32(); - break; - } - case 20: { - message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); - break; - } - case 21: { - message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); - break; - } - case 22: { - message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); - break; - } - case 23: { - message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); + message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.decode(reader, reader.uint32()); break; } default: @@ -14120,331 +14176,161 @@ }; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.DataProfileResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryEvent.decodeDelimited = function decodeDelimited(reader) { + DataProfileResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryEvent message. + * Verifies a DataProfileResult message. * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.DataProfileResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryEvent.verify = function verify(message) { + DataProfileResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - if (!$util.isString(message.lakeId)) - return "lakeId: string expected"; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - if (!$util.isString(message.zoneId)) - return "zoneId: string expected"; - if (message.assetId != null && message.hasOwnProperty("assetId")) - if (!$util.isString(message.assetId)) - return "assetId: string expected"; - if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) - if (!$util.isString(message.dataLocation)) - return "dataLocation: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.config != null && message.hasOwnProperty("config")) { - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify(message.config); - if (error) - return "config." + error; - } - } - if (message.entity != null && message.hasOwnProperty("entity")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify(message.entity); - if (error) - return "entity." + error; - } - } - if (message.partition != null && message.hasOwnProperty("partition")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify(message.partition); - if (error) - return "partition." + error; - } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + if (message.profile != null && message.hasOwnProperty("profile")) { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.verify(message.profile); + if (error) + return "profile." + error; } - if (message.action != null && message.hasOwnProperty("action")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify(message.action); - if (error) - return "action." + error; - } + if (message.scannedData != null && message.hasOwnProperty("scannedData")) { + var error = $root.google.cloud.dataplex.v1.ScannedData.verify(message.scannedData); + if (error) + return "scannedData." + error; } return null; }; /** - * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.DataProfileResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @returns {google.cloud.dataplex.v1.DataProfileResult} DataProfileResult */ - DiscoveryEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent) + DataProfileResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult) return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.lakeId != null) - message.lakeId = String(object.lakeId); - if (object.zoneId != null) - message.zoneId = String(object.zoneId); - if (object.assetId != null) - message.assetId = String(object.assetId); - if (object.dataLocation != null) - message.dataLocation = String(object.dataLocation); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "EVENT_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "CONFIG": - case 1: - message.type = 1; - break; - case "ENTITY_CREATED": - case 2: - message.type = 2; - break; - case "ENTITY_UPDATED": - case 3: - message.type = 3; - break; - case "ENTITY_DELETED": - case 4: - message.type = 4; - break; - case "PARTITION_CREATED": - case 5: - message.type = 5; - break; - case "PARTITION_UPDATED": - case 6: - message.type = 6; - break; - case "PARTITION_DELETED": - case 7: - message.type = 7; - break; - } - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.config: object expected"); - message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.fromObject(object.config); - } - if (object.entity != null) { - if (typeof object.entity !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.entity: object expected"); - message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.fromObject(object.entity); - } - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.partition: object expected"); - message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.fromObject(object.partition); - } - if (object.action != null) { - if (typeof object.action !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); - message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); + var message = new $root.google.cloud.dataplex.v1.DataProfileResult(); + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + if (object.profile != null) { + if (typeof object.profile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.profile: object expected"); + message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.fromObject(object.profile); + } + if (object.scannedData != null) { + if (typeof object.scannedData !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.scannedData: object expected"); + message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.fromObject(object.scannedData); } return message; }; /** - * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.DataProfileResult * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent} message DiscoveryEvent + * @param {google.cloud.dataplex.v1.DataProfileResult} message DataProfileResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryEvent.toObject = function toObject(message, options) { + DataProfileResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.message = ""; - object.lakeId = ""; - object.zoneId = ""; - object.assetId = ""; - object.dataLocation = ""; - object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - object.lakeId = message.lakeId; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - object.zoneId = message.zoneId; - if (message.assetId != null && message.hasOwnProperty("assetId")) - object.assetId = message.assetId; - if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) - object.dataLocation = message.dataLocation; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; - if (message.config != null && message.hasOwnProperty("config")) { - object.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.toObject(message.config, options); - if (options.oneofs) - object.details = "config"; - } - if (message.entity != null && message.hasOwnProperty("entity")) { - object.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.toObject(message.entity, options); - if (options.oneofs) - object.details = "entity"; - } - if (message.partition != null && message.hasOwnProperty("partition")) { - object.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.toObject(message.partition, options); - if (options.oneofs) - object.details = "partition"; - } - if (message.action != null && message.hasOwnProperty("action")) { - object.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.toObject(message.action, options); - if (options.oneofs) - object.details = "action"; - } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + object.profile = null; + object.scannedData = null; + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + if (message.profile != null && message.hasOwnProperty("profile")) + object.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.toObject(message.profile, options); + if (message.scannedData != null && message.hasOwnProperty("scannedData")) + object.scannedData = $root.google.cloud.dataplex.v1.ScannedData.toObject(message.scannedData, options); return object; }; /** - * Converts this DiscoveryEvent to JSON. + * Converts this DataProfileResult to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.DataProfileResult * @instance * @returns {Object.} JSON object */ - DiscoveryEvent.prototype.toJSON = function toJSON() { + DataProfileResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryEvent + * Gets the default type url for DataProfileResult * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @memberof google.cloud.dataplex.v1.DataProfileResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataProfileResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult"; }; - /** - * EventType enum. - * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType - * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} CONFIG=1 CONFIG value - * @property {number} ENTITY_CREATED=2 ENTITY_CREATED value - * @property {number} ENTITY_UPDATED=3 ENTITY_UPDATED value - * @property {number} ENTITY_DELETED=4 ENTITY_DELETED value - * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value - * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value - * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value - */ - DiscoveryEvent.EventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONFIG"] = 1; - values[valuesById[2] = "ENTITY_CREATED"] = 2; - values[valuesById[3] = "ENTITY_UPDATED"] = 3; - values[valuesById[4] = "ENTITY_DELETED"] = 4; - values[valuesById[5] = "PARTITION_CREATED"] = 5; - values[valuesById[6] = "PARTITION_UPDATED"] = 6; - values[valuesById[7] = "PARTITION_DELETED"] = 7; - return values; - })(); - - /** - * EntityType enum. - * @name google.cloud.dataplex.v1.DiscoveryEvent.EntityType - * @enum {number} - * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value - * @property {number} TABLE=1 TABLE value - * @property {number} FILESET=2 FILESET value - */ - DiscoveryEvent.EntityType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLE"] = 1; - values[valuesById[2] = "FILESET"] = 2; - return values; - })(); - - DiscoveryEvent.ConfigDetails = (function() { + DataProfileResult.Profile = (function() { /** - * Properties of a ConfigDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IConfigDetails - * @property {Object.|null} [parameters] ConfigDetails parameters + * Properties of a Profile. + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @interface IProfile + * @property {Array.|null} [fields] Profile fields */ /** - * Constructs a new ConfigDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents a ConfigDetails. - * @implements IConfigDetails + * Constructs a new Profile. + * @memberof google.cloud.dataplex.v1.DataProfileResult + * @classdesc Represents a Profile. + * @implements IProfile * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile=} [properties] Properties to set */ - function ConfigDetails(properties) { - this.parameters = {}; + function Profile(properties) { + this.fields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14452,95 +14338,78 @@ } /** - * ConfigDetails parameters. - * @member {Object.} parameters - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * Profile fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @instance */ - ConfigDetails.prototype.parameters = $util.emptyObject; + Profile.prototype.fields = $util.emptyArray; /** - * Creates a new ConfigDetails instance using the specified properties. + * Creates a new Profile instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails instance + * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile instance */ - ConfigDetails.create = function create(properties) { - return new ConfigDetails(properties); + Profile.create = function create(properties) { + return new Profile(properties); }; /** - * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * Encodes the specified Profile message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile} message Profile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfigDetails.encode = function encode(message, writer) { + Profile.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.parameters[keys[i]]).ldelim(); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * Encodes the specified Profile message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {google.cloud.dataplex.v1.DataProfileResult.IProfile} message Profile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { + Profile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConfigDetails message from the specified reader or buffer. + * Decodes a Profile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConfigDetails.decode = function decode(reader, length) { + Profile.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (message.parameters === $util.emptyObject) - message.parameters = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.parameters[key] = value; + case 2: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.decode(reader, reader.uint32())); break; } default: @@ -14552,701 +14421,2443 @@ }; /** - * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * Decodes a Profile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConfigDetails.decodeDelimited = function decodeDelimited(reader) { + Profile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConfigDetails message. + * Verifies a Profile message. * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConfigDetails.verify = function verify(message) { + Profile.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!$util.isObject(message.parameters)) - return "parameters: object expected"; - var key = Object.keys(message.parameters); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.parameters[key[i]])) - return "parameters: string{k:string} expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify(message.fields[i]); + if (error) + return "fields." + error; + } } return null; }; /** - * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * Creates a Profile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile} Profile */ - ConfigDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) + Profile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile) return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(); - if (object.parameters) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parameters: object expected"); - message.parameters = {}; - for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) - message.parameters[keys[i]] = String(object.parameters[keys[i]]); + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.fromObject(object.fields[i]); + } } return message; }; /** - * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * Creates a plain object from a Profile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} message ConfigDetails + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile} message Profile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConfigDetails.toObject = function toObject(message, options) { + Profile.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.parameters = {}; - var keys2; - if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { - object.parameters = {}; - for (var j = 0; j < keys2.length; ++j) - object.parameters[keys2[j]] = message.parameters[keys2[j]]; + if (options.arrays || options.defaults) + object.fields = []; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.toObject(message.fields[j], options); } return object; }; /** - * Converts this ConfigDetails to JSON. + * Converts this Profile to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @instance * @returns {Object.} JSON object */ - ConfigDetails.prototype.toJSON = function toJSON() { + Profile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConfigDetails + * Gets the default type url for Profile * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConfigDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Profile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile"; }; - return ConfigDetails; - })(); - - DiscoveryEvent.EntityDetails = (function() { + Profile.Field = (function() { - /** - * Properties of an EntityDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IEntityDetails - * @property {string|null} [entity] EntityDetails entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] EntityDetails type - */ + /** + * Properties of a Field. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @interface IField + * @property {string|null} [name] Field name + * @property {string|null} [type] Field type + * @property {string|null} [mode] Field mode + * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null} [profile] Field profile + */ - /** - * Constructs a new EntityDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents an EntityDetails. - * @implements IEntityDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set - */ - function EntityDetails(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]]; - } + /** + * Constructs a new Field. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile + * @classdesc Represents a Field. + * @implements IField + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField=} [properties] Properties to set + */ + function Field(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]]; + } - /** - * EntityDetails entity. - * @member {string} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - */ - EntityDetails.prototype.entity = ""; + /** + * Field name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @instance + */ + Field.prototype.name = ""; - /** - * EntityDetails type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - */ - EntityDetails.prototype.type = 0; + /** + * Field type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @instance + */ + Field.prototype.type = ""; - /** - * Creates a new EntityDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails instance - */ - EntityDetails.create = function create(properties) { - return new EntityDetails(properties); - }; + /** + * Field mode. + * @member {string} mode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @instance + */ + Field.prototype.mode = ""; - /** - * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; + /** + * Field profile. + * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo|null|undefined} profile + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @instance + */ + Field.prototype.profile = null; - /** - * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Field instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field instance + */ + Field.create = function create(properties) { + return new Field(properties); + }; - /** - * Decodes an EntityDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entity = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified Field message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mode); + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.encode(message.profile, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Decodes an EntityDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EntityDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntityDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entity != null && message.hasOwnProperty("entity")) - if (!$util.isString(message.entity)) - return "entity: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - */ - EntityDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); - if (object.entity != null) - message.entity = String(object.entity); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; + /** + * Decodes a Field message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.mode = reader.string(); + break; + } + case 4: { + message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - break; - case "ENTITY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} message EntityDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntityDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entity = ""; - object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; - } - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = message.entity; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; - return object; - }; + return message; + }; - /** - * Converts this EntityDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - * @returns {Object.} JSON object - */ - EntityDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for EntityDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EntityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"; - }; + /** + * Verifies a Field message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Field.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + if (!$util.isString(message.mode)) + return "mode: string expected"; + if (message.profile != null && message.hasOwnProperty("profile")) { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify(message.profile); + if (error) + return "profile." + error; + } + return null; + }; - return EntityDetails; - })(); + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} Field + */ + Field.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.mode != null) + message.mode = String(object.mode); + if (object.profile != null) { + if (typeof object.profile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.profile: object expected"); + message.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.fromObject(object.profile); + } + return message; + }; - DiscoveryEvent.PartitionDetails = (function() { + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field} message Field + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Field.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = ""; + object.mode = ""; + object.profile = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = message.mode; + if (message.profile != null && message.hasOwnProperty("profile")) + object.profile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.toObject(message.profile, options); + return object; + }; - /** - * Properties of a PartitionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IPartitionDetails - * @property {string|null} [partition] PartitionDetails partition - * @property {string|null} [entity] PartitionDetails entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type - * @property {Array.|null} [sampledDataLocations] PartitionDetails sampledDataLocations - */ + /** + * Converts this Field to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @instance + * @returns {Object.} JSON object + */ + Field.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new PartitionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents a PartitionDetails. - * @implements IPartitionDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set - */ - function PartitionDetails(properties) { - this.sampledDataLocations = []; - 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]]; - } + /** + * Gets the default type url for Field + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field"; + }; - /** - * PartitionDetails partition. - * @member {string} partition - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.partition = ""; + Field.ProfileInfo = (function() { + + /** + * Properties of a ProfileInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @interface IProfileInfo + * @property {number|null} [nullRatio] ProfileInfo nullRatio + * @property {number|null} [distinctRatio] ProfileInfo distinctRatio + * @property {Array.|null} [topNValues] ProfileInfo topNValues + * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null} [stringProfile] ProfileInfo stringProfile + * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null} [integerProfile] ProfileInfo integerProfile + * @property {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null} [doubleProfile] ProfileInfo doubleProfile + */ + + /** + * Constructs a new ProfileInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field + * @classdesc Represents a ProfileInfo. + * @implements IProfileInfo + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo=} [properties] Properties to set + */ + function ProfileInfo(properties) { + this.topNValues = []; + 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]]; + } - /** - * PartitionDetails entity. - * @member {string} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.entity = ""; + /** + * ProfileInfo nullRatio. + * @member {number} nullRatio + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.nullRatio = 0; + + /** + * ProfileInfo distinctRatio. + * @member {number} distinctRatio + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.distinctRatio = 0; + + /** + * ProfileInfo topNValues. + * @member {Array.} topNValues + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.topNValues = $util.emptyArray; + + /** + * ProfileInfo stringProfile. + * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo|null|undefined} stringProfile + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.stringProfile = null; + + /** + * ProfileInfo integerProfile. + * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo|null|undefined} integerProfile + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.integerProfile = null; + + /** + * ProfileInfo doubleProfile. + * @member {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo|null|undefined} doubleProfile + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + ProfileInfo.prototype.doubleProfile = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ProfileInfo fieldInfo. + * @member {"stringProfile"|"integerProfile"|"doubleProfile"|undefined} fieldInfo + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + */ + Object.defineProperty(ProfileInfo.prototype, "fieldInfo", { + get: $util.oneOfGetter($oneOfFields = ["stringProfile", "integerProfile", "doubleProfile"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ProfileInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo instance + */ + ProfileInfo.create = function create(properties) { + return new ProfileInfo(properties); + }; + + /** + * Encodes the specified ProfileInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo} message ProfileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProfileInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullRatio != null && Object.hasOwnProperty.call(message, "nullRatio")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.nullRatio); + if (message.distinctRatio != null && Object.hasOwnProperty.call(message, "distinctRatio")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.distinctRatio); + if (message.topNValues != null && message.topNValues.length) + for (var i = 0; i < message.topNValues.length; ++i) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.encode(message.topNValues[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stringProfile != null && Object.hasOwnProperty.call(message, "stringProfile")) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.encode(message.stringProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.integerProfile != null && Object.hasOwnProperty.call(message, "integerProfile")) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.encode(message.integerProfile, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.doubleProfile != null && Object.hasOwnProperty.call(message, "doubleProfile")) + $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.encode(message.doubleProfile, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProfileInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.IProfileInfo} message ProfileInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProfileInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProfileInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProfileInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.nullRatio = reader.double(); + break; + } + case 3: { + message.distinctRatio = reader.double(); + break; + } + case 4: { + if (!(message.topNValues && message.topNValues.length)) + message.topNValues = []; + message.topNValues.push($root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.decode(reader, reader.uint32())); + break; + } + case 101: { + message.stringProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.decode(reader, reader.uint32()); + break; + } + case 102: { + message.integerProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.decode(reader, reader.uint32()); + break; + } + case 103: { + message.doubleProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProfileInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProfileInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProfileInfo message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProfileInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullRatio != null && message.hasOwnProperty("nullRatio")) + if (typeof message.nullRatio !== "number") + return "nullRatio: number expected"; + if (message.distinctRatio != null && message.hasOwnProperty("distinctRatio")) + if (typeof message.distinctRatio !== "number") + return "distinctRatio: number expected"; + if (message.topNValues != null && message.hasOwnProperty("topNValues")) { + if (!Array.isArray(message.topNValues)) + return "topNValues: array expected"; + for (var i = 0; i < message.topNValues.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify(message.topNValues[i]); + if (error) + return "topNValues." + error; + } + } + if (message.stringProfile != null && message.hasOwnProperty("stringProfile")) { + properties.fieldInfo = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify(message.stringProfile); + if (error) + return "stringProfile." + error; + } + } + if (message.integerProfile != null && message.hasOwnProperty("integerProfile")) { + if (properties.fieldInfo === 1) + return "fieldInfo: multiple values"; + properties.fieldInfo = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify(message.integerProfile); + if (error) + return "integerProfile." + error; + } + } + if (message.doubleProfile != null && message.hasOwnProperty("doubleProfile")) { + if (properties.fieldInfo === 1) + return "fieldInfo: multiple values"; + properties.fieldInfo = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify(message.doubleProfile); + if (error) + return "doubleProfile." + error; + } + } + return null; + }; + + /** + * Creates a ProfileInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} ProfileInfo + */ + ProfileInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo(); + if (object.nullRatio != null) + message.nullRatio = Number(object.nullRatio); + if (object.distinctRatio != null) + message.distinctRatio = Number(object.distinctRatio); + if (object.topNValues) { + if (!Array.isArray(object.topNValues)) + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.topNValues: array expected"); + message.topNValues = []; + for (var i = 0; i < object.topNValues.length; ++i) { + if (typeof object.topNValues[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.topNValues: object expected"); + message.topNValues[i] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.fromObject(object.topNValues[i]); + } + } + if (object.stringProfile != null) { + if (typeof object.stringProfile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.stringProfile: object expected"); + message.stringProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.fromObject(object.stringProfile); + } + if (object.integerProfile != null) { + if (typeof object.integerProfile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.integerProfile: object expected"); + message.integerProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.fromObject(object.integerProfile); + } + if (object.doubleProfile != null) { + if (typeof object.doubleProfile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.doubleProfile: object expected"); + message.doubleProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.fromObject(object.doubleProfile); + } + return message; + }; + + /** + * Creates a plain object from a ProfileInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo} message ProfileInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProfileInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.topNValues = []; + if (options.defaults) { + object.nullRatio = 0; + object.distinctRatio = 0; + } + if (message.nullRatio != null && message.hasOwnProperty("nullRatio")) + object.nullRatio = options.json && !isFinite(message.nullRatio) ? String(message.nullRatio) : message.nullRatio; + if (message.distinctRatio != null && message.hasOwnProperty("distinctRatio")) + object.distinctRatio = options.json && !isFinite(message.distinctRatio) ? String(message.distinctRatio) : message.distinctRatio; + if (message.topNValues && message.topNValues.length) { + object.topNValues = []; + for (var j = 0; j < message.topNValues.length; ++j) + object.topNValues[j] = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.toObject(message.topNValues[j], options); + } + if (message.stringProfile != null && message.hasOwnProperty("stringProfile")) { + object.stringProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.toObject(message.stringProfile, options); + if (options.oneofs) + object.fieldInfo = "stringProfile"; + } + if (message.integerProfile != null && message.hasOwnProperty("integerProfile")) { + object.integerProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.toObject(message.integerProfile, options); + if (options.oneofs) + object.fieldInfo = "integerProfile"; + } + if (message.doubleProfile != null && message.hasOwnProperty("doubleProfile")) { + object.doubleProfile = $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.toObject(message.doubleProfile, options); + if (options.oneofs) + object.fieldInfo = "doubleProfile"; + } + return object; + }; + + /** + * Converts this ProfileInfo to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @instance + * @returns {Object.} JSON object + */ + ProfileInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProfileInfo + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProfileInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo"; + }; + + ProfileInfo.StringFieldInfo = (function() { + + /** + * Properties of a StringFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @interface IStringFieldInfo + * @property {number|Long|null} [minLength] StringFieldInfo minLength + * @property {number|Long|null} [maxLength] StringFieldInfo maxLength + * @property {number|null} [averageLength] StringFieldInfo averageLength + */ + + /** + * Constructs a new StringFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @classdesc Represents a StringFieldInfo. + * @implements IStringFieldInfo + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo=} [properties] Properties to set + */ + function StringFieldInfo(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]]; + } - /** - * PartitionDetails type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.type = 0; + /** + * StringFieldInfo minLength. + * @member {number|Long} minLength + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @instance + */ + StringFieldInfo.prototype.minLength = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StringFieldInfo maxLength. + * @member {number|Long} maxLength + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @instance + */ + StringFieldInfo.prototype.maxLength = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * StringFieldInfo averageLength. + * @member {number} averageLength + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @instance + */ + StringFieldInfo.prototype.averageLength = 0; + + /** + * Creates a new StringFieldInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo instance + */ + StringFieldInfo.create = function create(properties) { + return new StringFieldInfo(properties); + }; + + /** + * Encodes the specified StringFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo} message StringFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minLength != null && Object.hasOwnProperty.call(message, "minLength")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.minLength); + if (message.maxLength != null && Object.hasOwnProperty.call(message, "maxLength")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxLength); + if (message.averageLength != null && Object.hasOwnProperty.call(message, "averageLength")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.averageLength); + return writer; + }; + + /** + * Encodes the specified StringFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IStringFieldInfo} message StringFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringFieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFieldInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minLength = reader.int64(); + break; + } + case 2: { + message.maxLength = reader.int64(); + break; + } + case 3: { + message.averageLength = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringFieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFieldInfo message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minLength != null && message.hasOwnProperty("minLength")) + if (!$util.isInteger(message.minLength) && !(message.minLength && $util.isInteger(message.minLength.low) && $util.isInteger(message.minLength.high))) + return "minLength: integer|Long expected"; + if (message.maxLength != null && message.hasOwnProperty("maxLength")) + if (!$util.isInteger(message.maxLength) && !(message.maxLength && $util.isInteger(message.maxLength.low) && $util.isInteger(message.maxLength.high))) + return "maxLength: integer|Long expected"; + if (message.averageLength != null && message.hasOwnProperty("averageLength")) + if (typeof message.averageLength !== "number") + return "averageLength: number expected"; + return null; + }; + + /** + * Creates a StringFieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} StringFieldInfo + */ + StringFieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo(); + if (object.minLength != null) + if ($util.Long) + (message.minLength = $util.Long.fromValue(object.minLength)).unsigned = false; + else if (typeof object.minLength === "string") + message.minLength = parseInt(object.minLength, 10); + else if (typeof object.minLength === "number") + message.minLength = object.minLength; + else if (typeof object.minLength === "object") + message.minLength = new $util.LongBits(object.minLength.low >>> 0, object.minLength.high >>> 0).toNumber(); + if (object.maxLength != null) + if ($util.Long) + (message.maxLength = $util.Long.fromValue(object.maxLength)).unsigned = false; + else if (typeof object.maxLength === "string") + message.maxLength = parseInt(object.maxLength, 10); + else if (typeof object.maxLength === "number") + message.maxLength = object.maxLength; + else if (typeof object.maxLength === "object") + message.maxLength = new $util.LongBits(object.maxLength.low >>> 0, object.maxLength.high >>> 0).toNumber(); + if (object.averageLength != null) + message.averageLength = Number(object.averageLength); + return message; + }; + + /** + * Creates a plain object from a StringFieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo} message StringFieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.minLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.minLength = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxLength = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxLength = options.longs === String ? "0" : 0; + object.averageLength = 0; + } + if (message.minLength != null && message.hasOwnProperty("minLength")) + if (typeof message.minLength === "number") + object.minLength = options.longs === String ? String(message.minLength) : message.minLength; + else + object.minLength = options.longs === String ? $util.Long.prototype.toString.call(message.minLength) : options.longs === Number ? new $util.LongBits(message.minLength.low >>> 0, message.minLength.high >>> 0).toNumber() : message.minLength; + if (message.maxLength != null && message.hasOwnProperty("maxLength")) + if (typeof message.maxLength === "number") + object.maxLength = options.longs === String ? String(message.maxLength) : message.maxLength; + else + object.maxLength = options.longs === String ? $util.Long.prototype.toString.call(message.maxLength) : options.longs === Number ? new $util.LongBits(message.maxLength.low >>> 0, message.maxLength.high >>> 0).toNumber() : message.maxLength; + if (message.averageLength != null && message.hasOwnProperty("averageLength")) + object.averageLength = options.json && !isFinite(message.averageLength) ? String(message.averageLength) : message.averageLength; + return object; + }; + + /** + * Converts this StringFieldInfo to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @instance + * @returns {Object.} JSON object + */ + StringFieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringFieldInfo + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo"; + }; + + return StringFieldInfo; + })(); + + ProfileInfo.IntegerFieldInfo = (function() { + + /** + * Properties of an IntegerFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @interface IIntegerFieldInfo + * @property {number|null} [average] IntegerFieldInfo average + * @property {number|null} [standardDeviation] IntegerFieldInfo standardDeviation + * @property {number|Long|null} [min] IntegerFieldInfo min + * @property {Array.|null} [quartiles] IntegerFieldInfo quartiles + * @property {number|Long|null} [max] IntegerFieldInfo max + */ + + /** + * Constructs a new IntegerFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @classdesc Represents an IntegerFieldInfo. + * @implements IIntegerFieldInfo + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo=} [properties] Properties to set + */ + function IntegerFieldInfo(properties) { + this.quartiles = []; + 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]]; + } - /** - * PartitionDetails sampledDataLocations. - * @member {Array.} sampledDataLocations - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.sampledDataLocations = $util.emptyArray; + /** + * IntegerFieldInfo average. + * @member {number} average + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + */ + IntegerFieldInfo.prototype.average = 0; + + /** + * IntegerFieldInfo standardDeviation. + * @member {number} standardDeviation + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + */ + IntegerFieldInfo.prototype.standardDeviation = 0; + + /** + * IntegerFieldInfo min. + * @member {number|Long} min + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + */ + IntegerFieldInfo.prototype.min = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IntegerFieldInfo quartiles. + * @member {Array.} quartiles + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + */ + IntegerFieldInfo.prototype.quartiles = $util.emptyArray; + + /** + * IntegerFieldInfo max. + * @member {number|Long} max + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + */ + IntegerFieldInfo.prototype.max = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new IntegerFieldInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo instance + */ + IntegerFieldInfo.create = function create(properties) { + return new IntegerFieldInfo(properties); + }; + + /** + * Encodes the specified IntegerFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo} message IntegerFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntegerFieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.average != null && Object.hasOwnProperty.call(message, "average")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.average); + if (message.standardDeviation != null && Object.hasOwnProperty.call(message, "standardDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.standardDeviation); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.max); + if (message.quartiles != null && message.quartiles.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.quartiles.length; ++i) + writer.int64(message.quartiles[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified IntegerFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IIntegerFieldInfo} message IntegerFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntegerFieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntegerFieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntegerFieldInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.average = reader.double(); + break; + } + case 3: { + message.standardDeviation = reader.double(); + break; + } + case 4: { + message.min = reader.int64(); + break; + } + case 6: { + if (!(message.quartiles && message.quartiles.length)) + message.quartiles = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.quartiles.push(reader.int64()); + } else + message.quartiles.push(reader.int64()); + break; + } + case 5: { + message.max = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntegerFieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntegerFieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntegerFieldInfo message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntegerFieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.average != null && message.hasOwnProperty("average")) + if (typeof message.average !== "number") + return "average: number expected"; + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + if (typeof message.standardDeviation !== "number") + return "standardDeviation: number expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (!$util.isInteger(message.min) && !(message.min && $util.isInteger(message.min.low) && $util.isInteger(message.min.high))) + return "min: integer|Long expected"; + if (message.quartiles != null && message.hasOwnProperty("quartiles")) { + if (!Array.isArray(message.quartiles)) + return "quartiles: array expected"; + for (var i = 0; i < message.quartiles.length; ++i) + if (!$util.isInteger(message.quartiles[i]) && !(message.quartiles[i] && $util.isInteger(message.quartiles[i].low) && $util.isInteger(message.quartiles[i].high))) + return "quartiles: integer|Long[] expected"; + } + if (message.max != null && message.hasOwnProperty("max")) + if (!$util.isInteger(message.max) && !(message.max && $util.isInteger(message.max.low) && $util.isInteger(message.max.high))) + return "max: integer|Long expected"; + return null; + }; + + /** + * Creates an IntegerFieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} IntegerFieldInfo + */ + IntegerFieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo(); + if (object.average != null) + message.average = Number(object.average); + if (object.standardDeviation != null) + message.standardDeviation = Number(object.standardDeviation); + if (object.min != null) + if ($util.Long) + (message.min = $util.Long.fromValue(object.min)).unsigned = false; + else if (typeof object.min === "string") + message.min = parseInt(object.min, 10); + else if (typeof object.min === "number") + message.min = object.min; + else if (typeof object.min === "object") + message.min = new $util.LongBits(object.min.low >>> 0, object.min.high >>> 0).toNumber(); + if (object.quartiles) { + if (!Array.isArray(object.quartiles)) + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo.quartiles: array expected"); + message.quartiles = []; + for (var i = 0; i < object.quartiles.length; ++i) + if ($util.Long) + (message.quartiles[i] = $util.Long.fromValue(object.quartiles[i])).unsigned = false; + else if (typeof object.quartiles[i] === "string") + message.quartiles[i] = parseInt(object.quartiles[i], 10); + else if (typeof object.quartiles[i] === "number") + message.quartiles[i] = object.quartiles[i]; + else if (typeof object.quartiles[i] === "object") + message.quartiles[i] = new $util.LongBits(object.quartiles[i].low >>> 0, object.quartiles[i].high >>> 0).toNumber(); + } + if (object.max != null) + if ($util.Long) + (message.max = $util.Long.fromValue(object.max)).unsigned = false; + else if (typeof object.max === "string") + message.max = parseInt(object.max, 10); + else if (typeof object.max === "number") + message.max = object.max; + else if (typeof object.max === "object") + message.max = new $util.LongBits(object.max.low >>> 0, object.max.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an IntegerFieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo} message IntegerFieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntegerFieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quartiles = []; + if (options.defaults) { + object.average = 0; + object.standardDeviation = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.min = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.min = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.max = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.max = options.longs === String ? "0" : 0; + } + if (message.average != null && message.hasOwnProperty("average")) + object.average = options.json && !isFinite(message.average) ? String(message.average) : message.average; + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + object.standardDeviation = options.json && !isFinite(message.standardDeviation) ? String(message.standardDeviation) : message.standardDeviation; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min === "number") + object.min = options.longs === String ? String(message.min) : message.min; + else + object.min = options.longs === String ? $util.Long.prototype.toString.call(message.min) : options.longs === Number ? new $util.LongBits(message.min.low >>> 0, message.min.high >>> 0).toNumber() : message.min; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max === "number") + object.max = options.longs === String ? String(message.max) : message.max; + else + object.max = options.longs === String ? $util.Long.prototype.toString.call(message.max) : options.longs === Number ? new $util.LongBits(message.max.low >>> 0, message.max.high >>> 0).toNumber() : message.max; + if (message.quartiles && message.quartiles.length) { + object.quartiles = []; + for (var j = 0; j < message.quartiles.length; ++j) + if (typeof message.quartiles[j] === "number") + object.quartiles[j] = options.longs === String ? String(message.quartiles[j]) : message.quartiles[j]; + else + object.quartiles[j] = options.longs === String ? $util.Long.prototype.toString.call(message.quartiles[j]) : options.longs === Number ? new $util.LongBits(message.quartiles[j].low >>> 0, message.quartiles[j].high >>> 0).toNumber() : message.quartiles[j]; + } + return object; + }; + + /** + * Converts this IntegerFieldInfo to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @instance + * @returns {Object.} JSON object + */ + IntegerFieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IntegerFieldInfo + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IntegerFieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo"; + }; + + return IntegerFieldInfo; + })(); + + ProfileInfo.DoubleFieldInfo = (function() { + + /** + * Properties of a DoubleFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @interface IDoubleFieldInfo + * @property {number|null} [average] DoubleFieldInfo average + * @property {number|null} [standardDeviation] DoubleFieldInfo standardDeviation + * @property {number|null} [min] DoubleFieldInfo min + * @property {Array.|null} [quartiles] DoubleFieldInfo quartiles + * @property {number|null} [max] DoubleFieldInfo max + */ + + /** + * Constructs a new DoubleFieldInfo. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @classdesc Represents a DoubleFieldInfo. + * @implements IDoubleFieldInfo + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo=} [properties] Properties to set + */ + function DoubleFieldInfo(properties) { + this.quartiles = []; + 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]]; + } - /** - * Creates a new PartitionDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails instance - */ - PartitionDetails.create = function create(properties) { - return new PartitionDetails(properties); - }; + /** + * DoubleFieldInfo average. + * @member {number} average + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + */ + DoubleFieldInfo.prototype.average = 0; + + /** + * DoubleFieldInfo standardDeviation. + * @member {number} standardDeviation + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + */ + DoubleFieldInfo.prototype.standardDeviation = 0; + + /** + * DoubleFieldInfo min. + * @member {number} min + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + */ + DoubleFieldInfo.prototype.min = 0; + + /** + * DoubleFieldInfo quartiles. + * @member {Array.} quartiles + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + */ + DoubleFieldInfo.prototype.quartiles = $util.emptyArray; + + /** + * DoubleFieldInfo max. + * @member {number} max + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + */ + DoubleFieldInfo.prototype.max = 0; + + /** + * Creates a new DoubleFieldInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo instance + */ + DoubleFieldInfo.create = function create(properties) { + return new DoubleFieldInfo(properties); + }; + + /** + * Encodes the specified DoubleFieldInfo message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo} message DoubleFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleFieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.average != null && Object.hasOwnProperty.call(message, "average")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.average); + if (message.standardDeviation != null && Object.hasOwnProperty.call(message, "standardDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.standardDeviation); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.max); + if (message.quartiles != null && message.quartiles.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.quartiles.length; ++i) + writer.double(message.quartiles[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DoubleFieldInfo message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IDoubleFieldInfo} message DoubleFieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleFieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleFieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleFieldInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.average = reader.double(); + break; + } + case 3: { + message.standardDeviation = reader.double(); + break; + } + case 4: { + message.min = reader.double(); + break; + } + case 6: { + if (!(message.quartiles && message.quartiles.length)) + message.quartiles = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.quartiles.push(reader.double()); + } else + message.quartiles.push(reader.double()); + break; + } + case 5: { + message.max = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleFieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleFieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleFieldInfo message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleFieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.average != null && message.hasOwnProperty("average")) + if (typeof message.average !== "number") + return "average: number expected"; + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + if (typeof message.standardDeviation !== "number") + return "standardDeviation: number expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min !== "number") + return "min: number expected"; + if (message.quartiles != null && message.hasOwnProperty("quartiles")) { + if (!Array.isArray(message.quartiles)) + return "quartiles: array expected"; + for (var i = 0; i < message.quartiles.length; ++i) + if (typeof message.quartiles[i] !== "number") + return "quartiles: number[] expected"; + } + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max !== "number") + return "max: number expected"; + return null; + }; + + /** + * Creates a DoubleFieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} DoubleFieldInfo + */ + DoubleFieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo(); + if (object.average != null) + message.average = Number(object.average); + if (object.standardDeviation != null) + message.standardDeviation = Number(object.standardDeviation); + if (object.min != null) + message.min = Number(object.min); + if (object.quartiles) { + if (!Array.isArray(object.quartiles)) + throw TypeError(".google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo.quartiles: array expected"); + message.quartiles = []; + for (var i = 0; i < object.quartiles.length; ++i) + message.quartiles[i] = Number(object.quartiles[i]); + } + if (object.max != null) + message.max = Number(object.max); + return message; + }; + + /** + * Creates a plain object from a DoubleFieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo} message DoubleFieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleFieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quartiles = []; + if (options.defaults) { + object.average = 0; + object.standardDeviation = 0; + object.min = 0; + object.max = 0; + } + if (message.average != null && message.hasOwnProperty("average")) + object.average = options.json && !isFinite(message.average) ? String(message.average) : message.average; + if (message.standardDeviation != null && message.hasOwnProperty("standardDeviation")) + object.standardDeviation = options.json && !isFinite(message.standardDeviation) ? String(message.standardDeviation) : message.standardDeviation; + if (message.min != null && message.hasOwnProperty("min")) + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (message.max != null && message.hasOwnProperty("max")) + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + if (message.quartiles && message.quartiles.length) { + object.quartiles = []; + for (var j = 0; j < message.quartiles.length; ++j) + object.quartiles[j] = options.json && !isFinite(message.quartiles[j]) ? String(message.quartiles[j]) : message.quartiles[j]; + } + return object; + }; + + /** + * Converts this DoubleFieldInfo to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @instance + * @returns {Object.} JSON object + */ + DoubleFieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DoubleFieldInfo + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleFieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo"; + }; + + return DoubleFieldInfo; + })(); + + ProfileInfo.TopNValue = (function() { + + /** + * Properties of a TopNValue. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @interface ITopNValue + * @property {string|null} [value] TopNValue value + * @property {number|Long|null} [count] TopNValue count + */ + + /** + * Constructs a new TopNValue. + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo + * @classdesc Represents a TopNValue. + * @implements ITopNValue + * @constructor + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue=} [properties] Properties to set + */ + function TopNValue(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]]; + } - /** - * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartitionDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.partition); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.sampledDataLocations != null && message.sampledDataLocations.length) - for (var i = 0; i < message.sampledDataLocations.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); - return writer; - }; + /** + * TopNValue value. + * @member {string} value + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @instance + */ + TopNValue.prototype.value = ""; + + /** + * TopNValue count. + * @member {number|Long} count + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @instance + */ + TopNValue.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new TopNValue instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue instance + */ + TopNValue.create = function create(properties) { + return new TopNValue(properties); + }; + + /** + * Encodes the specified TopNValue message. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue} message TopNValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TopNValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); + return writer; + }; + + /** + * Encodes the specified TopNValue message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.ITopNValue} message TopNValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TopNValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TopNValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TopNValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + case 2: { + message.count = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TopNValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TopNValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TopNValue message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TopNValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates a TopNValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} TopNValue + */ + TopNValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue) + return object; + var message = new $root.google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue(); + if (object.value != null) + message.value = String(object.value); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a TopNValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue} message TopNValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TopNValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; + + /** + * Converts this TopNValue to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @instance + * @returns {Object.} JSON object + */ + TopNValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TopNValue + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TopNValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue"; + }; - /** - * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartitionDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return TopNValue; + })(); - /** - * Decodes a PartitionDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartitionDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partition = reader.string(); - break; - } - case 2: { - message.entity = reader.string(); - break; - } - case 3: { - message.type = reader.int32(); - break; - } - case 4: { - if (!(message.sampledDataLocations && message.sampledDataLocations.length)) - message.sampledDataLocations = []; - message.sampledDataLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return ProfileInfo; + })(); - /** - * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartitionDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return Field; + })(); - /** - * Verifies a PartitionDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PartitionDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partition != null && message.hasOwnProperty("partition")) - if (!$util.isString(message.partition)) - return "partition: string expected"; - if (message.entity != null && message.hasOwnProperty("entity")) - if (!$util.isString(message.entity)) - return "entity: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { - if (!Array.isArray(message.sampledDataLocations)) - return "sampledDataLocations: array expected"; - for (var i = 0; i < message.sampledDataLocations.length; ++i) - if (!$util.isString(message.sampledDataLocations[i])) - return "sampledDataLocations: string[] expected"; - } - return null; - }; + return Profile; + })(); - /** - * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails - */ - PartitionDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); - if (object.partition != null) - message.partition = String(object.partition); - if (object.entity != null) - message.entity = String(object.entity); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; + return DataProfileResult; + })(); + + v1.Trigger = (function() { + + /** + * Properties of a Trigger. + * @memberof google.cloud.dataplex.v1 + * @interface ITrigger + * @property {google.cloud.dataplex.v1.Trigger.IOnDemand|null} [onDemand] Trigger onDemand + * @property {google.cloud.dataplex.v1.Trigger.ISchedule|null} [schedule] Trigger schedule + */ + + /** + * Constructs a new Trigger. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Trigger. + * @implements ITrigger + * @constructor + * @param {google.cloud.dataplex.v1.ITrigger=} [properties] Properties to set + */ + function Trigger(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]]; + } + + /** + * Trigger onDemand. + * @member {google.cloud.dataplex.v1.Trigger.IOnDemand|null|undefined} onDemand + * @memberof google.cloud.dataplex.v1.Trigger + * @instance + */ + Trigger.prototype.onDemand = null; + + /** + * Trigger schedule. + * @member {google.cloud.dataplex.v1.Trigger.ISchedule|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Trigger + * @instance + */ + Trigger.prototype.schedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Trigger mode. + * @member {"onDemand"|"schedule"|undefined} mode + * @memberof google.cloud.dataplex.v1.Trigger + * @instance + */ + Object.defineProperty(Trigger.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["onDemand", "schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Trigger instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {google.cloud.dataplex.v1.ITrigger=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Trigger} Trigger instance + */ + Trigger.create = function create(properties) { + return new Trigger(properties); + }; + + /** + * Encodes the specified Trigger message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {google.cloud.dataplex.v1.ITrigger} message Trigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.onDemand != null && Object.hasOwnProperty.call(message, "onDemand")) + $root.google.cloud.dataplex.v1.Trigger.OnDemand.encode(message.onDemand, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + $root.google.cloud.dataplex.v1.Trigger.Schedule.encode(message.schedule, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {google.cloud.dataplex.v1.ITrigger} message Trigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Trigger message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Trigger} Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trigger.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Trigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 100: { + message.onDemand = $root.google.cloud.dataplex.v1.Trigger.OnDemand.decode(reader, reader.uint32()); break; } + case 101: { + message.schedule = $root.google.cloud.dataplex.v1.Trigger.Schedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; - case "ENTITY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } - if (object.sampledDataLocations) { - if (!Array.isArray(object.sampledDataLocations)) - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.sampledDataLocations: array expected"); - message.sampledDataLocations = []; - for (var i = 0; i < object.sampledDataLocations.length; ++i) - message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} message PartitionDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PartitionDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sampledDataLocations = []; - if (options.defaults) { - object.partition = ""; - object.entity = ""; - object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + /** + * Decodes a Trigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Trigger} Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Trigger message. + * @function verify + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trigger.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.onDemand != null && message.hasOwnProperty("onDemand")) { + properties.mode = 1; + { + var error = $root.google.cloud.dataplex.v1.Trigger.OnDemand.verify(message.onDemand); + if (error) + return "onDemand." + error; } - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = message.partition; - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = message.entity; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; - if (message.sampledDataLocations && message.sampledDataLocations.length) { - object.sampledDataLocations = []; - for (var j = 0; j < message.sampledDataLocations.length; ++j) - object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + { + var error = $root.google.cloud.dataplex.v1.Trigger.Schedule.verify(message.schedule); + if (error) + return "schedule." + error; } + } + return null; + }; + + /** + * Creates a Trigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Trigger} Trigger + */ + Trigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Trigger) return object; - }; + var message = new $root.google.cloud.dataplex.v1.Trigger(); + if (object.onDemand != null) { + if (typeof object.onDemand !== "object") + throw TypeError(".google.cloud.dataplex.v1.Trigger.onDemand: object expected"); + message.onDemand = $root.google.cloud.dataplex.v1.Trigger.OnDemand.fromObject(object.onDemand); + } + if (object.schedule != null) { + if (typeof object.schedule !== "object") + throw TypeError(".google.cloud.dataplex.v1.Trigger.schedule: object expected"); + message.schedule = $root.google.cloud.dataplex.v1.Trigger.Schedule.fromObject(object.schedule); + } + return message; + }; + + /** + * Creates a plain object from a Trigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {google.cloud.dataplex.v1.Trigger} message Trigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.onDemand != null && message.hasOwnProperty("onDemand")) { + object.onDemand = $root.google.cloud.dataplex.v1.Trigger.OnDemand.toObject(message.onDemand, options); + if (options.oneofs) + object.mode = "onDemand"; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = $root.google.cloud.dataplex.v1.Trigger.Schedule.toObject(message.schedule, options); + if (options.oneofs) + object.mode = "schedule"; + } + return object; + }; + + /** + * Converts this Trigger to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Trigger + * @instance + * @returns {Object.} JSON object + */ + Trigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Trigger + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Trigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Trigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Trigger"; + }; + + Trigger.OnDemand = (function() { /** - * Converts this PartitionDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - * @returns {Object.} JSON object + * Properties of an OnDemand. + * @memberof google.cloud.dataplex.v1.Trigger + * @interface IOnDemand */ - PartitionDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for PartitionDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Constructs a new OnDemand. + * @memberof google.cloud.dataplex.v1.Trigger + * @classdesc Represents an OnDemand. + * @implements IOnDemand + * @constructor + * @param {google.cloud.dataplex.v1.Trigger.IOnDemand=} [properties] Properties to set */ - PartitionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"; - }; - - return PartitionDetails; + function OnDemand(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]]; + } + + /** + * Creates a new OnDemand instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {google.cloud.dataplex.v1.Trigger.IOnDemand=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand instance + */ + OnDemand.create = function create(properties) { + return new OnDemand(properties); + }; + + /** + * Encodes the specified OnDemand message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {google.cloud.dataplex.v1.Trigger.IOnDemand} message OnDemand message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OnDemand.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified OnDemand message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.OnDemand.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {google.cloud.dataplex.v1.Trigger.IOnDemand} message OnDemand message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OnDemand.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OnDemand message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OnDemand.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Trigger.OnDemand(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OnDemand message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OnDemand.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OnDemand message. + * @function verify + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OnDemand.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an OnDemand message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Trigger.OnDemand} OnDemand + */ + OnDemand.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Trigger.OnDemand) + return object; + return new $root.google.cloud.dataplex.v1.Trigger.OnDemand(); + }; + + /** + * Creates a plain object from an OnDemand message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {google.cloud.dataplex.v1.Trigger.OnDemand} message OnDemand + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OnDemand.toObject = function toObject() { + return {}; + }; + + /** + * Converts this OnDemand to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @instance + * @returns {Object.} JSON object + */ + OnDemand.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OnDemand + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Trigger.OnDemand + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OnDemand.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Trigger.OnDemand"; + }; + + return OnDemand; })(); - DiscoveryEvent.ActionDetails = (function() { + Trigger.Schedule = (function() { /** - * Properties of an ActionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IActionDetails - * @property {string|null} [type] ActionDetails type + * Properties of a Schedule. + * @memberof google.cloud.dataplex.v1.Trigger + * @interface ISchedule + * @property {string|null} [cron] Schedule cron */ /** - * Constructs a new ActionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents an ActionDetails. - * @implements IActionDetails + * Constructs a new Schedule. + * @memberof google.cloud.dataplex.v1.Trigger + * @classdesc Represents a Schedule. + * @implements ISchedule * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Trigger.ISchedule=} [properties] Properties to set */ - function ActionDetails(properties) { + function Schedule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15254,75 +16865,75 @@ } /** - * ActionDetails type. - * @member {string} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * Schedule cron. + * @member {string} cron + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @instance */ - ActionDetails.prototype.type = ""; + Schedule.prototype.cron = ""; /** - * Creates a new ActionDetails instance using the specified properties. + * Creates a new Schedule instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails instance + * @param {google.cloud.dataplex.v1.Trigger.ISchedule=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule instance */ - ActionDetails.create = function create(properties) { - return new ActionDetails(properties); + Schedule.create = function create(properties) { + return new Schedule(properties); }; /** - * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * Encodes the specified Schedule message. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {google.cloud.dataplex.v1.Trigger.ISchedule} message Schedule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ActionDetails.encode = function encode(message, writer) { + Schedule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.cron != null && Object.hasOwnProperty.call(message, "cron")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cron); return writer; }; /** - * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Trigger.Schedule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {google.cloud.dataplex.v1.Trigger.ISchedule} message Schedule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { + Schedule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ActionDetails message from the specified reader or buffer. + * Decodes a Schedule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ActionDetails.decode = function decode(reader, length) { + Schedule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Trigger.Schedule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.string(); + message.cron = reader.string(); break; } default: @@ -15334,133 +16945,125 @@ }; /** - * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * Decodes a Schedule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ActionDetails.decodeDelimited = function decodeDelimited(reader) { + Schedule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ActionDetails message. + * Verifies a Schedule message. * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ActionDetails.verify = function verify(message) { + Schedule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; + if (message.cron != null && message.hasOwnProperty("cron")) + if (!$util.isString(message.cron)) + return "cron: string expected"; return null; }; /** - * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * Creates a Schedule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @returns {google.cloud.dataplex.v1.Trigger.Schedule} Schedule */ - ActionDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) + Schedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Trigger.Schedule) return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); - if (object.type != null) - message.type = String(object.type); + var message = new $root.google.cloud.dataplex.v1.Trigger.Schedule(); + if (object.cron != null) + message.cron = String(object.cron); return message; }; /** - * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * Creates a plain object from a Schedule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} message ActionDetails + * @param {google.cloud.dataplex.v1.Trigger.Schedule} message Schedule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ActionDetails.toObject = function toObject(message, options) { + Schedule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; + object.cron = ""; + if (message.cron != null && message.hasOwnProperty("cron")) + object.cron = message.cron; return object; }; /** - * Converts this ActionDetails to JSON. + * Converts this Schedule to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @instance * @returns {Object.} JSON object */ - ActionDetails.prototype.toJSON = function toJSON() { + Schedule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ActionDetails + * Gets the default type url for Schedule * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @memberof google.cloud.dataplex.v1.Trigger.Schedule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ActionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Schedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.Trigger.Schedule"; }; - return ActionDetails; + return Schedule; })(); - return DiscoveryEvent; + return Trigger; })(); - v1.JobEvent = (function() { + v1.DataSource = (function() { /** - * Properties of a JobEvent. + * Properties of a DataSource. * @memberof google.cloud.dataplex.v1 - * @interface IJobEvent - * @property {string|null} [message] JobEvent message - * @property {string|null} [jobId] JobEvent jobId - * @property {google.protobuf.ITimestamp|null} [startTime] JobEvent startTime - * @property {google.protobuf.ITimestamp|null} [endTime] JobEvent endTime - * @property {google.cloud.dataplex.v1.JobEvent.State|null} [state] JobEvent state - * @property {number|null} [retries] JobEvent retries - * @property {google.cloud.dataplex.v1.JobEvent.Type|null} [type] JobEvent type - * @property {google.cloud.dataplex.v1.JobEvent.Service|null} [service] JobEvent service - * @property {string|null} [serviceJob] JobEvent serviceJob + * @interface IDataSource + * @property {string|null} [entity] DataSource entity */ /** - * Constructs a new JobEvent. + * Constructs a new DataSource. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a JobEvent. - * @implements IJobEvent + * @classdesc Represents a DataSource. + * @implements IDataSource * @constructor - * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDataSource=} [properties] Properties to set */ - function JobEvent(properties) { + function DataSource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15468,187 +17071,310 @@ } /** - * JobEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.JobEvent + * DataSource entity. + * @member {string|null|undefined} entity + * @memberof google.cloud.dataplex.v1.DataSource * @instance */ - JobEvent.prototype.message = ""; + DataSource.prototype.entity = null; - /** - * JobEvent jobId. - * @member {string} jobId - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance - */ - JobEvent.prototype.jobId = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * JobEvent startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.JobEvent + * DataSource source. + * @member {"entity"|undefined} source + * @memberof google.cloud.dataplex.v1.DataSource * @instance */ - JobEvent.prototype.startTime = null; + Object.defineProperty(DataSource.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["entity"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * JobEvent endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance + * Creates a new DataSource instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {google.cloud.dataplex.v1.IDataSource=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataSource} DataSource instance */ - JobEvent.prototype.endTime = null; + DataSource.create = function create(properties) { + return new DataSource(properties); + }; /** - * JobEvent state. - * @member {google.cloud.dataplex.v1.JobEvent.State} state - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.dataplex.v1.DataSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {google.cloud.dataplex.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - JobEvent.prototype.state = 0; + DataSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.entity); + return writer; + }; /** - * JobEvent retries. - * @member {number} retries - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {google.cloud.dataplex.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - JobEvent.prototype.retries = 0; + DataSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * JobEvent type. - * @member {google.cloud.dataplex.v1.JobEvent.Type} type - * @memberof google.cloud.dataplex.v1.JobEvent + * Decodes a DataSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 100: { + message.entity = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSource message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.entity != null && message.hasOwnProperty("entity")) { + properties.source = 1; + if (!$util.isString(message.entity)) + return "entity: string expected"; + } + return null; + }; + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataSource} DataSource + */ + DataSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataSource) + return object; + var message = new $root.google.cloud.dataplex.v1.DataSource(); + if (object.entity != null) + message.entity = String(object.entity); + return message; + }; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {google.cloud.dataplex.v1.DataSource} message DataSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.entity != null && message.hasOwnProperty("entity")) { + object.entity = message.entity; + if (options.oneofs) + object.source = "entity"; + } + return object; + }; + + /** + * Converts this DataSource to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataSource * @instance + * @returns {Object.} JSON object */ - JobEvent.prototype.type = 0; + DataSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * JobEvent service. - * @member {google.cloud.dataplex.v1.JobEvent.Service} service - * @memberof google.cloud.dataplex.v1.JobEvent + * Gets the default type url for DataSource + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataSource"; + }; + + return DataSource; + })(); + + v1.ScannedData = (function() { + + /** + * Properties of a ScannedData. + * @memberof google.cloud.dataplex.v1 + * @interface IScannedData + * @property {google.cloud.dataplex.v1.ScannedData.IIncrementalField|null} [incrementalField] ScannedData incrementalField + */ + + /** + * Constructs a new ScannedData. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ScannedData. + * @implements IScannedData + * @constructor + * @param {google.cloud.dataplex.v1.IScannedData=} [properties] Properties to set + */ + function ScannedData(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]]; + } + + /** + * ScannedData incrementalField. + * @member {google.cloud.dataplex.v1.ScannedData.IIncrementalField|null|undefined} incrementalField + * @memberof google.cloud.dataplex.v1.ScannedData * @instance */ - JobEvent.prototype.service = 0; + ScannedData.prototype.incrementalField = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * JobEvent serviceJob. - * @member {string} serviceJob - * @memberof google.cloud.dataplex.v1.JobEvent + * ScannedData dataRange. + * @member {"incrementalField"|undefined} dataRange + * @memberof google.cloud.dataplex.v1.ScannedData * @instance */ - JobEvent.prototype.serviceJob = ""; + Object.defineProperty(ScannedData.prototype, "dataRange", { + get: $util.oneOfGetter($oneOfFields = ["incrementalField"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new JobEvent instance using the specified properties. + * Creates a new ScannedData instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.ScannedData * @static - * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent instance + * @param {google.cloud.dataplex.v1.IScannedData=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData instance */ - JobEvent.create = function create(properties) { - return new JobEvent(properties); + ScannedData.create = function create(properties) { + return new ScannedData(properties); }; /** - * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * Encodes the specified ScannedData message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.ScannedData * @static - * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IScannedData} message ScannedData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JobEvent.encode = function encode(message, writer) { + ScannedData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.retries != null && Object.hasOwnProperty.call(message, "retries")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retries); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.service); - if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceJob); + if (message.incrementalField != null && Object.hasOwnProperty.call(message, "incrementalField")) + $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.encode(message.incrementalField, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * Encodes the specified ScannedData message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.ScannedData * @static - * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IScannedData} message ScannedData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JobEvent.encodeDelimited = function encodeDelimited(message, writer) { + ScannedData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JobEvent message from the specified reader or buffer. + * Decodes a ScannedData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.ScannedData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JobEvent.decode = function decode(reader, length) { + ScannedData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.JobEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ScannedData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.message = reader.string(); - break; - } - case 2: { - message.jobId = reader.string(); - break; - } - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.retries = reader.int32(); - break; - } - case 7: { - message.type = reader.int32(); - break; - } - case 8: { - message.service = reader.int32(); - break; - } - case 9: { - message.serviceJob = reader.string(); + message.incrementalField = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.decode(reader, reader.uint32()); break; } default: @@ -15660,331 +17386,11731 @@ }; /** - * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * Decodes a ScannedData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.ScannedData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JobEvent.decodeDelimited = function decodeDelimited(reader) { + ScannedData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a JobEvent message. + * Verifies a ScannedData message. * @function verify - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.ScannedData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - JobEvent.verify = function verify(message) { + ScannedData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string 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; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.retries != null && message.hasOwnProperty("retries")) - if (!$util.isInteger(message.retries)) - return "retries: integer expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.service != null && message.hasOwnProperty("service")) - switch (message.service) { - default: - return "service: enum value expected"; - case 0: - case 1: - break; + var properties = {}; + if (message.incrementalField != null && message.hasOwnProperty("incrementalField")) { + properties.dataRange = 1; + { + var error = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.verify(message.incrementalField); + if (error) + return "incrementalField." + error; } - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - if (!$util.isString(message.serviceJob)) - return "serviceJob: string expected"; + } return null; }; /** - * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * Creates a ScannedData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.ScannedData * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @returns {google.cloud.dataplex.v1.ScannedData} ScannedData */ - JobEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.JobEvent) + ScannedData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ScannedData) return object; - var message = new $root.google.cloud.dataplex.v1.JobEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.jobId != null) - message.jobId = String(object.jobId); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.JobEvent.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.JobEvent.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SUCCEEDED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "CANCELLED": - case 3: - message.state = 3; - break; - case "ABORTED": - case 4: - message.state = 4; - break; - } - if (object.retries != null) - message.retries = object.retries | 0; - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "SPARK": - case 1: - message.type = 1; - break; - case "NOTEBOOK": - case 2: - message.type = 2; - break; - } - switch (object.service) { - default: - if (typeof object.service === "number") { - message.service = object.service; - break; - } - break; - case "SERVICE_UNSPECIFIED": - case 0: - message.service = 0; - break; - case "DATAPROC": - case 1: - message.service = 1; - break; + var message = new $root.google.cloud.dataplex.v1.ScannedData(); + if (object.incrementalField != null) { + if (typeof object.incrementalField !== "object") + throw TypeError(".google.cloud.dataplex.v1.ScannedData.incrementalField: object expected"); + message.incrementalField = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.fromObject(object.incrementalField); } - if (object.serviceJob != null) - message.serviceJob = String(object.serviceJob); return message; }; /** - * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * Creates a plain object from a ScannedData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.ScannedData * @static - * @param {google.cloud.dataplex.v1.JobEvent} message JobEvent + * @param {google.cloud.dataplex.v1.ScannedData} message ScannedData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JobEvent.toObject = function toObject(message, options) { + ScannedData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.message = ""; - object.jobId = ""; - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.retries = 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; - object.serviceJob = ""; + if (message.incrementalField != null && message.hasOwnProperty("incrementalField")) { + object.incrementalField = $root.google.cloud.dataplex.v1.ScannedData.IncrementalField.toObject(message.incrementalField, options); + if (options.oneofs) + object.dataRange = "incrementalField"; } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - 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); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.JobEvent.State[message.state] : message.state; - if (message.retries != null && message.hasOwnProperty("retries")) - object.retries = message.retries; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] : message.type; - if (message.service != null && message.hasOwnProperty("service")) - object.service = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] : message.service; - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - object.serviceJob = message.serviceJob; return object; }; /** - * Converts this JobEvent to JSON. + * Converts this ScannedData to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.ScannedData * @instance * @returns {Object.} JSON object */ - JobEvent.prototype.toJSON = function toJSON() { + ScannedData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for JobEvent + * Gets the default type url for ScannedData * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.ScannedData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - JobEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ScannedData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.JobEvent"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ScannedData"; }; - /** - * Type enum. - * @name google.cloud.dataplex.v1.JobEvent.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} SPARK=1 SPARK value - * @property {number} NOTEBOOK=2 NOTEBOOK value - */ - JobEvent.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK"] = 1; - values[valuesById[2] = "NOTEBOOK"] = 2; - return values; - })(); + ScannedData.IncrementalField = (function() { - /** - * State enum. - * @name google.cloud.dataplex.v1.JobEvent.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} ABORTED=4 ABORTED value - */ - JobEvent.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "ABORTED"] = 4; - return values; - })(); + /** + * Properties of an IncrementalField. + * @memberof google.cloud.dataplex.v1.ScannedData + * @interface IIncrementalField + * @property {string|null} [field] IncrementalField field + * @property {string|null} [start] IncrementalField start + * @property {string|null} [end] IncrementalField end + */ + + /** + * Constructs a new IncrementalField. + * @memberof google.cloud.dataplex.v1.ScannedData + * @classdesc Represents an IncrementalField. + * @implements IIncrementalField + * @constructor + * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField=} [properties] Properties to set + */ + function IncrementalField(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]]; + } + + /** + * IncrementalField field. + * @member {string} field + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @instance + */ + IncrementalField.prototype.field = ""; + + /** + * IncrementalField start. + * @member {string} start + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @instance + */ + IncrementalField.prototype.start = ""; + + /** + * IncrementalField end. + * @member {string} end + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @instance + */ + IncrementalField.prototype.end = ""; + + /** + * Creates a new IncrementalField instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField instance + */ + IncrementalField.create = function create(properties) { + return new IncrementalField(properties); + }; + + /** + * Encodes the specified IncrementalField message. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField} message IncrementalField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.end); + return writer; + }; + + /** + * Encodes the specified IncrementalField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ScannedData.IncrementalField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {google.cloud.dataplex.v1.ScannedData.IIncrementalField} message IncrementalField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IncrementalField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IncrementalField message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalField.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ScannedData.IncrementalField(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.start = reader.string(); + break; + } + case 3: { + message.end = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IncrementalField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IncrementalField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IncrementalField message. + * @function verify + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IncrementalField.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isString(message.start)) + return "start: string expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isString(message.end)) + return "end: string expected"; + return null; + }; + + /** + * Creates an IncrementalField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ScannedData.IncrementalField} IncrementalField + */ + IncrementalField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ScannedData.IncrementalField) + return object; + var message = new $root.google.cloud.dataplex.v1.ScannedData.IncrementalField(); + if (object.field != null) + message.field = String(object.field); + if (object.start != null) + message.start = String(object.start); + if (object.end != null) + message.end = String(object.end); + return message; + }; + + /** + * Creates a plain object from an IncrementalField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {google.cloud.dataplex.v1.ScannedData.IncrementalField} message IncrementalField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IncrementalField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.start = ""; + object.end = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this IncrementalField to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @instance + * @returns {Object.} JSON object + */ + IncrementalField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IncrementalField + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ScannedData.IncrementalField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IncrementalField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ScannedData.IncrementalField"; + }; + + return IncrementalField; + })(); + + return ScannedData; + })(); + + v1.DataQualitySpec = (function() { + + /** + * Properties of a DataQualitySpec. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualitySpec + * @property {Array.|null} [rules] DataQualitySpec rules + */ + + /** + * Constructs a new DataQualitySpec. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualitySpec. + * @implements IDataQualitySpec + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualitySpec=} [properties] Properties to set + */ + function DataQualitySpec(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQualitySpec rules. + * @member {Array.} rules + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @instance + */ + DataQualitySpec.prototype.rules = $util.emptyArray; + + /** + * Creates a new DataQualitySpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {google.cloud.dataplex.v1.IDataQualitySpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec instance + */ + DataQualitySpec.create = function create(properties) { + return new DataQualitySpec(properties); + }; + + /** + * Encodes the specified DataQualitySpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {google.cloud.dataplex.v1.IDataQualitySpec} message DataQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualitySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.cloud.dataplex.v1.DataQualityRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataQualitySpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualitySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {google.cloud.dataplex.v1.IDataQualitySpec} message DataQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualitySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualitySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualitySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualitySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.cloud.dataplex.v1.DataQualityRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualitySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualitySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualitySpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualitySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates a DataQualitySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualitySpec} DataQualitySpec + */ + DataQualitySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualitySpec) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualitySpec(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualitySpec.rules: object expected"); + message.rules[i] = $root.google.cloud.dataplex.v1.DataQualityRule.fromObject(object.rules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataQualitySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {google.cloud.dataplex.v1.DataQualitySpec} message DataQualitySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualitySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.cloud.dataplex.v1.DataQualityRule.toObject(message.rules[j], options); + } + return object; + }; + + /** + * Converts this DataQualitySpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @instance + * @returns {Object.} JSON object + */ + DataQualitySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualitySpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualitySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualitySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualitySpec"; + }; + + return DataQualitySpec; + })(); + + v1.DataQualityResult = (function() { + + /** + * Properties of a DataQualityResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityResult + * @property {boolean|null} [passed] DataQualityResult passed + * @property {Array.|null} [dimensions] DataQualityResult dimensions + * @property {Array.|null} [rules] DataQualityResult rules + * @property {number|Long|null} [rowCount] DataQualityResult rowCount + * @property {google.cloud.dataplex.v1.IScannedData|null} [scannedData] DataQualityResult scannedData + */ + + /** + * Constructs a new DataQualityResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityResult. + * @implements IDataQualityResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityResult=} [properties] Properties to set + */ + function DataQualityResult(properties) { + this.dimensions = []; + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataQualityResult passed. + * @member {boolean} passed + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.passed = false; + + /** + * DataQualityResult dimensions. + * @member {Array.} dimensions + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.dimensions = $util.emptyArray; + + /** + * DataQualityResult rules. + * @member {Array.} rules + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.rules = $util.emptyArray; + + /** + * DataQualityResult rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityResult scannedData. + * @member {google.cloud.dataplex.v1.IScannedData|null|undefined} scannedData + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + */ + DataQualityResult.prototype.scannedData = null; + + /** + * Creates a new DataQualityResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult instance + */ + DataQualityResult.create = function create(properties) { + return new DataQualityResult(properties); + }; + + /** + * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityResult} message DataQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.cloud.dataplex.v1.DataQualityDimensionResult.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.cloud.dataplex.v1.DataQualityRuleResult.encode(message.rules[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.rowCount); + if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.passed); + if (message.scannedData != null && Object.hasOwnProperty.call(message, "scannedData")) + $root.google.cloud.dataplex.v1.ScannedData.encode(message.scannedData, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityResult} message DataQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.passed = reader.bool(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.cloud.dataplex.v1.DataQualityDimensionResult.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.cloud.dataplex.v1.DataQualityRuleResult.decode(reader, reader.uint32())); + break; + } + case 4: { + message.rowCount = reader.int64(); + break; + } + case 7: { + message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.passed != null && message.hasOwnProperty("passed")) + if (typeof message.passed !== "boolean") + return "passed: boolean expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataQualityDimensionResult.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataQualityRuleResult.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + if (message.scannedData != null && message.hasOwnProperty("scannedData")) { + var error = $root.google.cloud.dataplex.v1.ScannedData.verify(message.scannedData); + if (error) + return "scannedData." + error; + } + return null; + }; + + /** + * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityResult} DataQualityResult + */ + DataQualityResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityResult(); + if (object.passed != null) + message.passed = Boolean(object.passed); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.dimensions: object expected"); + message.dimensions[i] = $root.google.cloud.dataplex.v1.DataQualityDimensionResult.fromObject(object.dimensions[i]); + } + } + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.rules: object expected"); + message.rules[i] = $root.google.cloud.dataplex.v1.DataQualityRuleResult.fromObject(object.rules[i]); + } + } + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + if (object.scannedData != null) { + if (typeof object.scannedData !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityResult.scannedData: object expected"); + message.scannedData = $root.google.cloud.dataplex.v1.ScannedData.fromObject(object.scannedData); + } + return message; + }; + + /** + * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityResult} message DataQualityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.rules = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + object.passed = false; + object.scannedData = null; + } + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.cloud.dataplex.v1.DataQualityDimensionResult.toObject(message.dimensions[j], options); + } + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.cloud.dataplex.v1.DataQualityRuleResult.toObject(message.rules[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + if (message.passed != null && message.hasOwnProperty("passed")) + object.passed = message.passed; + if (message.scannedData != null && message.hasOwnProperty("scannedData")) + object.scannedData = $root.google.cloud.dataplex.v1.ScannedData.toObject(message.scannedData, options); + return object; + }; + + /** + * Converts this DataQualityResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @instance + * @returns {Object.} JSON object + */ + DataQualityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityResult"; + }; + + return DataQualityResult; + })(); + + v1.DataQualityRuleResult = (function() { + + /** + * Properties of a DataQualityRuleResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityRuleResult + * @property {google.cloud.dataplex.v1.IDataQualityRule|null} [rule] DataQualityRuleResult rule + * @property {boolean|null} [passed] DataQualityRuleResult passed + * @property {number|Long|null} [evaluatedCount] DataQualityRuleResult evaluatedCount + * @property {number|Long|null} [passedCount] DataQualityRuleResult passedCount + * @property {number|Long|null} [nullCount] DataQualityRuleResult nullCount + * @property {number|null} [passRatio] DataQualityRuleResult passRatio + * @property {string|null} [failingRowsQuery] DataQualityRuleResult failingRowsQuery + */ + + /** + * Constructs a new DataQualityRuleResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityRuleResult. + * @implements IDataQualityRuleResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityRuleResult=} [properties] Properties to set + */ + function DataQualityRuleResult(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]]; + } + + /** + * DataQualityRuleResult rule. + * @member {google.cloud.dataplex.v1.IDataQualityRule|null|undefined} rule + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.rule = null; + + /** + * DataQualityRuleResult passed. + * @member {boolean} passed + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.passed = false; + + /** + * DataQualityRuleResult evaluatedCount. + * @member {number|Long} evaluatedCount + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.evaluatedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityRuleResult passedCount. + * @member {number|Long} passedCount + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.passedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityRuleResult nullCount. + * @member {number|Long} nullCount + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.nullCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataQualityRuleResult passRatio. + * @member {number} passRatio + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.passRatio = 0; + + /** + * DataQualityRuleResult failingRowsQuery. + * @member {string} failingRowsQuery + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + */ + DataQualityRuleResult.prototype.failingRowsQuery = ""; + + /** + * Creates a new DataQualityRuleResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRuleResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult instance + */ + DataQualityRuleResult.create = function create(properties) { + return new DataQualityRuleResult(properties); + }; + + /** + * Encodes the specified DataQualityRuleResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRuleResult} message DataQualityRuleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityRuleResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rule != null && Object.hasOwnProperty.call(message, "rule")) + $root.google.cloud.dataplex.v1.DataQualityRule.encode(message.rule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nullCount != null && Object.hasOwnProperty.call(message, "nullCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.nullCount); + if (message.passRatio != null && Object.hasOwnProperty.call(message, "passRatio")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.passRatio); + if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.passed); + if (message.passedCount != null && Object.hasOwnProperty.call(message, "passedCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.passedCount); + if (message.evaluatedCount != null && Object.hasOwnProperty.call(message, "evaluatedCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.evaluatedCount); + if (message.failingRowsQuery != null && Object.hasOwnProperty.call(message, "failingRowsQuery")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.failingRowsQuery); + return writer; + }; + + /** + * Encodes the specified DataQualityRuleResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRuleResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRuleResult} message DataQualityRuleResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityRuleResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityRuleResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityRuleResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRuleResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rule = $root.google.cloud.dataplex.v1.DataQualityRule.decode(reader, reader.uint32()); + break; + } + case 7: { + message.passed = reader.bool(); + break; + } + case 9: { + message.evaluatedCount = reader.int64(); + break; + } + case 8: { + message.passedCount = reader.int64(); + break; + } + case 5: { + message.nullCount = reader.int64(); + break; + } + case 6: { + message.passRatio = reader.double(); + break; + } + case 10: { + message.failingRowsQuery = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityRuleResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityRuleResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityRuleResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityRuleResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rule != null && message.hasOwnProperty("rule")) { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.verify(message.rule); + if (error) + return "rule." + error; + } + if (message.passed != null && message.hasOwnProperty("passed")) + if (typeof message.passed !== "boolean") + return "passed: boolean expected"; + if (message.evaluatedCount != null && message.hasOwnProperty("evaluatedCount")) + if (!$util.isInteger(message.evaluatedCount) && !(message.evaluatedCount && $util.isInteger(message.evaluatedCount.low) && $util.isInteger(message.evaluatedCount.high))) + return "evaluatedCount: integer|Long expected"; + if (message.passedCount != null && message.hasOwnProperty("passedCount")) + if (!$util.isInteger(message.passedCount) && !(message.passedCount && $util.isInteger(message.passedCount.low) && $util.isInteger(message.passedCount.high))) + return "passedCount: integer|Long expected"; + if (message.nullCount != null && message.hasOwnProperty("nullCount")) + if (!$util.isInteger(message.nullCount) && !(message.nullCount && $util.isInteger(message.nullCount.low) && $util.isInteger(message.nullCount.high))) + return "nullCount: integer|Long expected"; + if (message.passRatio != null && message.hasOwnProperty("passRatio")) + if (typeof message.passRatio !== "number") + return "passRatio: number expected"; + if (message.failingRowsQuery != null && message.hasOwnProperty("failingRowsQuery")) + if (!$util.isString(message.failingRowsQuery)) + return "failingRowsQuery: string expected"; + return null; + }; + + /** + * Creates a DataQualityRuleResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRuleResult} DataQualityRuleResult + */ + DataQualityRuleResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRuleResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRuleResult(); + if (object.rule != null) { + if (typeof object.rule !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRuleResult.rule: object expected"); + message.rule = $root.google.cloud.dataplex.v1.DataQualityRule.fromObject(object.rule); + } + if (object.passed != null) + message.passed = Boolean(object.passed); + if (object.evaluatedCount != null) + if ($util.Long) + (message.evaluatedCount = $util.Long.fromValue(object.evaluatedCount)).unsigned = false; + else if (typeof object.evaluatedCount === "string") + message.evaluatedCount = parseInt(object.evaluatedCount, 10); + else if (typeof object.evaluatedCount === "number") + message.evaluatedCount = object.evaluatedCount; + else if (typeof object.evaluatedCount === "object") + message.evaluatedCount = new $util.LongBits(object.evaluatedCount.low >>> 0, object.evaluatedCount.high >>> 0).toNumber(); + if (object.passedCount != null) + if ($util.Long) + (message.passedCount = $util.Long.fromValue(object.passedCount)).unsigned = false; + else if (typeof object.passedCount === "string") + message.passedCount = parseInt(object.passedCount, 10); + else if (typeof object.passedCount === "number") + message.passedCount = object.passedCount; + else if (typeof object.passedCount === "object") + message.passedCount = new $util.LongBits(object.passedCount.low >>> 0, object.passedCount.high >>> 0).toNumber(); + if (object.nullCount != null) + if ($util.Long) + (message.nullCount = $util.Long.fromValue(object.nullCount)).unsigned = false; + else if (typeof object.nullCount === "string") + message.nullCount = parseInt(object.nullCount, 10); + else if (typeof object.nullCount === "number") + message.nullCount = object.nullCount; + else if (typeof object.nullCount === "object") + message.nullCount = new $util.LongBits(object.nullCount.low >>> 0, object.nullCount.high >>> 0).toNumber(); + if (object.passRatio != null) + message.passRatio = Number(object.passRatio); + if (object.failingRowsQuery != null) + message.failingRowsQuery = String(object.failingRowsQuery); + return message; + }; + + /** + * Creates a plain object from a DataQualityRuleResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityRuleResult} message DataQualityRuleResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityRuleResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rule = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.nullCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nullCount = options.longs === String ? "0" : 0; + object.passRatio = 0; + object.passed = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.passedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.passedCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.evaluatedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.evaluatedCount = options.longs === String ? "0" : 0; + object.failingRowsQuery = ""; + } + if (message.rule != null && message.hasOwnProperty("rule")) + object.rule = $root.google.cloud.dataplex.v1.DataQualityRule.toObject(message.rule, options); + if (message.nullCount != null && message.hasOwnProperty("nullCount")) + if (typeof message.nullCount === "number") + object.nullCount = options.longs === String ? String(message.nullCount) : message.nullCount; + else + object.nullCount = options.longs === String ? $util.Long.prototype.toString.call(message.nullCount) : options.longs === Number ? new $util.LongBits(message.nullCount.low >>> 0, message.nullCount.high >>> 0).toNumber() : message.nullCount; + if (message.passRatio != null && message.hasOwnProperty("passRatio")) + object.passRatio = options.json && !isFinite(message.passRatio) ? String(message.passRatio) : message.passRatio; + if (message.passed != null && message.hasOwnProperty("passed")) + object.passed = message.passed; + if (message.passedCount != null && message.hasOwnProperty("passedCount")) + if (typeof message.passedCount === "number") + object.passedCount = options.longs === String ? String(message.passedCount) : message.passedCount; + else + object.passedCount = options.longs === String ? $util.Long.prototype.toString.call(message.passedCount) : options.longs === Number ? new $util.LongBits(message.passedCount.low >>> 0, message.passedCount.high >>> 0).toNumber() : message.passedCount; + if (message.evaluatedCount != null && message.hasOwnProperty("evaluatedCount")) + if (typeof message.evaluatedCount === "number") + object.evaluatedCount = options.longs === String ? String(message.evaluatedCount) : message.evaluatedCount; + else + object.evaluatedCount = options.longs === String ? $util.Long.prototype.toString.call(message.evaluatedCount) : options.longs === Number ? new $util.LongBits(message.evaluatedCount.low >>> 0, message.evaluatedCount.high >>> 0).toNumber() : message.evaluatedCount; + if (message.failingRowsQuery != null && message.hasOwnProperty("failingRowsQuery")) + object.failingRowsQuery = message.failingRowsQuery; + return object; + }; + + /** + * Converts this DataQualityRuleResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @instance + * @returns {Object.} JSON object + */ + DataQualityRuleResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityRuleResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRuleResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityRuleResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRuleResult"; + }; + + return DataQualityRuleResult; + })(); + + v1.DataQualityDimensionResult = (function() { + + /** + * Properties of a DataQualityDimensionResult. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityDimensionResult + * @property {boolean|null} [passed] DataQualityDimensionResult passed + */ + + /** + * Constructs a new DataQualityDimensionResult. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityDimensionResult. + * @implements IDataQualityDimensionResult + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult=} [properties] Properties to set + */ + function DataQualityDimensionResult(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]]; + } + + /** + * DataQualityDimensionResult passed. + * @member {boolean} passed + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @instance + */ + DataQualityDimensionResult.prototype.passed = false; + + /** + * Creates a new DataQualityDimensionResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult instance + */ + DataQualityDimensionResult.create = function create(properties) { + return new DataQualityDimensionResult(properties); + }; + + /** + * Encodes the specified DataQualityDimensionResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult} message DataQualityDimensionResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityDimensionResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.passed); + return writer; + }; + + /** + * Encodes the specified DataQualityDimensionResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityDimensionResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {google.cloud.dataplex.v1.IDataQualityDimensionResult} message DataQualityDimensionResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityDimensionResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityDimensionResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityDimensionResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityDimensionResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.passed = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityDimensionResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityDimensionResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityDimensionResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityDimensionResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.passed != null && message.hasOwnProperty("passed")) + if (typeof message.passed !== "boolean") + return "passed: boolean expected"; + return null; + }; + + /** + * Creates a DataQualityDimensionResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityDimensionResult} DataQualityDimensionResult + */ + DataQualityDimensionResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityDimensionResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityDimensionResult(); + if (object.passed != null) + message.passed = Boolean(object.passed); + return message; + }; + + /** + * Creates a plain object from a DataQualityDimensionResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {google.cloud.dataplex.v1.DataQualityDimensionResult} message DataQualityDimensionResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityDimensionResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.passed = false; + if (message.passed != null && message.hasOwnProperty("passed")) + object.passed = message.passed; + return object; + }; + + /** + * Converts this DataQualityDimensionResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @instance + * @returns {Object.} JSON object + */ + DataQualityDimensionResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityDimensionResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityDimensionResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityDimensionResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityDimensionResult"; + }; + + return DataQualityDimensionResult; + })(); + + v1.DataQualityRule = (function() { + + /** + * Properties of a DataQualityRule. + * @memberof google.cloud.dataplex.v1 + * @interface IDataQualityRule + * @property {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null} [rangeExpectation] DataQualityRule rangeExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null} [nonNullExpectation] DataQualityRule nonNullExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null} [setExpectation] DataQualityRule setExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null} [regexExpectation] DataQualityRule regexExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null} [uniquenessExpectation] DataQualityRule uniquenessExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null} [statisticRangeExpectation] DataQualityRule statisticRangeExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null} [rowConditionExpectation] DataQualityRule rowConditionExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null} [tableConditionExpectation] DataQualityRule tableConditionExpectation + * @property {string|null} [column] DataQualityRule column + * @property {boolean|null} [ignoreNull] DataQualityRule ignoreNull + * @property {string|null} [dimension] DataQualityRule dimension + * @property {number|null} [threshold] DataQualityRule threshold + */ + + /** + * Constructs a new DataQualityRule. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataQualityRule. + * @implements IDataQualityRule + * @constructor + * @param {google.cloud.dataplex.v1.IDataQualityRule=} [properties] Properties to set + */ + function DataQualityRule(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]]; + } + + /** + * DataQualityRule rangeExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation|null|undefined} rangeExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.rangeExpectation = null; + + /** + * DataQualityRule nonNullExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation|null|undefined} nonNullExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.nonNullExpectation = null; + + /** + * DataQualityRule setExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation|null|undefined} setExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.setExpectation = null; + + /** + * DataQualityRule regexExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation|null|undefined} regexExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.regexExpectation = null; + + /** + * DataQualityRule uniquenessExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation|null|undefined} uniquenessExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.uniquenessExpectation = null; + + /** + * DataQualityRule statisticRangeExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation|null|undefined} statisticRangeExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.statisticRangeExpectation = null; + + /** + * DataQualityRule rowConditionExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation|null|undefined} rowConditionExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.rowConditionExpectation = null; + + /** + * DataQualityRule tableConditionExpectation. + * @member {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation|null|undefined} tableConditionExpectation + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.tableConditionExpectation = null; + + /** + * DataQualityRule column. + * @member {string} column + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.column = ""; + + /** + * DataQualityRule ignoreNull. + * @member {boolean} ignoreNull + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.ignoreNull = false; + + /** + * DataQualityRule dimension. + * @member {string} dimension + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.dimension = ""; + + /** + * DataQualityRule threshold. + * @member {number} threshold + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + DataQualityRule.prototype.threshold = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataQualityRule ruleType. + * @member {"rangeExpectation"|"nonNullExpectation"|"setExpectation"|"regexExpectation"|"uniquenessExpectation"|"statisticRangeExpectation"|"rowConditionExpectation"|"tableConditionExpectation"|undefined} ruleType + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + */ + Object.defineProperty(DataQualityRule.prototype, "ruleType", { + get: $util.oneOfGetter($oneOfFields = ["rangeExpectation", "nonNullExpectation", "setExpectation", "regexExpectation", "uniquenessExpectation", "statisticRangeExpectation", "rowConditionExpectation", "tableConditionExpectation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataQualityRule instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRule=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule instance + */ + DataQualityRule.create = function create(properties) { + return new DataQualityRule(properties); + }; + + /** + * Encodes the specified DataQualityRule message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRule} message DataQualityRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rangeExpectation != null && Object.hasOwnProperty.call(message, "rangeExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.encode(message.rangeExpectation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nonNullExpectation != null && Object.hasOwnProperty.call(message, "nonNullExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.encode(message.nonNullExpectation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.setExpectation != null && Object.hasOwnProperty.call(message, "setExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.encode(message.setExpectation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.regexExpectation != null && Object.hasOwnProperty.call(message, "regexExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.encode(message.regexExpectation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.uniquenessExpectation != null && Object.hasOwnProperty.call(message, "uniquenessExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.encode(message.uniquenessExpectation, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.statisticRangeExpectation != null && Object.hasOwnProperty.call(message, "statisticRangeExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.encode(message.statisticRangeExpectation, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.rowConditionExpectation != null && Object.hasOwnProperty.call(message, "rowConditionExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.encode(message.rowConditionExpectation, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + if (message.tableConditionExpectation != null && Object.hasOwnProperty.call(message, "tableConditionExpectation")) + $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.encode(message.tableConditionExpectation, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 500, wireType 2 =*/4002).string(message.column); + if (message.ignoreNull != null && Object.hasOwnProperty.call(message, "ignoreNull")) + writer.uint32(/* id 501, wireType 0 =*/4008).bool(message.ignoreNull); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + writer.uint32(/* id 502, wireType 2 =*/4018).string(message.dimension); + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + writer.uint32(/* id 503, wireType 1 =*/4025).double(message.threshold); + return writer; + }; + + /** + * Encodes the specified DataQualityRule message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {google.cloud.dataplex.v1.IDataQualityRule} message DataQualityRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataQualityRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.decode(reader, reader.uint32()); + break; + } + case 2: { + message.nonNullExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.decode(reader, reader.uint32()); + break; + } + case 3: { + message.setExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.regexExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.decode(reader, reader.uint32()); + break; + } + case 100: { + message.uniquenessExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.decode(reader, reader.uint32()); + break; + } + case 101: { + message.statisticRangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.decode(reader, reader.uint32()); + break; + } + case 200: { + message.rowConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.decode(reader, reader.uint32()); + break; + } + case 201: { + message.tableConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.decode(reader, reader.uint32()); + break; + } + case 500: { + message.column = reader.string(); + break; + } + case 501: { + message.ignoreNull = reader.bool(); + break; + } + case 502: { + message.dimension = reader.string(); + break; + } + case 503: { + message.threshold = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataQualityRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityRule message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rangeExpectation != null && message.hasOwnProperty("rangeExpectation")) { + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify(message.rangeExpectation); + if (error) + return "rangeExpectation." + error; + } + } + if (message.nonNullExpectation != null && message.hasOwnProperty("nonNullExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify(message.nonNullExpectation); + if (error) + return "nonNullExpectation." + error; + } + } + if (message.setExpectation != null && message.hasOwnProperty("setExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify(message.setExpectation); + if (error) + return "setExpectation." + error; + } + } + if (message.regexExpectation != null && message.hasOwnProperty("regexExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify(message.regexExpectation); + if (error) + return "regexExpectation." + error; + } + } + if (message.uniquenessExpectation != null && message.hasOwnProperty("uniquenessExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify(message.uniquenessExpectation); + if (error) + return "uniquenessExpectation." + error; + } + } + if (message.statisticRangeExpectation != null && message.hasOwnProperty("statisticRangeExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify(message.statisticRangeExpectation); + if (error) + return "statisticRangeExpectation." + error; + } + } + if (message.rowConditionExpectation != null && message.hasOwnProperty("rowConditionExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify(message.rowConditionExpectation); + if (error) + return "rowConditionExpectation." + error; + } + } + if (message.tableConditionExpectation != null && message.hasOwnProperty("tableConditionExpectation")) { + if (properties.ruleType === 1) + return "ruleType: multiple values"; + properties.ruleType = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify(message.tableConditionExpectation); + if (error) + return "tableConditionExpectation." + error; + } + } + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.ignoreNull != null && message.hasOwnProperty("ignoreNull")) + if (typeof message.ignoreNull !== "boolean") + return "ignoreNull: boolean expected"; + if (message.dimension != null && message.hasOwnProperty("dimension")) + if (!$util.isString(message.dimension)) + return "dimension: string expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (typeof message.threshold !== "number") + return "threshold: number expected"; + return null; + }; + + /** + * Creates a DataQualityRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule} DataQualityRule + */ + DataQualityRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule(); + if (object.rangeExpectation != null) { + if (typeof object.rangeExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.rangeExpectation: object expected"); + message.rangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.fromObject(object.rangeExpectation); + } + if (object.nonNullExpectation != null) { + if (typeof object.nonNullExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.nonNullExpectation: object expected"); + message.nonNullExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.fromObject(object.nonNullExpectation); + } + if (object.setExpectation != null) { + if (typeof object.setExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.setExpectation: object expected"); + message.setExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.fromObject(object.setExpectation); + } + if (object.regexExpectation != null) { + if (typeof object.regexExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.regexExpectation: object expected"); + message.regexExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.fromObject(object.regexExpectation); + } + if (object.uniquenessExpectation != null) { + if (typeof object.uniquenessExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.uniquenessExpectation: object expected"); + message.uniquenessExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.fromObject(object.uniquenessExpectation); + } + if (object.statisticRangeExpectation != null) { + if (typeof object.statisticRangeExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.statisticRangeExpectation: object expected"); + message.statisticRangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.fromObject(object.statisticRangeExpectation); + } + if (object.rowConditionExpectation != null) { + if (typeof object.rowConditionExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.rowConditionExpectation: object expected"); + message.rowConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.fromObject(object.rowConditionExpectation); + } + if (object.tableConditionExpectation != null) { + if (typeof object.tableConditionExpectation !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.tableConditionExpectation: object expected"); + message.tableConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.fromObject(object.tableConditionExpectation); + } + if (object.column != null) + message.column = String(object.column); + if (object.ignoreNull != null) + message.ignoreNull = Boolean(object.ignoreNull); + if (object.dimension != null) + message.dimension = String(object.dimension); + if (object.threshold != null) + message.threshold = Number(object.threshold); + return message; + }; + + /** + * Creates a plain object from a DataQualityRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule} message DataQualityRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.column = ""; + object.ignoreNull = false; + object.dimension = ""; + object.threshold = 0; + } + if (message.rangeExpectation != null && message.hasOwnProperty("rangeExpectation")) { + object.rangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.toObject(message.rangeExpectation, options); + if (options.oneofs) + object.ruleType = "rangeExpectation"; + } + if (message.nonNullExpectation != null && message.hasOwnProperty("nonNullExpectation")) { + object.nonNullExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.toObject(message.nonNullExpectation, options); + if (options.oneofs) + object.ruleType = "nonNullExpectation"; + } + if (message.setExpectation != null && message.hasOwnProperty("setExpectation")) { + object.setExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation.toObject(message.setExpectation, options); + if (options.oneofs) + object.ruleType = "setExpectation"; + } + if (message.regexExpectation != null && message.hasOwnProperty("regexExpectation")) { + object.regexExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.toObject(message.regexExpectation, options); + if (options.oneofs) + object.ruleType = "regexExpectation"; + } + if (message.uniquenessExpectation != null && message.hasOwnProperty("uniquenessExpectation")) { + object.uniquenessExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.toObject(message.uniquenessExpectation, options); + if (options.oneofs) + object.ruleType = "uniquenessExpectation"; + } + if (message.statisticRangeExpectation != null && message.hasOwnProperty("statisticRangeExpectation")) { + object.statisticRangeExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.toObject(message.statisticRangeExpectation, options); + if (options.oneofs) + object.ruleType = "statisticRangeExpectation"; + } + if (message.rowConditionExpectation != null && message.hasOwnProperty("rowConditionExpectation")) { + object.rowConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.toObject(message.rowConditionExpectation, options); + if (options.oneofs) + object.ruleType = "rowConditionExpectation"; + } + if (message.tableConditionExpectation != null && message.hasOwnProperty("tableConditionExpectation")) { + object.tableConditionExpectation = $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.toObject(message.tableConditionExpectation, options); + if (options.oneofs) + object.ruleType = "tableConditionExpectation"; + } + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.ignoreNull != null && message.hasOwnProperty("ignoreNull")) + object.ignoreNull = message.ignoreNull; + if (message.dimension != null && message.hasOwnProperty("dimension")) + object.dimension = message.dimension; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = options.json && !isFinite(message.threshold) ? String(message.threshold) : message.threshold; + return object; + }; + + /** + * Converts this DataQualityRule to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @instance + * @returns {Object.} JSON object + */ + DataQualityRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityRule + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule"; + }; + + DataQualityRule.RangeExpectation = (function() { + + /** + * Properties of a RangeExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface IRangeExpectation + * @property {string|null} [minValue] RangeExpectation minValue + * @property {string|null} [maxValue] RangeExpectation maxValue + * @property {boolean|null} [strictMinEnabled] RangeExpectation strictMinEnabled + * @property {boolean|null} [strictMaxEnabled] RangeExpectation strictMaxEnabled + */ + + /** + * Constructs a new RangeExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a RangeExpectation. + * @implements IRangeExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation=} [properties] Properties to set + */ + function RangeExpectation(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]]; + } + + /** + * RangeExpectation minValue. + * @member {string} minValue + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @instance + */ + RangeExpectation.prototype.minValue = ""; + + /** + * RangeExpectation maxValue. + * @member {string} maxValue + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @instance + */ + RangeExpectation.prototype.maxValue = ""; + + /** + * RangeExpectation strictMinEnabled. + * @member {boolean} strictMinEnabled + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @instance + */ + RangeExpectation.prototype.strictMinEnabled = false; + + /** + * RangeExpectation strictMaxEnabled. + * @member {boolean} strictMaxEnabled + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @instance + */ + RangeExpectation.prototype.strictMaxEnabled = false; + + /** + * Creates a new RangeExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation instance + */ + RangeExpectation.create = function create(properties) { + return new RangeExpectation(properties); + }; + + /** + * Encodes the specified RangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation} message RangeExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RangeExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minValue != null && Object.hasOwnProperty.call(message, "minValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.minValue); + if (message.maxValue != null && Object.hasOwnProperty.call(message, "maxValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.maxValue); + if (message.strictMinEnabled != null && Object.hasOwnProperty.call(message, "strictMinEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.strictMinEnabled); + if (message.strictMaxEnabled != null && Object.hasOwnProperty.call(message, "strictMaxEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strictMaxEnabled); + return writer; + }; + + /** + * Encodes the specified RangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RangeExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRangeExpectation} message RangeExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RangeExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RangeExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RangeExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minValue = reader.string(); + break; + } + case 2: { + message.maxValue = reader.string(); + break; + } + case 3: { + message.strictMinEnabled = reader.bool(); + break; + } + case 4: { + message.strictMaxEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RangeExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RangeExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RangeExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RangeExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minValue != null && message.hasOwnProperty("minValue")) + if (!$util.isString(message.minValue)) + return "minValue: string expected"; + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + if (!$util.isString(message.maxValue)) + return "maxValue: string expected"; + if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) + if (typeof message.strictMinEnabled !== "boolean") + return "strictMinEnabled: boolean expected"; + if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) + if (typeof message.strictMaxEnabled !== "boolean") + return "strictMaxEnabled: boolean expected"; + return null; + }; + + /** + * Creates a RangeExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} RangeExpectation + */ + RangeExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation(); + if (object.minValue != null) + message.minValue = String(object.minValue); + if (object.maxValue != null) + message.maxValue = String(object.maxValue); + if (object.strictMinEnabled != null) + message.strictMinEnabled = Boolean(object.strictMinEnabled); + if (object.strictMaxEnabled != null) + message.strictMaxEnabled = Boolean(object.strictMaxEnabled); + return message; + }; + + /** + * Creates a plain object from a RangeExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.RangeExpectation} message RangeExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RangeExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.minValue = ""; + object.maxValue = ""; + object.strictMinEnabled = false; + object.strictMaxEnabled = false; + } + if (message.minValue != null && message.hasOwnProperty("minValue")) + object.minValue = message.minValue; + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + object.maxValue = message.maxValue; + if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) + object.strictMinEnabled = message.strictMinEnabled; + if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) + object.strictMaxEnabled = message.strictMaxEnabled; + return object; + }; + + /** + * Converts this RangeExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @instance + * @returns {Object.} JSON object + */ + RangeExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RangeExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.RangeExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RangeExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.RangeExpectation"; + }; + + return RangeExpectation; + })(); + + DataQualityRule.NonNullExpectation = (function() { + + /** + * Properties of a NonNullExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface INonNullExpectation + */ + + /** + * Constructs a new NonNullExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a NonNullExpectation. + * @implements INonNullExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation=} [properties] Properties to set + */ + function NonNullExpectation(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]]; + } + + /** + * Creates a new NonNullExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation instance + */ + NonNullExpectation.create = function create(properties) { + return new NonNullExpectation(properties); + }; + + /** + * Encodes the specified NonNullExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation} message NonNullExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NonNullExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified NonNullExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.INonNullExpectation} message NonNullExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NonNullExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NonNullExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NonNullExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NonNullExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NonNullExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NonNullExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NonNullExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a NonNullExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} NonNullExpectation + */ + NonNullExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation) + return object; + return new $root.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation(); + }; + + /** + * Creates a plain object from a NonNullExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation} message NonNullExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NonNullExpectation.toObject = function toObject() { + return {}; + }; + + /** + * Converts this NonNullExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @instance + * @returns {Object.} JSON object + */ + NonNullExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NonNullExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NonNullExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation"; + }; + + return NonNullExpectation; + })(); + + DataQualityRule.SetExpectation = (function() { + + /** + * Properties of a SetExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface ISetExpectation + * @property {Array.|null} [values] SetExpectation values + */ + + /** + * Constructs a new SetExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a SetExpectation. + * @implements ISetExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation=} [properties] Properties to set + */ + function SetExpectation(properties) { + this.values = []; + 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]]; + } + + /** + * SetExpectation values. + * @member {Array.} values + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @instance + */ + SetExpectation.prototype.values = $util.emptyArray; + + /** + * Creates a new SetExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation instance + */ + SetExpectation.create = function create(properties) { + return new SetExpectation(properties); + }; + + /** + * Encodes the specified SetExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation} message SetExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified SetExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.SetExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ISetExpectation} message SetExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a SetExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} SetExpectation + */ + SetExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.SetExpectation(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.dataplex.v1.DataQualityRule.SetExpectation.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a SetExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.SetExpectation} message SetExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this SetExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @instance + * @returns {Object.} JSON object + */ + SetExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.SetExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.SetExpectation"; + }; + + return SetExpectation; + })(); + + DataQualityRule.RegexExpectation = (function() { + + /** + * Properties of a RegexExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface IRegexExpectation + * @property {string|null} [regex] RegexExpectation regex + */ + + /** + * Constructs a new RegexExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a RegexExpectation. + * @implements IRegexExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation=} [properties] Properties to set + */ + function RegexExpectation(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]]; + } + + /** + * RegexExpectation regex. + * @member {string} regex + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @instance + */ + RegexExpectation.prototype.regex = ""; + + /** + * Creates a new RegexExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation instance + */ + RegexExpectation.create = function create(properties) { + return new RegexExpectation(properties); + }; + + /** + * Encodes the specified RegexExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation} message RegexExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegexExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.regex != null && Object.hasOwnProperty.call(message, "regex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.regex); + return writer; + }; + + /** + * Encodes the specified RegexExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RegexExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRegexExpectation} message RegexExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegexExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegexExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegexExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.regex = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RegexExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegexExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegexExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegexExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.regex != null && message.hasOwnProperty("regex")) + if (!$util.isString(message.regex)) + return "regex: string expected"; + return null; + }; + + /** + * Creates a RegexExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} RegexExpectation + */ + RegexExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation(); + if (object.regex != null) + message.regex = String(object.regex); + return message; + }; + + /** + * Creates a plain object from a RegexExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.RegexExpectation} message RegexExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegexExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.regex = ""; + if (message.regex != null && message.hasOwnProperty("regex")) + object.regex = message.regex; + return object; + }; + + /** + * Converts this RegexExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @instance + * @returns {Object.} JSON object + */ + RegexExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegexExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.RegexExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegexExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.RegexExpectation"; + }; + + return RegexExpectation; + })(); + + DataQualityRule.UniquenessExpectation = (function() { + + /** + * Properties of an UniquenessExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface IUniquenessExpectation + */ + + /** + * Constructs a new UniquenessExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents an UniquenessExpectation. + * @implements IUniquenessExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation=} [properties] Properties to set + */ + function UniquenessExpectation(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]]; + } + + /** + * Creates a new UniquenessExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation instance + */ + UniquenessExpectation.create = function create(properties) { + return new UniquenessExpectation(properties); + }; + + /** + * Encodes the specified UniquenessExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation} message UniquenessExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UniquenessExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified UniquenessExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IUniquenessExpectation} message UniquenessExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UniquenessExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UniquenessExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UniquenessExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UniquenessExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UniquenessExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UniquenessExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UniquenessExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an UniquenessExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} UniquenessExpectation + */ + UniquenessExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation) + return object; + return new $root.google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation(); + }; + + /** + * Creates a plain object from an UniquenessExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation} message UniquenessExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UniquenessExpectation.toObject = function toObject() { + return {}; + }; + + /** + * Converts this UniquenessExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @instance + * @returns {Object.} JSON object + */ + UniquenessExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UniquenessExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UniquenessExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation"; + }; + + return UniquenessExpectation; + })(); + + DataQualityRule.StatisticRangeExpectation = (function() { + + /** + * Properties of a StatisticRangeExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface IStatisticRangeExpectation + * @property {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic|null} [statistic] StatisticRangeExpectation statistic + * @property {string|null} [minValue] StatisticRangeExpectation minValue + * @property {string|null} [maxValue] StatisticRangeExpectation maxValue + * @property {boolean|null} [strictMinEnabled] StatisticRangeExpectation strictMinEnabled + * @property {boolean|null} [strictMaxEnabled] StatisticRangeExpectation strictMaxEnabled + */ + + /** + * Constructs a new StatisticRangeExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a StatisticRangeExpectation. + * @implements IStatisticRangeExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation=} [properties] Properties to set + */ + function StatisticRangeExpectation(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]]; + } + + /** + * StatisticRangeExpectation statistic. + * @member {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic} statistic + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + */ + StatisticRangeExpectation.prototype.statistic = 0; + + /** + * StatisticRangeExpectation minValue. + * @member {string} minValue + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + */ + StatisticRangeExpectation.prototype.minValue = ""; + + /** + * StatisticRangeExpectation maxValue. + * @member {string} maxValue + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + */ + StatisticRangeExpectation.prototype.maxValue = ""; + + /** + * StatisticRangeExpectation strictMinEnabled. + * @member {boolean} strictMinEnabled + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + */ + StatisticRangeExpectation.prototype.strictMinEnabled = false; + + /** + * StatisticRangeExpectation strictMaxEnabled. + * @member {boolean} strictMaxEnabled + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + */ + StatisticRangeExpectation.prototype.strictMaxEnabled = false; + + /** + * Creates a new StatisticRangeExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation instance + */ + StatisticRangeExpectation.create = function create(properties) { + return new StatisticRangeExpectation(properties); + }; + + /** + * Encodes the specified StatisticRangeExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation} message StatisticRangeExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticRangeExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.statistic != null && Object.hasOwnProperty.call(message, "statistic")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.statistic); + if (message.minValue != null && Object.hasOwnProperty.call(message, "minValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.minValue); + if (message.maxValue != null && Object.hasOwnProperty.call(message, "maxValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.maxValue); + if (message.strictMinEnabled != null && Object.hasOwnProperty.call(message, "strictMinEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.strictMinEnabled); + if (message.strictMaxEnabled != null && Object.hasOwnProperty.call(message, "strictMaxEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.strictMaxEnabled); + return writer; + }; + + /** + * Encodes the specified StatisticRangeExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IStatisticRangeExpectation} message StatisticRangeExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticRangeExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatisticRangeExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticRangeExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.statistic = reader.int32(); + break; + } + case 2: { + message.minValue = reader.string(); + break; + } + case 3: { + message.maxValue = reader.string(); + break; + } + case 4: { + message.strictMinEnabled = reader.bool(); + break; + } + case 5: { + message.strictMaxEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatisticRangeExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticRangeExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatisticRangeExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatisticRangeExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.statistic != null && message.hasOwnProperty("statistic")) + switch (message.statistic) { + default: + return "statistic: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.minValue != null && message.hasOwnProperty("minValue")) + if (!$util.isString(message.minValue)) + return "minValue: string expected"; + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + if (!$util.isString(message.maxValue)) + return "maxValue: string expected"; + if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) + if (typeof message.strictMinEnabled !== "boolean") + return "strictMinEnabled: boolean expected"; + if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) + if (typeof message.strictMaxEnabled !== "boolean") + return "strictMaxEnabled: boolean expected"; + return null; + }; + + /** + * Creates a StatisticRangeExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} StatisticRangeExpectation + */ + StatisticRangeExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation(); + switch (object.statistic) { + default: + if (typeof object.statistic === "number") { + message.statistic = object.statistic; + break; + } + break; + case "STATISTIC_UNDEFINED": + case 0: + message.statistic = 0; + break; + case "MEAN": + case 1: + message.statistic = 1; + break; + case "MIN": + case 2: + message.statistic = 2; + break; + case "MAX": + case 3: + message.statistic = 3; + break; + } + if (object.minValue != null) + message.minValue = String(object.minValue); + if (object.maxValue != null) + message.maxValue = String(object.maxValue); + if (object.strictMinEnabled != null) + message.strictMinEnabled = Boolean(object.strictMinEnabled); + if (object.strictMaxEnabled != null) + message.strictMaxEnabled = Boolean(object.strictMaxEnabled); + return message; + }; + + /** + * Creates a plain object from a StatisticRangeExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation} message StatisticRangeExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatisticRangeExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.statistic = options.enums === String ? "STATISTIC_UNDEFINED" : 0; + object.minValue = ""; + object.maxValue = ""; + object.strictMinEnabled = false; + object.strictMaxEnabled = false; + } + if (message.statistic != null && message.hasOwnProperty("statistic")) + object.statistic = options.enums === String ? $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic[message.statistic] === undefined ? message.statistic : $root.google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic[message.statistic] : message.statistic; + if (message.minValue != null && message.hasOwnProperty("minValue")) + object.minValue = message.minValue; + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + object.maxValue = message.maxValue; + if (message.strictMinEnabled != null && message.hasOwnProperty("strictMinEnabled")) + object.strictMinEnabled = message.strictMinEnabled; + if (message.strictMaxEnabled != null && message.hasOwnProperty("strictMaxEnabled")) + object.strictMaxEnabled = message.strictMaxEnabled; + return object; + }; + + /** + * Converts this StatisticRangeExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @instance + * @returns {Object.} JSON object + */ + StatisticRangeExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StatisticRangeExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatisticRangeExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation"; + }; + + /** + * ColumnStatistic enum. + * @name google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic + * @enum {number} + * @property {number} STATISTIC_UNDEFINED=0 STATISTIC_UNDEFINED value + * @property {number} MEAN=1 MEAN value + * @property {number} MIN=2 MIN value + * @property {number} MAX=3 MAX value + */ + StatisticRangeExpectation.ColumnStatistic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATISTIC_UNDEFINED"] = 0; + values[valuesById[1] = "MEAN"] = 1; + values[valuesById[2] = "MIN"] = 2; + values[valuesById[3] = "MAX"] = 3; + return values; + })(); + + return StatisticRangeExpectation; + })(); + + DataQualityRule.RowConditionExpectation = (function() { + + /** + * Properties of a RowConditionExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface IRowConditionExpectation + * @property {string|null} [sqlExpression] RowConditionExpectation sqlExpression + */ + + /** + * Constructs a new RowConditionExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a RowConditionExpectation. + * @implements IRowConditionExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation=} [properties] Properties to set + */ + function RowConditionExpectation(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]]; + } + + /** + * RowConditionExpectation sqlExpression. + * @member {string} sqlExpression + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @instance + */ + RowConditionExpectation.prototype.sqlExpression = ""; + + /** + * Creates a new RowConditionExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation instance + */ + RowConditionExpectation.create = function create(properties) { + return new RowConditionExpectation(properties); + }; + + /** + * Encodes the specified RowConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation} message RowConditionExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowConditionExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlExpression != null && Object.hasOwnProperty.call(message, "sqlExpression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlExpression); + return writer; + }; + + /** + * Encodes the specified RowConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.IRowConditionExpectation} message RowConditionExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RowConditionExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RowConditionExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowConditionExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlExpression = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RowConditionExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RowConditionExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RowConditionExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RowConditionExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) + if (!$util.isString(message.sqlExpression)) + return "sqlExpression: string expected"; + return null; + }; + + /** + * Creates a RowConditionExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} RowConditionExpectation + */ + RowConditionExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation(); + if (object.sqlExpression != null) + message.sqlExpression = String(object.sqlExpression); + return message; + }; + + /** + * Creates a plain object from a RowConditionExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation} message RowConditionExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RowConditionExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sqlExpression = ""; + if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) + object.sqlExpression = message.sqlExpression; + return object; + }; + + /** + * Converts this RowConditionExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @instance + * @returns {Object.} JSON object + */ + RowConditionExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RowConditionExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RowConditionExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation"; + }; + + return RowConditionExpectation; + })(); + + DataQualityRule.TableConditionExpectation = (function() { + + /** + * Properties of a TableConditionExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @interface ITableConditionExpectation + * @property {string|null} [sqlExpression] TableConditionExpectation sqlExpression + */ + + /** + * Constructs a new TableConditionExpectation. + * @memberof google.cloud.dataplex.v1.DataQualityRule + * @classdesc Represents a TableConditionExpectation. + * @implements ITableConditionExpectation + * @constructor + * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation=} [properties] Properties to set + */ + function TableConditionExpectation(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]]; + } + + /** + * TableConditionExpectation sqlExpression. + * @member {string} sqlExpression + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @instance + */ + TableConditionExpectation.prototype.sqlExpression = ""; + + /** + * Creates a new TableConditionExpectation instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation instance + */ + TableConditionExpectation.create = function create(properties) { + return new TableConditionExpectation(properties); + }; + + /** + * Encodes the specified TableConditionExpectation message. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation} message TableConditionExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableConditionExpectation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlExpression != null && Object.hasOwnProperty.call(message, "sqlExpression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlExpression); + return writer; + }; + + /** + * Encodes the specified TableConditionExpectation message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.ITableConditionExpectation} message TableConditionExpectation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableConditionExpectation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableConditionExpectation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableConditionExpectation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlExpression = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableConditionExpectation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableConditionExpectation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableConditionExpectation message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableConditionExpectation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) + if (!$util.isString(message.sqlExpression)) + return "sqlExpression: string expected"; + return null; + }; + + /** + * Creates a TableConditionExpectation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} TableConditionExpectation + */ + TableConditionExpectation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation) + return object; + var message = new $root.google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation(); + if (object.sqlExpression != null) + message.sqlExpression = String(object.sqlExpression); + return message; + }; + + /** + * Creates a plain object from a TableConditionExpectation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation} message TableConditionExpectation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableConditionExpectation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sqlExpression = ""; + if (message.sqlExpression != null && message.hasOwnProperty("sqlExpression")) + object.sqlExpression = message.sqlExpression; + return object; + }; + + /** + * Converts this TableConditionExpectation to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @instance + * @returns {Object.} JSON object + */ + TableConditionExpectation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableConditionExpectation + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableConditionExpectation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation"; + }; + + return TableConditionExpectation; + })(); + + return DataQualityRule; + })(); + + v1.DataScanService = (function() { + + /** + * Constructs a new DataScanService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataScanService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function DataScanService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataScanService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataScanService; + + /** + * Creates new DataScanService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DataScanService} RPC service. Useful where requests and/or responses are streamed. + */ + DataScanService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|createDataScan}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef CreateDataScanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateDataScan. + * @function createDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} request CreateDataScanRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.CreateDataScanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.createDataScan = function createDataScan(request, callback) { + return this.rpcCall(createDataScan, $root.google.cloud.dataplex.v1.CreateDataScanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateDataScan" }); + + /** + * Calls CreateDataScan. + * @function createDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} request CreateDataScanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|updateDataScan}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef UpdateDataScanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDataScan. + * @function updateDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} request UpdateDataScanRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.UpdateDataScanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.updateDataScan = function updateDataScan(request, callback) { + return this.rpcCall(updateDataScan, $root.google.cloud.dataplex.v1.UpdateDataScanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataScan" }); + + /** + * Calls UpdateDataScan. + * @function updateDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} request UpdateDataScanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|deleteDataScan}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef DeleteDataScanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteDataScan. + * @function deleteDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} request DeleteDataScanRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.DeleteDataScanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.deleteDataScan = function deleteDataScan(request, callback) { + return this.rpcCall(deleteDataScan, $root.google.cloud.dataplex.v1.DeleteDataScanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteDataScan" }); + + /** + * Calls DeleteDataScan. + * @function deleteDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} request DeleteDataScanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScan}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef GetDataScanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.DataScan} [response] DataScan + */ + + /** + * Calls GetDataScan. + * @function getDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataScanRequest} request GetDataScanRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.GetDataScanCallback} callback Node-style callback called with the error, if any, and DataScan + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.getDataScan = function getDataScan(request, callback) { + return this.rpcCall(getDataScan, $root.google.cloud.dataplex.v1.GetDataScanRequest, $root.google.cloud.dataplex.v1.DataScan, request, callback); + }, "name", { value: "GetDataScan" }); + + /** + * Calls GetDataScan. + * @function getDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataScanRequest} request GetDataScanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScans}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef ListDataScansCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListDataScansResponse} [response] ListDataScansResponse + */ + + /** + * Calls ListDataScans. + * @function listDataScans + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IListDataScansRequest} request ListDataScansRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.ListDataScansCallback} callback Node-style callback called with the error, if any, and ListDataScansResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.listDataScans = function listDataScans(request, callback) { + return this.rpcCall(listDataScans, $root.google.cloud.dataplex.v1.ListDataScansRequest, $root.google.cloud.dataplex.v1.ListDataScansResponse, request, callback); + }, "name", { value: "ListDataScans" }); + + /** + * Calls ListDataScans. + * @function listDataScans + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IListDataScansRequest} request ListDataScansRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|runDataScan}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef RunDataScanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.RunDataScanResponse} [response] RunDataScanResponse + */ + + /** + * Calls RunDataScan. + * @function runDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IRunDataScanRequest} request RunDataScanRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.RunDataScanCallback} callback Node-style callback called with the error, if any, and RunDataScanResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.runDataScan = function runDataScan(request, callback) { + return this.rpcCall(runDataScan, $root.google.cloud.dataplex.v1.RunDataScanRequest, $root.google.cloud.dataplex.v1.RunDataScanResponse, request, callback); + }, "name", { value: "RunDataScan" }); + + /** + * Calls RunDataScan. + * @function runDataScan + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IRunDataScanRequest} request RunDataScanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|getDataScanJob}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef GetDataScanJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.DataScanJob} [response] DataScanJob + */ + + /** + * Calls GetDataScanJob. + * @function getDataScanJob + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} request GetDataScanJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.GetDataScanJobCallback} callback Node-style callback called with the error, if any, and DataScanJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.getDataScanJob = function getDataScanJob(request, callback) { + return this.rpcCall(getDataScanJob, $root.google.cloud.dataplex.v1.GetDataScanJobRequest, $root.google.cloud.dataplex.v1.DataScanJob, request, callback); + }, "name", { value: "GetDataScanJob" }); + + /** + * Calls GetDataScanJob. + * @function getDataScanJob + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} request GetDataScanJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataScanService|listDataScanJobs}. + * @memberof google.cloud.dataplex.v1.DataScanService + * @typedef ListDataScanJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListDataScanJobsResponse} [response] ListDataScanJobsResponse + */ + + /** + * Calls ListDataScanJobs. + * @function listDataScanJobs + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} request ListDataScanJobsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataScanService.ListDataScanJobsCallback} callback Node-style callback called with the error, if any, and ListDataScanJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataScanService.prototype.listDataScanJobs = function listDataScanJobs(request, callback) { + return this.rpcCall(listDataScanJobs, $root.google.cloud.dataplex.v1.ListDataScanJobsRequest, $root.google.cloud.dataplex.v1.ListDataScanJobsResponse, request, callback); + }, "name", { value: "ListDataScanJobs" }); + + /** + * Calls ListDataScanJobs. + * @function listDataScanJobs + * @memberof google.cloud.dataplex.v1.DataScanService + * @instance + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} request ListDataScanJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataScanService; + })(); + + v1.CreateDataScanRequest = (function() { + + /** + * Properties of a CreateDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateDataScanRequest + * @property {string|null} [parent] CreateDataScanRequest parent + * @property {google.cloud.dataplex.v1.IDataScan|null} [dataScan] CreateDataScanRequest dataScan + * @property {string|null} [dataScanId] CreateDataScanRequest dataScanId + */ + + /** + * Constructs a new CreateDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateDataScanRequest. + * @implements ICreateDataScanRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest=} [properties] Properties to set + */ + function CreateDataScanRequest(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]]; + } + + /** + * CreateDataScanRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @instance + */ + CreateDataScanRequest.prototype.parent = ""; + + /** + * CreateDataScanRequest dataScan. + * @member {google.cloud.dataplex.v1.IDataScan|null|undefined} dataScan + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @instance + */ + CreateDataScanRequest.prototype.dataScan = null; + + /** + * CreateDataScanRequest dataScanId. + * @member {string} dataScanId + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @instance + */ + CreateDataScanRequest.prototype.dataScanId = ""; + + /** + * Creates a new CreateDataScanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest instance + */ + CreateDataScanRequest.create = function create(properties) { + return new CreateDataScanRequest(properties); + }; + + /** + * Encodes the specified CreateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} message CreateDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataScanRequest.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.dataScan != null && Object.hasOwnProperty.call(message, "dataScan")) + $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScan, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dataScanId != null && Object.hasOwnProperty.call(message, "dataScanId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dataScanId); + return writer; + }; + + /** + * Encodes the specified CreateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateDataScanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateDataScanRequest} message CreateDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataScanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataScanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateDataScanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataScan = $root.google.cloud.dataplex.v1.DataScan.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dataScanId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataScanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataScanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataScanRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataScanRequest.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.dataScan != null && message.hasOwnProperty("dataScan")) { + var error = $root.google.cloud.dataplex.v1.DataScan.verify(message.dataScan); + if (error) + return "dataScan." + error; + } + if (message.dataScanId != null && message.hasOwnProperty("dataScanId")) + if (!$util.isString(message.dataScanId)) + return "dataScanId: string expected"; + return null; + }; + + /** + * Creates a CreateDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateDataScanRequest} CreateDataScanRequest + */ + CreateDataScanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateDataScanRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateDataScanRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataScan != null) { + if (typeof object.dataScan !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateDataScanRequest.dataScan: object expected"); + message.dataScan = $root.google.cloud.dataplex.v1.DataScan.fromObject(object.dataScan); + } + if (object.dataScanId != null) + message.dataScanId = String(object.dataScanId); + return message; + }; + + /** + * Creates a plain object from a CreateDataScanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.CreateDataScanRequest} message CreateDataScanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataScanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataScan = null; + object.dataScanId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataScan != null && message.hasOwnProperty("dataScan")) + object.dataScan = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScan, options); + if (message.dataScanId != null && message.hasOwnProperty("dataScanId")) + object.dataScanId = message.dataScanId; + return object; + }; + + /** + * Converts this CreateDataScanRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataScanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataScanRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateDataScanRequest"; + }; + + return CreateDataScanRequest; + })(); + + v1.UpdateDataScanRequest = (function() { + + /** + * Properties of an UpdateDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateDataScanRequest + * @property {google.cloud.dataplex.v1.IDataScan|null} [dataScan] UpdateDataScanRequest dataScan + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataScanRequest updateMask + */ + + /** + * Constructs a new UpdateDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateDataScanRequest. + * @implements IUpdateDataScanRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest=} [properties] Properties to set + */ + function UpdateDataScanRequest(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]]; + } + + /** + * UpdateDataScanRequest dataScan. + * @member {google.cloud.dataplex.v1.IDataScan|null|undefined} dataScan + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @instance + */ + UpdateDataScanRequest.prototype.dataScan = null; + + /** + * UpdateDataScanRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @instance + */ + UpdateDataScanRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDataScanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest instance + */ + UpdateDataScanRequest.create = function create(properties) { + return new UpdateDataScanRequest(properties); + }; + + /** + * Encodes the specified UpdateDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} message UpdateDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataScanRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataScan != null && Object.hasOwnProperty.call(message, "dataScan")) + $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScan, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateDataScanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateDataScanRequest} message UpdateDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataScanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataScanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateDataScanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataScan = $root.google.cloud.dataplex.v1.DataScan.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataScanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataScanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataScanRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataScanRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataScan != null && message.hasOwnProperty("dataScan")) { + var error = $root.google.cloud.dataplex.v1.DataScan.verify(message.dataScan); + if (error) + return "dataScan." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateDataScanRequest} UpdateDataScanRequest + */ + UpdateDataScanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateDataScanRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateDataScanRequest(); + if (object.dataScan != null) { + if (typeof object.dataScan !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateDataScanRequest.dataScan: object expected"); + message.dataScan = $root.google.cloud.dataplex.v1.DataScan.fromObject(object.dataScan); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateDataScanRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDataScanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateDataScanRequest} message UpdateDataScanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataScanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataScan = null; + object.updateMask = null; + } + if (message.dataScan != null && message.hasOwnProperty("dataScan")) + object.dataScan = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScan, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDataScanRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataScanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataScanRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateDataScanRequest"; + }; + + return UpdateDataScanRequest; + })(); + + v1.DeleteDataScanRequest = (function() { + + /** + * Properties of a DeleteDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteDataScanRequest + * @property {string|null} [name] DeleteDataScanRequest name + */ + + /** + * Constructs a new DeleteDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteDataScanRequest. + * @implements IDeleteDataScanRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest=} [properties] Properties to set + */ + function DeleteDataScanRequest(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]]; + } + + /** + * DeleteDataScanRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @instance + */ + DeleteDataScanRequest.prototype.name = ""; + + /** + * Creates a new DeleteDataScanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest instance + */ + DeleteDataScanRequest.create = function create(properties) { + return new DeleteDataScanRequest(properties); + }; + + /** + * Encodes the specified DeleteDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} message DeleteDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataScanRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteDataScanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteDataScanRequest} message DeleteDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataScanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataScanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteDataScanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataScanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataScanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataScanRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataScanRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteDataScanRequest} DeleteDataScanRequest + */ + DeleteDataScanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteDataScanRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteDataScanRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDataScanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteDataScanRequest} message DeleteDataScanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataScanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteDataScanRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataScanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataScanRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteDataScanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteDataScanRequest"; + }; + + return DeleteDataScanRequest; + })(); + + v1.GetDataScanRequest = (function() { + + /** + * Properties of a GetDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetDataScanRequest + * @property {string|null} [name] GetDataScanRequest name + * @property {google.cloud.dataplex.v1.GetDataScanRequest.DataScanView|null} [view] GetDataScanRequest view + */ + + /** + * Constructs a new GetDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetDataScanRequest. + * @implements IGetDataScanRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetDataScanRequest=} [properties] Properties to set + */ + function GetDataScanRequest(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]]; + } + + /** + * GetDataScanRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @instance + */ + GetDataScanRequest.prototype.name = ""; + + /** + * GetDataScanRequest view. + * @member {google.cloud.dataplex.v1.GetDataScanRequest.DataScanView} view + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @instance + */ + GetDataScanRequest.prototype.view = 0; + + /** + * Creates a new GetDataScanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest instance + */ + GetDataScanRequest.create = function create(properties) { + return new GetDataScanRequest(properties); + }; + + /** + * Encodes the specified GetDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanRequest} message GetDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataScanRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanRequest} message GetDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataScanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataScanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataScanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataScanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataScanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataScanRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataScanRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 10: + break; + } + return null; + }; + + /** + * Creates a GetDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetDataScanRequest} GetDataScanRequest + */ + GetDataScanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetDataScanRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetDataScanRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "DATA_SCAN_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 10: + message.view = 10; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetDataScanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.GetDataScanRequest} message GetDataScanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataScanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "DATA_SCAN_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetDataScanRequest.DataScanView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetDataScanRequest.DataScanView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetDataScanRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataScanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataScanRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetDataScanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataScanRequest"; + }; + + /** + * DataScanView enum. + * @name google.cloud.dataplex.v1.GetDataScanRequest.DataScanView + * @enum {number} + * @property {number} DATA_SCAN_VIEW_UNSPECIFIED=0 DATA_SCAN_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=10 FULL value + */ + GetDataScanRequest.DataScanView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_SCAN_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[10] = "FULL"] = 10; + return values; + })(); + + return GetDataScanRequest; + })(); + + v1.ListDataScansRequest = (function() { + + /** + * Properties of a ListDataScansRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataScansRequest + * @property {string|null} [parent] ListDataScansRequest parent + * @property {number|null} [pageSize] ListDataScansRequest pageSize + * @property {string|null} [pageToken] ListDataScansRequest pageToken + * @property {string|null} [filter] ListDataScansRequest filter + * @property {string|null} [orderBy] ListDataScansRequest orderBy + */ + + /** + * Constructs a new ListDataScansRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataScansRequest. + * @implements IListDataScansRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListDataScansRequest=} [properties] Properties to set + */ + function ListDataScansRequest(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]]; + } + + /** + * ListDataScansRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + */ + ListDataScansRequest.prototype.parent = ""; + + /** + * ListDataScansRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + */ + ListDataScansRequest.prototype.pageSize = 0; + + /** + * ListDataScansRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + */ + ListDataScansRequest.prototype.pageToken = ""; + + /** + * ListDataScansRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + */ + ListDataScansRequest.prototype.filter = ""; + + /** + * ListDataScansRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + */ + ListDataScansRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataScansRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScansRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest instance + */ + ListDataScansRequest.create = function create(properties) { + return new ListDataScansRequest(properties); + }; + + /** + * Encodes the specified ListDataScansRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScansRequest} message ListDataScansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScansRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListDataScansRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScansRequest} message ListDataScansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScansRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataScansRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScansRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScansRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataScansRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScansRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataScansRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataScansRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListDataScansRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataScansRequest} ListDataScansRequest + */ + ListDataScansRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataScansRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataScansRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListDataScansRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {google.cloud.dataplex.v1.ListDataScansRequest} message ListDataScansRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataScansRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListDataScansRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataScansRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataScansRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataScansRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataScansRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScansRequest"; + }; + + return ListDataScansRequest; + })(); + + v1.ListDataScansResponse = (function() { + + /** + * Properties of a ListDataScansResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataScansResponse + * @property {Array.|null} [dataScans] ListDataScansResponse dataScans + * @property {string|null} [nextPageToken] ListDataScansResponse nextPageToken + * @property {Array.|null} [unreachable] ListDataScansResponse unreachable + */ + + /** + * Constructs a new ListDataScansResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataScansResponse. + * @implements IListDataScansResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListDataScansResponse=} [properties] Properties to set + */ + function ListDataScansResponse(properties) { + this.dataScans = []; + 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]]; + } + + /** + * ListDataScansResponse dataScans. + * @member {Array.} dataScans + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @instance + */ + ListDataScansResponse.prototype.dataScans = $util.emptyArray; + + /** + * ListDataScansResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @instance + */ + ListDataScansResponse.prototype.nextPageToken = ""; + + /** + * ListDataScansResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @instance + */ + ListDataScansResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDataScansResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScansResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse instance + */ + ListDataScansResponse.create = function create(properties) { + return new ListDataScansResponse(properties); + }; + + /** + * Encodes the specified ListDataScansResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScansResponse} message ListDataScansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScansResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataScans != null && message.dataScans.length) + for (var i = 0; i < message.dataScans.length; ++i) + $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScans[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListDataScansResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScansResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScansResponse} message ListDataScansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScansResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataScansResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScansResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScansResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataScans && message.dataScans.length)) + message.dataScans = []; + message.dataScans.push($root.google.cloud.dataplex.v1.DataScan.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataScansResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScansResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataScansResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataScansResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataScans != null && message.hasOwnProperty("dataScans")) { + if (!Array.isArray(message.dataScans)) + return "dataScans: array expected"; + for (var i = 0; i < message.dataScans.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataScan.verify(message.dataScans[i]); + if (error) + return "dataScans." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + 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 ListDataScansResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataScansResponse} ListDataScansResponse + */ + ListDataScansResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataScansResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataScansResponse(); + if (object.dataScans) { + if (!Array.isArray(object.dataScans)) + throw TypeError(".google.cloud.dataplex.v1.ListDataScansResponse.dataScans: array expected"); + message.dataScans = []; + for (var i = 0; i < object.dataScans.length; ++i) { + if (typeof object.dataScans[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListDataScansResponse.dataScans: object expected"); + message.dataScans[i] = $root.google.cloud.dataplex.v1.DataScan.fromObject(object.dataScans[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.dataplex.v1.ListDataScansResponse.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 ListDataScansResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {google.cloud.dataplex.v1.ListDataScansResponse} message ListDataScansResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataScansResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataScans = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataScans && message.dataScans.length) { + object.dataScans = []; + for (var j = 0; j < message.dataScans.length; ++j) + object.dataScans[j] = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScans[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + 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 ListDataScansResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataScansResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataScansResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataScansResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataScansResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScansResponse"; + }; + + return ListDataScansResponse; + })(); + + v1.RunDataScanRequest = (function() { + + /** + * Properties of a RunDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IRunDataScanRequest + * @property {string|null} [name] RunDataScanRequest name + */ + + /** + * Constructs a new RunDataScanRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a RunDataScanRequest. + * @implements IRunDataScanRequest + * @constructor + * @param {google.cloud.dataplex.v1.IRunDataScanRequest=} [properties] Properties to set + */ + function RunDataScanRequest(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]]; + } + + /** + * RunDataScanRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @instance + */ + RunDataScanRequest.prototype.name = ""; + + /** + * Creates a new RunDataScanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest instance + */ + RunDataScanRequest.create = function create(properties) { + return new RunDataScanRequest(properties); + }; + + /** + * Encodes the specified RunDataScanRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanRequest} message RunDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunDataScanRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified RunDataScanRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanRequest} message RunDataScanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunDataScanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunDataScanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunDataScanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunDataScanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunDataScanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunDataScanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunDataScanRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunDataScanRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a RunDataScanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.RunDataScanRequest} RunDataScanRequest + */ + RunDataScanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.RunDataScanRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.RunDataScanRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RunDataScanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {google.cloud.dataplex.v1.RunDataScanRequest} message RunDataScanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunDataScanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this RunDataScanRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @instance + * @returns {Object.} JSON object + */ + RunDataScanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunDataScanRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.RunDataScanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunDataScanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.RunDataScanRequest"; + }; + + return RunDataScanRequest; + })(); + + v1.RunDataScanResponse = (function() { + + /** + * Properties of a RunDataScanResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IRunDataScanResponse + * @property {google.cloud.dataplex.v1.IDataScanJob|null} [job] RunDataScanResponse job + */ + + /** + * Constructs a new RunDataScanResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a RunDataScanResponse. + * @implements IRunDataScanResponse + * @constructor + * @param {google.cloud.dataplex.v1.IRunDataScanResponse=} [properties] Properties to set + */ + function RunDataScanResponse(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]]; + } + + /** + * RunDataScanResponse job. + * @member {google.cloud.dataplex.v1.IDataScanJob|null|undefined} job + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @instance + */ + RunDataScanResponse.prototype.job = null; + + /** + * Creates a new RunDataScanResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse instance + */ + RunDataScanResponse.create = function create(properties) { + return new RunDataScanResponse(properties); + }; + + /** + * Encodes the specified RunDataScanResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanResponse} message RunDataScanResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunDataScanResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.job != null && Object.hasOwnProperty.call(message, "job")) + $root.google.cloud.dataplex.v1.DataScanJob.encode(message.job, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunDataScanResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunDataScanResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {google.cloud.dataplex.v1.IRunDataScanResponse} message RunDataScanResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunDataScanResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunDataScanResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunDataScanResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunDataScanResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.job = $root.google.cloud.dataplex.v1.DataScanJob.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunDataScanResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunDataScanResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunDataScanResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunDataScanResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.job != null && message.hasOwnProperty("job")) { + var error = $root.google.cloud.dataplex.v1.DataScanJob.verify(message.job); + if (error) + return "job." + error; + } + return null; + }; + + /** + * Creates a RunDataScanResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.RunDataScanResponse} RunDataScanResponse + */ + RunDataScanResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.RunDataScanResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.RunDataScanResponse(); + if (object.job != null) { + if (typeof object.job !== "object") + throw TypeError(".google.cloud.dataplex.v1.RunDataScanResponse.job: object expected"); + message.job = $root.google.cloud.dataplex.v1.DataScanJob.fromObject(object.job); + } + return message; + }; + + /** + * Creates a plain object from a RunDataScanResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {google.cloud.dataplex.v1.RunDataScanResponse} message RunDataScanResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunDataScanResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.job = null; + if (message.job != null && message.hasOwnProperty("job")) + object.job = $root.google.cloud.dataplex.v1.DataScanJob.toObject(message.job, options); + return object; + }; + + /** + * Converts this RunDataScanResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @instance + * @returns {Object.} JSON object + */ + RunDataScanResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunDataScanResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.RunDataScanResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunDataScanResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.RunDataScanResponse"; + }; + + return RunDataScanResponse; + })(); + + v1.GetDataScanJobRequest = (function() { + + /** + * Properties of a GetDataScanJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetDataScanJobRequest + * @property {string|null} [name] GetDataScanJobRequest name + * @property {google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView|null} [view] GetDataScanJobRequest view + */ + + /** + * Constructs a new GetDataScanJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetDataScanJobRequest. + * @implements IGetDataScanJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest=} [properties] Properties to set + */ + function GetDataScanJobRequest(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]]; + } + + /** + * GetDataScanJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @instance + */ + GetDataScanJobRequest.prototype.name = ""; + + /** + * GetDataScanJobRequest view. + * @member {google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView} view + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @instance + */ + GetDataScanJobRequest.prototype.view = 0; + + /** + * Creates a new GetDataScanJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest instance + */ + GetDataScanJobRequest.create = function create(properties) { + return new GetDataScanJobRequest(properties); + }; + + /** + * Encodes the specified GetDataScanJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} message GetDataScanJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataScanJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetDataScanJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetDataScanJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetDataScanJobRequest} message GetDataScanJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataScanJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataScanJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataScanJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetDataScanJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataScanJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataScanJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataScanJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataScanJobRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 10: + break; + } + return null; + }; + + /** + * Creates a GetDataScanJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetDataScanJobRequest} GetDataScanJobRequest + */ + GetDataScanJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetDataScanJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetDataScanJobRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "DATA_SCAN_JOB_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "FULL": + case 10: + message.view = 10; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetDataScanJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {google.cloud.dataplex.v1.GetDataScanJobRequest} message GetDataScanJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataScanJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "DATA_SCAN_JOB_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetDataScanJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataScanJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataScanJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetDataScanJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataScanJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetDataScanJobRequest"; + }; + + /** + * DataScanJobView enum. + * @name google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView + * @enum {number} + * @property {number} DATA_SCAN_JOB_VIEW_UNSPECIFIED=0 DATA_SCAN_JOB_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} FULL=10 FULL value + */ + GetDataScanJobRequest.DataScanJobView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_SCAN_JOB_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[10] = "FULL"] = 10; + return values; + })(); + + return GetDataScanJobRequest; + })(); + + v1.ListDataScanJobsRequest = (function() { + + /** + * Properties of a ListDataScanJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataScanJobsRequest + * @property {string|null} [parent] ListDataScanJobsRequest parent + * @property {number|null} [pageSize] ListDataScanJobsRequest pageSize + * @property {string|null} [pageToken] ListDataScanJobsRequest pageToken + */ + + /** + * Constructs a new ListDataScanJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataScanJobsRequest. + * @implements IListDataScanJobsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest=} [properties] Properties to set + */ + function ListDataScanJobsRequest(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]]; + } + + /** + * ListDataScanJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @instance + */ + ListDataScanJobsRequest.prototype.parent = ""; + + /** + * ListDataScanJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @instance + */ + ListDataScanJobsRequest.prototype.pageSize = 0; + + /** + * ListDataScanJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @instance + */ + ListDataScanJobsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDataScanJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest instance + */ + ListDataScanJobsRequest.create = function create(properties) { + return new ListDataScanJobsRequest(properties); + }; + + /** + * Encodes the specified ListDataScanJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} message ListDataScanJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScanJobsRequest.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.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListDataScanJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsRequest} message ListDataScanJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScanJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataScanJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScanJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScanJobsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataScanJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScanJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataScanJobsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataScanJobsRequest.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.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataScanJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataScanJobsRequest} ListDataScanJobsRequest + */ + ListDataScanJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataScanJobsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataScanJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataScanJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {google.cloud.dataplex.v1.ListDataScanJobsRequest} message ListDataScanJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataScanJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListDataScanJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataScanJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataScanJobsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataScanJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataScanJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScanJobsRequest"; + }; + + return ListDataScanJobsRequest; + })(); + + v1.ListDataScanJobsResponse = (function() { + + /** + * Properties of a ListDataScanJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListDataScanJobsResponse + * @property {Array.|null} [dataScanJobs] ListDataScanJobsResponse dataScanJobs + * @property {string|null} [nextPageToken] ListDataScanJobsResponse nextPageToken + */ + + /** + * Constructs a new ListDataScanJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListDataScanJobsResponse. + * @implements IListDataScanJobsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse=} [properties] Properties to set + */ + function ListDataScanJobsResponse(properties) { + this.dataScanJobs = []; + 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]]; + } + + /** + * ListDataScanJobsResponse dataScanJobs. + * @member {Array.} dataScanJobs + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @instance + */ + ListDataScanJobsResponse.prototype.dataScanJobs = $util.emptyArray; + + /** + * ListDataScanJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @instance + */ + ListDataScanJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDataScanJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse instance + */ + ListDataScanJobsResponse.create = function create(properties) { + return new ListDataScanJobsResponse(properties); + }; + + /** + * Encodes the specified ListDataScanJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse} message ListDataScanJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScanJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataScanJobs != null && message.dataScanJobs.length) + for (var i = 0; i < message.dataScanJobs.length; ++i) + $root.google.cloud.dataplex.v1.DataScanJob.encode(message.dataScanJobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListDataScanJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListDataScanJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListDataScanJobsResponse} message ListDataScanJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataScanJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataScanJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScanJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListDataScanJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataScanJobs && message.dataScanJobs.length)) + message.dataScanJobs = []; + message.dataScanJobs.push($root.google.cloud.dataplex.v1.DataScanJob.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataScanJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataScanJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataScanJobsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataScanJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataScanJobs != null && message.hasOwnProperty("dataScanJobs")) { + if (!Array.isArray(message.dataScanJobs)) + return "dataScanJobs: array expected"; + for (var i = 0; i < message.dataScanJobs.length; ++i) { + var error = $root.google.cloud.dataplex.v1.DataScanJob.verify(message.dataScanJobs[i]); + if (error) + return "dataScanJobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataScanJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListDataScanJobsResponse} ListDataScanJobsResponse + */ + ListDataScanJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListDataScanJobsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListDataScanJobsResponse(); + if (object.dataScanJobs) { + if (!Array.isArray(object.dataScanJobs)) + throw TypeError(".google.cloud.dataplex.v1.ListDataScanJobsResponse.dataScanJobs: array expected"); + message.dataScanJobs = []; + for (var i = 0; i < object.dataScanJobs.length; ++i) { + if (typeof object.dataScanJobs[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListDataScanJobsResponse.dataScanJobs: object expected"); + message.dataScanJobs[i] = $root.google.cloud.dataplex.v1.DataScanJob.fromObject(object.dataScanJobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataScanJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {google.cloud.dataplex.v1.ListDataScanJobsResponse} message ListDataScanJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataScanJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataScanJobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dataScanJobs && message.dataScanJobs.length) { + object.dataScanJobs = []; + for (var j = 0; j < message.dataScanJobs.length; ++j) + object.dataScanJobs[j] = $root.google.cloud.dataplex.v1.DataScanJob.toObject(message.dataScanJobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDataScanJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataScanJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataScanJobsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListDataScanJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataScanJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListDataScanJobsResponse"; + }; + + return ListDataScanJobsResponse; + })(); + + v1.DataScan = (function() { + + /** + * Properties of a DataScan. + * @memberof google.cloud.dataplex.v1 + * @interface IDataScan + * @property {string|null} [name] DataScan name + * @property {string|null} [uid] DataScan uid + * @property {string|null} [description] DataScan description + * @property {string|null} [displayName] DataScan displayName + * @property {Object.|null} [labels] DataScan labels + * @property {google.cloud.dataplex.v1.State|null} [state] DataScan state + * @property {google.protobuf.ITimestamp|null} [createTime] DataScan createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataScan updateTime + * @property {google.cloud.dataplex.v1.IDataSource|null} [data] DataScan data + * @property {google.cloud.dataplex.v1.DataScan.IExecutionSpec|null} [executionSpec] DataScan executionSpec + * @property {google.cloud.dataplex.v1.DataScan.IExecutionStatus|null} [executionStatus] DataScan executionStatus + * @property {google.cloud.dataplex.v1.DataScanType|null} [type] DataScan type + * @property {google.cloud.dataplex.v1.IDataQualitySpec|null} [dataQualitySpec] DataScan dataQualitySpec + * @property {google.cloud.dataplex.v1.IDataProfileSpec|null} [dataProfileSpec] DataScan dataProfileSpec + * @property {google.cloud.dataplex.v1.IDataQualityResult|null} [dataQualityResult] DataScan dataQualityResult + * @property {google.cloud.dataplex.v1.IDataProfileResult|null} [dataProfileResult] DataScan dataProfileResult + */ + + /** + * Constructs a new DataScan. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataScan. + * @implements IDataScan + * @constructor + * @param {google.cloud.dataplex.v1.IDataScan=} [properties] Properties to set + */ + function DataScan(properties) { + this.labels = {}; + 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]]; + } + + /** + * DataScan name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.name = ""; + + /** + * DataScan uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.uid = ""; + + /** + * DataScan description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.description = ""; + + /** + * DataScan displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.displayName = ""; + + /** + * DataScan labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.labels = $util.emptyObject; + + /** + * DataScan state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.state = 0; + + /** + * DataScan createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.createTime = null; + + /** + * DataScan updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.updateTime = null; + + /** + * DataScan data. + * @member {google.cloud.dataplex.v1.IDataSource|null|undefined} data + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.data = null; + + /** + * DataScan executionSpec. + * @member {google.cloud.dataplex.v1.DataScan.IExecutionSpec|null|undefined} executionSpec + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.executionSpec = null; + + /** + * DataScan executionStatus. + * @member {google.cloud.dataplex.v1.DataScan.IExecutionStatus|null|undefined} executionStatus + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.executionStatus = null; + + /** + * DataScan type. + * @member {google.cloud.dataplex.v1.DataScanType} type + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.type = 0; + + /** + * DataScan dataQualitySpec. + * @member {google.cloud.dataplex.v1.IDataQualitySpec|null|undefined} dataQualitySpec + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataQualitySpec = null; + + /** + * DataScan dataProfileSpec. + * @member {google.cloud.dataplex.v1.IDataProfileSpec|null|undefined} dataProfileSpec + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataProfileSpec = null; + + /** + * DataScan dataQualityResult. + * @member {google.cloud.dataplex.v1.IDataQualityResult|null|undefined} dataQualityResult + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataQualityResult = null; + + /** + * DataScan dataProfileResult. + * @member {google.cloud.dataplex.v1.IDataProfileResult|null|undefined} dataProfileResult + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + DataScan.prototype.dataProfileResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataScan spec. + * @member {"dataQualitySpec"|"dataProfileSpec"|undefined} spec + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + Object.defineProperty(DataScan.prototype, "spec", { + get: $util.oneOfGetter($oneOfFields = ["dataQualitySpec", "dataProfileSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataScan result. + * @member {"dataQualityResult"|"dataProfileResult"|undefined} result + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + */ + Object.defineProperty(DataScan.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["dataQualityResult", "dataProfileResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataScan instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {google.cloud.dataplex.v1.IDataScan=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScan} DataScan instance + */ + DataScan.create = function create(properties) { + return new DataScan(properties); + }; + + /** + * Encodes the specified DataScan message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {google.cloud.dataplex.v1.IDataScan} message DataScan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataScan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.google.cloud.dataplex.v1.DataSource.encode(message.data, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) + $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.executionStatus != null && Object.hasOwnProperty.call(message, "executionStatus")) + $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.type); + if (message.dataQualitySpec != null && Object.hasOwnProperty.call(message, "dataQualitySpec")) + $root.google.cloud.dataplex.v1.DataQualitySpec.encode(message.dataQualitySpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.dataProfileSpec != null && Object.hasOwnProperty.call(message, "dataProfileSpec")) + $root.google.cloud.dataplex.v1.DataProfileSpec.encode(message.dataProfileSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.dataQualityResult != null && Object.hasOwnProperty.call(message, "dataQualityResult")) + $root.google.cloud.dataplex.v1.DataQualityResult.encode(message.dataQualityResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + if (message.dataProfileResult != null && Object.hasOwnProperty.call(message, "dataProfileResult")) + $root.google.cloud.dataplex.v1.DataProfileResult.encode(message.dataProfileResult, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataScan message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {google.cloud.dataplex.v1.IDataScan} message DataScan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataScan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataScan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScan} DataScan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataScan.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScan(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.data = $root.google.cloud.dataplex.v1.DataSource.decode(reader, reader.uint32()); + break; + } + case 10: { + message.executionSpec = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.decode(reader, reader.uint32()); + break; + } + case 11: { + message.executionStatus = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.decode(reader, reader.uint32()); + break; + } + case 12: { + message.type = reader.int32(); + break; + } + case 100: { + message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.decode(reader, reader.uint32()); + break; + } + case 200: { + message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.decode(reader, reader.uint32()); + break; + } + case 201: { + message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataScan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScan} DataScan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataScan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataScan message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataScan.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.data != null && message.hasOwnProperty("data")) { + var error = $root.google.cloud.dataplex.v1.DataSource.verify(message.data); + if (error) + return "data." + error; + } + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { + var error = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify(message.executionSpec); + if (error) + return "executionSpec." + error; + } + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) { + var error = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify(message.executionStatus); + if (error) + return "executionStatus." + error; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.verify(message.dataQualitySpec); + if (error) + return "dataQualitySpec." + error; + } + } + if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileSpec.verify(message.dataProfileSpec); + if (error) + return "dataProfileSpec." + error; + } + } + if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityResult.verify(message.dataQualityResult); + if (error) + return "dataQualityResult." + error; + } + } + if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.verify(message.dataProfileResult); + if (error) + return "dataProfileResult." + error; + } + } + return null; + }; + + /** + * Creates a DataScan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScan} DataScan + */ + DataScan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScan) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScan(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.data: object expected"); + message.data = $root.google.cloud.dataplex.v1.DataSource.fromObject(object.data); + } + if (object.executionSpec != null) { + if (typeof object.executionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.executionSpec: object expected"); + message.executionSpec = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.fromObject(object.executionSpec); + } + if (object.executionStatus != null) { + if (typeof object.executionStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.executionStatus: object expected"); + message.executionStatus = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.fromObject(object.executionStatus); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATA_SCAN_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DATA_QUALITY": + case 1: + message.type = 1; + break; + case "DATA_PROFILE": + case 2: + message.type = 2; + break; + } + if (object.dataQualitySpec != null) { + if (typeof object.dataQualitySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataQualitySpec: object expected"); + message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.fromObject(object.dataQualitySpec); + } + if (object.dataProfileSpec != null) { + if (typeof object.dataProfileSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataProfileSpec: object expected"); + message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.fromObject(object.dataProfileSpec); + } + if (object.dataQualityResult != null) { + if (typeof object.dataQualityResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataQualityResult: object expected"); + message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.fromObject(object.dataQualityResult); + } + if (object.dataProfileResult != null) { + if (typeof object.dataProfileResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.dataProfileResult: object expected"); + message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.fromObject(object.dataProfileResult); + } + return message; + }; + + /** + * Creates a plain object from a DataScan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {google.cloud.dataplex.v1.DataScan} message DataScan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataScan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.description = ""; + object.displayName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + object.data = null; + object.executionSpec = null; + object.executionStatus = null; + object.type = options.enums === String ? "DATA_SCAN_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.google.cloud.dataplex.v1.DataSource.toObject(message.data, options); + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) + object.executionSpec = $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec.toObject(message.executionSpec, options); + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) + object.executionStatus = $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus.toObject(message.executionStatus, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanType[message.type] : message.type; + if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { + object.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.toObject(message.dataQualitySpec, options); + if (options.oneofs) + object.spec = "dataQualitySpec"; + } + if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { + object.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.toObject(message.dataProfileSpec, options); + if (options.oneofs) + object.spec = "dataProfileSpec"; + } + if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { + object.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.toObject(message.dataQualityResult, options); + if (options.oneofs) + object.result = "dataQualityResult"; + } + if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { + object.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.toObject(message.dataProfileResult, options); + if (options.oneofs) + object.result = "dataProfileResult"; + } + return object; + }; + + /** + * Converts this DataScan to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScan + * @instance + * @returns {Object.} JSON object + */ + DataScan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataScan + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataScan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScan"; + }; + + DataScan.ExecutionSpec = (function() { + + /** + * Properties of an ExecutionSpec. + * @memberof google.cloud.dataplex.v1.DataScan + * @interface IExecutionSpec + * @property {google.cloud.dataplex.v1.ITrigger|null} [trigger] ExecutionSpec trigger + * @property {string|null} [field] ExecutionSpec field + */ + + /** + * Constructs a new ExecutionSpec. + * @memberof google.cloud.dataplex.v1.DataScan + * @classdesc Represents an ExecutionSpec. + * @implements IExecutionSpec + * @constructor + * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec=} [properties] Properties to set + */ + function ExecutionSpec(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]]; + } + + /** + * ExecutionSpec trigger. + * @member {google.cloud.dataplex.v1.ITrigger|null|undefined} trigger + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.trigger = null; + + /** + * ExecutionSpec field. + * @member {string|null|undefined} field + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.field = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExecutionSpec incremental. + * @member {"field"|undefined} incremental + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @instance + */ + Object.defineProperty(ExecutionSpec.prototype, "incremental", { + get: $util.oneOfGetter($oneOfFields = ["field"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec instance + */ + ExecutionSpec.create = function create(properties) { + return new ExecutionSpec(properties); + }; + + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + $root.google.cloud.dataplex.v1.Trigger.encode(message.trigger, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.field); + return writer; + }; + + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.trigger = $root.google.cloud.dataplex.v1.Trigger.decode(reader, reader.uint32()); + break; + } + case 100: { + message.field = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.cloud.dataplex.v1.Trigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + if (message.field != null && message.hasOwnProperty("field")) { + properties.incremental = 1; + if (!$util.isString(message.field)) + return "field: string expected"; + } + return null; + }; + + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionSpec} ExecutionSpec + */ + ExecutionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionSpec(); + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionSpec.trigger: object expected"); + message.trigger = $root.google.cloud.dataplex.v1.Trigger.fromObject(object.trigger); + } + if (object.field != null) + message.field = String(object.field); + return message; + }; + + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.DataScan.ExecutionSpec} message ExecutionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.trigger = null; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.cloud.dataplex.v1.Trigger.toObject(message.trigger, options); + if (message.field != null && message.hasOwnProperty("field")) { + object.field = message.field; + if (options.oneofs) + object.incremental = "field"; + } + return object; + }; + + /** + * Converts this ExecutionSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @instance + * @returns {Object.} JSON object + */ + ExecutionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecutionSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScan.ExecutionSpec"; + }; + + return ExecutionSpec; + })(); + + DataScan.ExecutionStatus = (function() { + + /** + * Properties of an ExecutionStatus. + * @memberof google.cloud.dataplex.v1.DataScan + * @interface IExecutionStatus + * @property {google.protobuf.ITimestamp|null} [latestJobStartTime] ExecutionStatus latestJobStartTime + * @property {google.protobuf.ITimestamp|null} [latestJobEndTime] ExecutionStatus latestJobEndTime + */ + + /** + * Constructs a new ExecutionStatus. + * @memberof google.cloud.dataplex.v1.DataScan + * @classdesc Represents an ExecutionStatus. + * @implements IExecutionStatus + * @constructor + * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus=} [properties] Properties to set + */ + function ExecutionStatus(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]]; + } + + /** + * ExecutionStatus latestJobStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} latestJobStartTime + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.latestJobStartTime = null; + + /** + * ExecutionStatus latestJobEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} latestJobEndTime + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.latestJobEndTime = null; + + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus instance + */ + ExecutionStatus.create = function create(properties) { + return new ExecutionStatus(properties); + }; + + /** + * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.latestJobStartTime != null && Object.hasOwnProperty.call(message, "latestJobStartTime")) + $root.google.protobuf.Timestamp.encode(message.latestJobStartTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.latestJobEndTime != null && Object.hasOwnProperty.call(message, "latestJobEndTime")) + $root.google.protobuf.Timestamp.encode(message.latestJobEndTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScan.ExecutionStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.DataScan.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.latestJobStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.latestJobEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecutionStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.latestJobStartTime != null && message.hasOwnProperty("latestJobStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.latestJobStartTime); + if (error) + return "latestJobStartTime." + error; + } + if (message.latestJobEndTime != null && message.hasOwnProperty("latestJobEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.latestJobEndTime); + if (error) + return "latestJobEndTime." + error; + } + return null; + }; + + /** + * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScan.ExecutionStatus} ExecutionStatus + */ + ExecutionStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScan.ExecutionStatus(); + if (object.latestJobStartTime != null) { + if (typeof object.latestJobStartTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionStatus.latestJobStartTime: object expected"); + message.latestJobStartTime = $root.google.protobuf.Timestamp.fromObject(object.latestJobStartTime); + } + if (object.latestJobEndTime != null) { + if (typeof object.latestJobEndTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScan.ExecutionStatus.latestJobEndTime: object expected"); + message.latestJobEndTime = $root.google.protobuf.Timestamp.fromObject(object.latestJobEndTime); + } + return message; + }; + + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.DataScan.ExecutionStatus} message ExecutionStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.latestJobStartTime = null; + object.latestJobEndTime = null; + } + if (message.latestJobStartTime != null && message.hasOwnProperty("latestJobStartTime")) + object.latestJobStartTime = $root.google.protobuf.Timestamp.toObject(message.latestJobStartTime, options); + if (message.latestJobEndTime != null && message.hasOwnProperty("latestJobEndTime")) + object.latestJobEndTime = $root.google.protobuf.Timestamp.toObject(message.latestJobEndTime, options); + return object; + }; + + /** + * Converts this ExecutionStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @instance + * @returns {Object.} JSON object + */ + ExecutionStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecutionStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScan.ExecutionStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScan.ExecutionStatus"; + }; + + return ExecutionStatus; + })(); + + return DataScan; + })(); + + v1.DataScanJob = (function() { + + /** + * Properties of a DataScanJob. + * @memberof google.cloud.dataplex.v1 + * @interface IDataScanJob + * @property {string|null} [name] DataScanJob name + * @property {string|null} [uid] DataScanJob uid + * @property {google.protobuf.ITimestamp|null} [startTime] DataScanJob startTime + * @property {google.protobuf.ITimestamp|null} [endTime] DataScanJob endTime + * @property {google.cloud.dataplex.v1.DataScanJob.State|null} [state] DataScanJob state + * @property {string|null} [message] DataScanJob message + * @property {google.cloud.dataplex.v1.DataScanType|null} [type] DataScanJob type + * @property {google.cloud.dataplex.v1.IDataQualitySpec|null} [dataQualitySpec] DataScanJob dataQualitySpec + * @property {google.cloud.dataplex.v1.IDataProfileSpec|null} [dataProfileSpec] DataScanJob dataProfileSpec + * @property {google.cloud.dataplex.v1.IDataQualityResult|null} [dataQualityResult] DataScanJob dataQualityResult + * @property {google.cloud.dataplex.v1.IDataProfileResult|null} [dataProfileResult] DataScanJob dataProfileResult + */ + + /** + * Constructs a new DataScanJob. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DataScanJob. + * @implements IDataScanJob + * @constructor + * @param {google.cloud.dataplex.v1.IDataScanJob=} [properties] Properties to set + */ + function DataScanJob(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]]; + } + + /** + * DataScanJob name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.name = ""; + + /** + * DataScanJob uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.uid = ""; + + /** + * DataScanJob startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.startTime = null; + + /** + * DataScanJob endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.endTime = null; + + /** + * DataScanJob state. + * @member {google.cloud.dataplex.v1.DataScanJob.State} state + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.state = 0; + + /** + * DataScanJob message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.message = ""; + + /** + * DataScanJob type. + * @member {google.cloud.dataplex.v1.DataScanType} type + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.type = 0; + + /** + * DataScanJob dataQualitySpec. + * @member {google.cloud.dataplex.v1.IDataQualitySpec|null|undefined} dataQualitySpec + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataQualitySpec = null; + + /** + * DataScanJob dataProfileSpec. + * @member {google.cloud.dataplex.v1.IDataProfileSpec|null|undefined} dataProfileSpec + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataProfileSpec = null; + + /** + * DataScanJob dataQualityResult. + * @member {google.cloud.dataplex.v1.IDataQualityResult|null|undefined} dataQualityResult + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataQualityResult = null; + + /** + * DataScanJob dataProfileResult. + * @member {google.cloud.dataplex.v1.IDataProfileResult|null|undefined} dataProfileResult + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + DataScanJob.prototype.dataProfileResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataScanJob spec. + * @member {"dataQualitySpec"|"dataProfileSpec"|undefined} spec + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + Object.defineProperty(DataScanJob.prototype, "spec", { + get: $util.oneOfGetter($oneOfFields = ["dataQualitySpec", "dataProfileSpec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataScanJob result. + * @member {"dataQualityResult"|"dataProfileResult"|undefined} result + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + */ + Object.defineProperty(DataScanJob.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["dataQualityResult", "dataProfileResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataScanJob instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {google.cloud.dataplex.v1.IDataScanJob=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob instance + */ + DataScanJob.create = function create(properties) { + return new DataScanJob(properties); + }; + + /** + * Encodes the specified DataScanJob message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {google.cloud.dataplex.v1.IDataScanJob} message DataScanJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataScanJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.message); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.dataQualitySpec != null && Object.hasOwnProperty.call(message, "dataQualitySpec")) + $root.google.cloud.dataplex.v1.DataQualitySpec.encode(message.dataQualitySpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.dataProfileSpec != null && Object.hasOwnProperty.call(message, "dataProfileSpec")) + $root.google.cloud.dataplex.v1.DataProfileSpec.encode(message.dataProfileSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.dataQualityResult != null && Object.hasOwnProperty.call(message, "dataQualityResult")) + $root.google.cloud.dataplex.v1.DataQualityResult.encode(message.dataQualityResult, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + if (message.dataProfileResult != null && Object.hasOwnProperty.call(message, "dataProfileResult")) + $root.google.cloud.dataplex.v1.DataProfileResult.encode(message.dataProfileResult, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataScanJob message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {google.cloud.dataplex.v1.IDataScanJob} message DataScanJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataScanJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataScanJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataScanJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.message = reader.string(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + case 100: { + message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.decode(reader, reader.uint32()); + break; + } + case 200: { + message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.decode(reader, reader.uint32()); + break; + } + case 201: { + message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataScanJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataScanJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataScanJob message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataScanJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string 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; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 7: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualitySpec.verify(message.dataQualitySpec); + if (error) + return "dataQualitySpec." + error; + } + } + if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { + if (properties.spec === 1) + return "spec: multiple values"; + properties.spec = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileSpec.verify(message.dataProfileSpec); + if (error) + return "dataProfileSpec." + error; + } + } + if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataQualityResult.verify(message.dataQualityResult); + if (error) + return "dataQualityResult." + error; + } + } + if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataProfileResult.verify(message.dataProfileResult); + if (error) + return "dataProfileResult." + error; + } + } + return null; + }; + + /** + * Creates a DataScanJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanJob} DataScanJob + */ + DataScanJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanJob) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanJob(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "CANCELING": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "PENDING": + case 7: + message.state = 7; + break; + } + if (object.message != null) + message.message = String(object.message); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATA_SCAN_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DATA_QUALITY": + case 1: + message.type = 1; + break; + case "DATA_PROFILE": + case 2: + message.type = 2; + break; + } + if (object.dataQualitySpec != null) { + if (typeof object.dataQualitySpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataQualitySpec: object expected"); + message.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.fromObject(object.dataQualitySpec); + } + if (object.dataProfileSpec != null) { + if (typeof object.dataProfileSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataProfileSpec: object expected"); + message.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.fromObject(object.dataProfileSpec); + } + if (object.dataQualityResult != null) { + if (typeof object.dataQualityResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataQualityResult: object expected"); + message.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.fromObject(object.dataQualityResult); + } + if (object.dataProfileResult != null) { + if (typeof object.dataProfileResult !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanJob.dataProfileResult: object expected"); + message.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.fromObject(object.dataProfileResult); + } + return message; + }; + + /** + * Creates a plain object from a DataScanJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {google.cloud.dataplex.v1.DataScanJob} message DataScanJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataScanJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.type = options.enums === String ? "DATA_SCAN_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + 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); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanJob.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataScanJob.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanType[message.type] : message.type; + if (message.dataQualitySpec != null && message.hasOwnProperty("dataQualitySpec")) { + object.dataQualitySpec = $root.google.cloud.dataplex.v1.DataQualitySpec.toObject(message.dataQualitySpec, options); + if (options.oneofs) + object.spec = "dataQualitySpec"; + } + if (message.dataProfileSpec != null && message.hasOwnProperty("dataProfileSpec")) { + object.dataProfileSpec = $root.google.cloud.dataplex.v1.DataProfileSpec.toObject(message.dataProfileSpec, options); + if (options.oneofs) + object.spec = "dataProfileSpec"; + } + if (message.dataQualityResult != null && message.hasOwnProperty("dataQualityResult")) { + object.dataQualityResult = $root.google.cloud.dataplex.v1.DataQualityResult.toObject(message.dataQualityResult, options); + if (options.oneofs) + object.result = "dataQualityResult"; + } + if (message.dataProfileResult != null && message.hasOwnProperty("dataProfileResult")) { + object.dataProfileResult = $root.google.cloud.dataplex.v1.DataProfileResult.toObject(message.dataProfileResult, options); + if (options.oneofs) + object.result = "dataProfileResult"; + } + return object; + }; + + /** + * Converts this DataScanJob to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanJob + * @instance + * @returns {Object.} JSON object + */ + DataScanJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataScanJob + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataScanJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanJob"; + }; + + /** + * State enum. + * @name google.cloud.dataplex.v1.DataScanJob.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} CANCELING=2 CANCELING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} PENDING=7 PENDING value + */ + DataScanJob.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "CANCELING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[7] = "PENDING"] = 7; + return values; + })(); + + return DataScanJob; + })(); + + /** + * DataScanType enum. + * @name google.cloud.dataplex.v1.DataScanType + * @enum {number} + * @property {number} DATA_SCAN_TYPE_UNSPECIFIED=0 DATA_SCAN_TYPE_UNSPECIFIED value + * @property {number} DATA_QUALITY=1 DATA_QUALITY value + * @property {number} DATA_PROFILE=2 DATA_PROFILE value + */ + v1.DataScanType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_SCAN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATA_QUALITY"] = 1; + values[valuesById[2] = "DATA_PROFILE"] = 2; + return values; + })(); + + v1.DiscoveryEvent = (function() { + + /** + * Properties of a DiscoveryEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IDiscoveryEvent + * @property {string|null} [message] DiscoveryEvent message + * @property {string|null} [lakeId] DiscoveryEvent lakeId + * @property {string|null} [zoneId] DiscoveryEvent zoneId + * @property {string|null} [assetId] DiscoveryEvent assetId + * @property {string|null} [dataLocation] DiscoveryEvent dataLocation + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action + */ + + /** + * Constructs a new DiscoveryEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DiscoveryEvent. + * @implements IDiscoveryEvent + * @constructor + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + */ + function DiscoveryEvent(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]]; + } + + /** + * DiscoveryEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.message = ""; + + /** + * DiscoveryEvent lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.lakeId = ""; + + /** + * DiscoveryEvent zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.zoneId = ""; + + /** + * DiscoveryEvent assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.assetId = ""; + + /** + * DiscoveryEvent dataLocation. + * @member {string} dataLocation + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.dataLocation = ""; + + /** + * DiscoveryEvent type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.type = 0; + + /** + * DiscoveryEvent config. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null|undefined} config + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.config = null; + + /** + * DiscoveryEvent entity. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null|undefined} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.entity = null; + + /** + * DiscoveryEvent partition. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null|undefined} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.partition = null; + + /** + * DiscoveryEvent action. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null|undefined} action + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.action = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryEvent details. + * @member {"config"|"entity"|"partition"|"action"|undefined} details + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + Object.defineProperty(DiscoveryEvent.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent instance + */ + DiscoveryEvent.create = function create(properties) { + return new DiscoveryEvent(properties); + }; + + /** + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.zoneId); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); + if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.encode(message.config, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.encode(message.entity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.lakeId = reader.string(); + break; + } + case 3: { + message.zoneId = reader.string(); + break; + } + case 4: { + message.assetId = reader.string(); + break; + } + case 5: { + message.dataLocation = reader.string(); + break; + } + case 10: { + message.type = reader.int32(); + break; + } + case 20: { + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); + break; + } + case 21: { + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); + break; + } + case 22: { + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); + break; + } + case 23: { + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + if (!$util.isString(message.dataLocation)) + return "dataLocation: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.config != null && message.hasOwnProperty("config")) { + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify(message.config); + if (error) + return "config." + error; + } + } + if (message.entity != null && message.hasOwnProperty("entity")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify(message.entity); + if (error) + return "entity." + error; + } + } + if (message.partition != null && message.hasOwnProperty("partition")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify(message.partition); + if (error) + return "partition." + error; + } + } + if (message.action != null && message.hasOwnProperty("action")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify(message.action); + if (error) + return "action." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + */ + DiscoveryEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.dataLocation != null) + message.dataLocation = String(object.dataLocation); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONFIG": + case 1: + message.type = 1; + break; + case "ENTITY_CREATED": + case 2: + message.type = 2; + break; + case "ENTITY_UPDATED": + case 3: + message.type = 3; + break; + case "ENTITY_DELETED": + case 4: + message.type = 4; + break; + case "PARTITION_CREATED": + case 5: + message.type = 5; + break; + case "PARTITION_UPDATED": + case 6: + message.type = 6; + break; + case "PARTITION_DELETED": + case 7: + message.type = 7; + break; + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.config: object expected"); + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.fromObject(object.config); + } + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.fromObject(object.entity); + } + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.partition: object expected"); + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.fromObject(object.partition); + } + if (object.action != null) { + if (typeof object.action !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent} message DiscoveryEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.lakeId = ""; + object.zoneId = ""; + object.assetId = ""; + object.dataLocation = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + object.dataLocation = message.dataLocation; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; + if (message.config != null && message.hasOwnProperty("config")) { + object.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.toObject(message.config, options); + if (options.oneofs) + object.details = "config"; + } + if (message.entity != null && message.hasOwnProperty("entity")) { + object.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.toObject(message.entity, options); + if (options.oneofs) + object.details = "entity"; + } + if (message.partition != null && message.hasOwnProperty("partition")) { + object.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.toObject(message.partition, options); + if (options.oneofs) + object.details = "partition"; + } + if (message.action != null && message.hasOwnProperty("action")) { + object.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.toObject(message.action, options); + if (options.oneofs) + object.details = "action"; + } + return object; + }; + + /** + * Converts this DiscoveryEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + * @returns {Object.} JSON object + */ + DiscoveryEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent"; + }; + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} CONFIG=1 CONFIG value + * @property {number} ENTITY_CREATED=2 ENTITY_CREATED value + * @property {number} ENTITY_UPDATED=3 ENTITY_UPDATED value + * @property {number} ENTITY_DELETED=4 ENTITY_DELETED value + * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value + * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value + * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value + */ + DiscoveryEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFIG"] = 1; + values[valuesById[2] = "ENTITY_CREATED"] = 2; + values[valuesById[3] = "ENTITY_UPDATED"] = 3; + values[valuesById[4] = "ENTITY_DELETED"] = 4; + values[valuesById[5] = "PARTITION_CREATED"] = 5; + values[valuesById[6] = "PARTITION_UPDATED"] = 6; + values[valuesById[7] = "PARTITION_DELETED"] = 7; + return values; + })(); + + /** + * EntityType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EntityType + * @enum {number} + * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + DiscoveryEvent.EntityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); + + DiscoveryEvent.ConfigDetails = (function() { + + /** + * Properties of a ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IConfigDetails + * @property {Object.|null} [parameters] ConfigDetails parameters + */ + + /** + * Constructs a new ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a ConfigDetails. + * @implements IConfigDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + */ + function ConfigDetails(properties) { + this.parameters = {}; + 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]]; + } + + /** + * ConfigDetails parameters. + * @member {Object.} parameters + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + */ + ConfigDetails.prototype.parameters = $util.emptyObject; + + /** + * Creates a new ConfigDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails instance + */ + ConfigDetails.create = function create(properties) { + return new ConfigDetails(properties); + }; + + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + for (var keys = Object.keys(message.parameters), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.parameters[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.parameters === $util.emptyObject) + message.parameters = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.parameters[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfigDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!$util.isObject(message.parameters)) + return "parameters: object expected"; + var key = Object.keys(message.parameters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.parameters[key[i]])) + return "parameters: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + */ + ConfigDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(); + if (object.parameters) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parameters: object expected"); + message.parameters = {}; + for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) + message.parameters[keys[i]] = String(object.parameters[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} message ConfigDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parameters = {}; + var keys2; + if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { + object.parameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameters[keys2[j]] = message.parameters[keys2[j]]; + } + return object; + }; + + /** + * Converts this ConfigDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + * @returns {Object.} JSON object + */ + ConfigDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfigDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfigDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"; + }; + + return ConfigDetails; + })(); + + DiscoveryEvent.EntityDetails = (function() { + + /** + * Properties of an EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IEntityDetails + * @property {string|null} [entity] EntityDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] EntityDetails type + */ + + /** + * Constructs a new EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an EntityDetails. + * @implements IEntityDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + */ + function EntityDetails(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]]; + } + + /** + * EntityDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.entity = ""; + + /** + * EntityDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.type = 0; + + /** + * Creates a new EntityDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails instance + */ + EntityDetails.create = function create(properties) { + return new EntityDetails(properties); + }; + + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entity = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + */ + EntityDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} message EntityDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + return object; + }; + + /** + * Converts this EntityDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + * @returns {Object.} JSON object + */ + EntityDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"; + }; + + return EntityDetails; + })(); + + DiscoveryEvent.PartitionDetails = (function() { + + /** + * Properties of a PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IPartitionDetails + * @property {string|null} [partition] PartitionDetails partition + * @property {string|null} [entity] PartitionDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type + * @property {Array.|null} [sampledDataLocations] PartitionDetails sampledDataLocations + */ + + /** + * Constructs a new PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a PartitionDetails. + * @implements IPartitionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + */ + function PartitionDetails(properties) { + this.sampledDataLocations = []; + 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]]; + } + + /** + * PartitionDetails partition. + * @member {string} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.partition = ""; + + /** + * PartitionDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.entity = ""; + + /** + * PartitionDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.type = 0; + + /** + * PartitionDetails sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.sampledDataLocations = $util.emptyArray; + + /** + * Creates a new PartitionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails instance + */ + PartitionDetails.create = function create(properties) { + return new PartitionDetails(properties); + }; + + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.partition); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); + return writer; + }; + + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partition = reader.string(); + break; + } + case 2: { + message.entity = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + case 4: { + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartitionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partition != null && message.hasOwnProperty("partition")) + if (!$util.isString(message.partition)) + return "partition: string expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + */ + PartitionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + if (object.partition != null) + message.partition = String(object.partition); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; + break; + } + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + return message; + }; + + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} message PartitionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; + if (options.defaults) { + object.partition = ""; + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = message.partition; + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } + return object; + }; + + /** + * Converts this PartitionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + * @returns {Object.} JSON object + */ + PartitionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartitionDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"; + }; + + return PartitionDetails; + })(); + + DiscoveryEvent.ActionDetails = (function() { + + /** + * Properties of an ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IActionDetails + * @property {string|null} [type] ActionDetails type + */ + + /** + * Constructs a new ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an ActionDetails. + * @implements IActionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + */ + function ActionDetails(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]]; + } + + /** + * ActionDetails type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + */ + ActionDetails.prototype.type = ""; + + /** + * Creates a new ActionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails instance + */ + ActionDetails.create = function create(properties) { + return new ActionDetails(properties); + }; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + return writer; + }; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActionDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + */ + ActionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} message ActionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this ActionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + * @returns {Object.} JSON object + */ + ActionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActionDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"; + }; + + return ActionDetails; + })(); + + return DiscoveryEvent; + })(); + + v1.JobEvent = (function() { + + /** + * Properties of a JobEvent. + * @memberof google.cloud.dataplex.v1 + * @interface IJobEvent + * @property {string|null} [message] JobEvent message + * @property {string|null} [jobId] JobEvent jobId + * @property {google.protobuf.ITimestamp|null} [startTime] JobEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] JobEvent endTime + * @property {google.cloud.dataplex.v1.JobEvent.State|null} [state] JobEvent state + * @property {number|null} [retries] JobEvent retries + * @property {google.cloud.dataplex.v1.JobEvent.Type|null} [type] JobEvent type + * @property {google.cloud.dataplex.v1.JobEvent.Service|null} [service] JobEvent service + * @property {string|null} [serviceJob] JobEvent serviceJob + */ + + /** + * Constructs a new JobEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a JobEvent. + * @implements IJobEvent + * @constructor + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + */ + function JobEvent(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]]; + } + + /** + * JobEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.message = ""; + + /** + * JobEvent jobId. + * @member {string} jobId + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.jobId = ""; + + /** + * JobEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.startTime = null; + + /** + * JobEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.endTime = null; + + /** + * JobEvent state. + * @member {google.cloud.dataplex.v1.JobEvent.State} state + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.state = 0; + + /** + * JobEvent retries. + * @member {number} retries + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.retries = 0; + + /** + * JobEvent type. + * @member {google.cloud.dataplex.v1.JobEvent.Type} type + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.type = 0; + + /** + * JobEvent service. + * @member {google.cloud.dataplex.v1.JobEvent.Service} service + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.service = 0; + + /** + * JobEvent serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + */ + JobEvent.prototype.serviceJob = ""; + + /** + * Creates a new JobEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent instance + */ + JobEvent.create = function create(properties) { + return new JobEvent(properties); + }; + + /** + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retries != null && Object.hasOwnProperty.call(message, "retries")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retries); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceJob); + return writer; + }; + + /** + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.JobEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.jobId = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.retries = reader.int32(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + case 8: { + message.service = reader.int32(); + break; + } + case 9: { + message.serviceJob = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string 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; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.retries != null && message.hasOwnProperty("retries")) + if (!$util.isInteger(message.retries)) + return "retries: integer expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; + } + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; + return null; + }; + + /** + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + */ + JobEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.JobEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.JobEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "ABORTED": + case 4: + message.state = 4; + break; + } + if (object.retries != null) + message.retries = object.retries | 0; + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SPARK": + case 1: + message.type = 1; + break; + case "NOTEBOOK": + case 2: + message.type = 2; + break; + } + switch (object.service) { + default: + if (typeof object.service === "number") { + message.service = object.service; + break; + } + break; + case "SERVICE_UNSPECIFIED": + case 0: + message.service = 0; + break; + case "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); + return message; + }; + + /** + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {google.cloud.dataplex.v1.JobEvent} message JobEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.jobId = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retries = 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + 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); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.JobEvent.State[message.state] : message.state; + if (message.retries != null && message.hasOwnProperty("retries")) + object.retries = message.retries; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] : message.type; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; + return object; + }; + + /** + * Converts this JobEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance + * @returns {Object.} JSON object + */ + JobEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JobEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.JobEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JobEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.JobEvent"; + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.JobEvent.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} SPARK=1 SPARK value + * @property {number} NOTEBOOK=2 NOTEBOOK value + */ + JobEvent.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK"] = 1; + values[valuesById[2] = "NOTEBOOK"] = 2; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.JobEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} ABORTED=4 ABORTED value + */ + JobEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "ABORTED"] = 4; + return values; + })(); + + /** + * Service enum. + * @name google.cloud.dataplex.v1.JobEvent.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + JobEvent.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + return JobEvent; + })(); + + v1.SessionEvent = (function() { + + /** + * Properties of a SessionEvent. + * @memberof google.cloud.dataplex.v1 + * @interface ISessionEvent + * @property {string|null} [message] SessionEvent message + * @property {string|null} [userId] SessionEvent userId + * @property {string|null} [sessionId] SessionEvent sessionId + * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type + * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query + * @property {boolean|null} [eventSucceeded] SessionEvent eventSucceeded + * @property {boolean|null} [fastStartupEnabled] SessionEvent fastStartupEnabled + * @property {google.protobuf.IDuration|null} [unassignedDuration] SessionEvent unassignedDuration + */ + + /** + * Constructs a new SessionEvent. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a SessionEvent. + * @implements ISessionEvent + * @constructor + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + */ + function SessionEvent(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]]; + } + + /** + * SessionEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.message = ""; + + /** + * SessionEvent userId. + * @member {string} userId + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.userId = ""; + + /** + * SessionEvent sessionId. + * @member {string} sessionId + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.sessionId = ""; + + /** + * SessionEvent type. + * @member {google.cloud.dataplex.v1.SessionEvent.EventType} type + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.type = 0; + + /** + * SessionEvent query. + * @member {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null|undefined} query + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.query = null; + + /** + * SessionEvent eventSucceeded. + * @member {boolean} eventSucceeded + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.eventSucceeded = false; + + /** + * SessionEvent fastStartupEnabled. + * @member {boolean} fastStartupEnabled + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.fastStartupEnabled = false; + + /** + * SessionEvent unassignedDuration. + * @member {google.protobuf.IDuration|null|undefined} unassignedDuration + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.unassignedDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SessionEvent detail. + * @member {"query"|undefined} detail + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + Object.defineProperty(SessionEvent.prototype, "detail", { + get: $util.oneOfGetter($oneOfFields = ["query"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SessionEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent instance + */ + SessionEvent.create = function create(properties) { + return new SessionEvent(properties); + }; + + /** + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.eventSucceeded != null && Object.hasOwnProperty.call(message, "eventSucceeded")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.eventSucceeded); + if (message.fastStartupEnabled != null && Object.hasOwnProperty.call(message, "fastStartupEnabled")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.fastStartupEnabled); + if (message.unassignedDuration != null && Object.hasOwnProperty.call(message, "unassignedDuration")) + $root.google.protobuf.Duration.encode(message.unassignedDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SessionEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SessionEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); + break; + } + case 2: { + message.userId = reader.string(); + break; + } + case 3: { + message.sessionId = reader.string(); + break; + } + case 4: { + message.type = reader.int32(); + break; + } + case 5: { + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); + break; + } + case 6: { + message.eventSucceeded = reader.bool(); + break; + } + case 7: { + message.fastStartupEnabled = reader.bool(); + break; + } + case 8: { + message.unassignedDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SessionEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SessionEvent message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SessionEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.query != null && message.hasOwnProperty("query")) { + properties.detail = 1; + { + var error = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) + if (typeof message.eventSucceeded !== "boolean") + return "eventSucceeded: boolean expected"; + if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) + if (typeof message.fastStartupEnabled !== "boolean") + return "fastStartupEnabled: boolean expected"; + if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) { + var error = $root.google.protobuf.Duration.verify(message.unassignedDuration); + if (error) + return "unassignedDuration." + error; + } + return null; + }; + + /** + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + */ + SessionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.userId != null) + message.userId = String(object.userId); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "START": + case 1: + message.type = 1; + break; + case "STOP": + case 2: + message.type = 2; + break; + case "QUERY": + case 3: + message.type = 3; + break; + case "CREATE": + case 4: + message.type = 4; + break; + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); + } + if (object.eventSucceeded != null) + message.eventSucceeded = Boolean(object.eventSucceeded); + if (object.fastStartupEnabled != null) + message.fastStartupEnabled = Boolean(object.fastStartupEnabled); + if (object.unassignedDuration != null) { + if (typeof object.unassignedDuration !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.unassignedDuration: object expected"); + message.unassignedDuration = $root.google.protobuf.Duration.fromObject(object.unassignedDuration); + } + return message; + }; + + /** + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {google.cloud.dataplex.v1.SessionEvent} message SessionEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SessionEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.message = ""; + object.userId = ""; + object.sessionId = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + object.eventSucceeded = false; + object.fastStartupEnabled = false; + object.unassignedDuration = null; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] : message.type; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.toObject(message.query, options); + if (options.oneofs) + object.detail = "query"; + } + if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) + object.eventSucceeded = message.eventSucceeded; + if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) + object.fastStartupEnabled = message.fastStartupEnabled; + if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) + object.unassignedDuration = $root.google.protobuf.Duration.toObject(message.unassignedDuration, options); + return object; + }; + + /** + * Converts this SessionEvent to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + * @returns {Object.} JSON object + */ + SessionEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SessionEvent + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SessionEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent"; + }; + + /** + * EventType enum. + * @name google.cloud.dataplex.v1.SessionEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} START=1 START value + * @property {number} STOP=2 STOP value + * @property {number} QUERY=3 QUERY value + * @property {number} CREATE=4 CREATE value + */ + SessionEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "START"] = 1; + values[valuesById[2] = "STOP"] = 2; + values[valuesById[3] = "QUERY"] = 3; + values[valuesById[4] = "CREATE"] = 4; + return values; + })(); + + SessionEvent.QueryDetail = (function() { + + /** + * Properties of a QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @interface IQueryDetail + * @property {string|null} [queryId] QueryDetail queryId + * @property {string|null} [queryText] QueryDetail queryText + * @property {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null} [engine] QueryDetail engine + * @property {google.protobuf.IDuration|null} [duration] QueryDetail duration + * @property {number|Long|null} [resultSizeBytes] QueryDetail resultSizeBytes + * @property {number|Long|null} [dataProcessedBytes] QueryDetail dataProcessedBytes + */ + + /** + * Constructs a new QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @classdesc Represents a QueryDetail. + * @implements IQueryDetail + * @constructor + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + */ + function QueryDetail(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]]; + } + + /** + * QueryDetail queryId. + * @member {string} queryId + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryId = ""; + + /** + * QueryDetail queryText. + * @member {string} queryText + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryText = ""; + + /** + * QueryDetail engine. + * @member {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine} engine + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.engine = 0; + + /** + * QueryDetail duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.duration = null; + + /** + * QueryDetail resultSizeBytes. + * @member {number|Long} resultSizeBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.resultSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * QueryDetail dataProcessedBytes. + * @member {number|Long} dataProcessedBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.dataProcessedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryDetail instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail instance + */ + QueryDetail.create = function create(properties) { + return new QueryDetail(properties); + }; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); + if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryText); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.engine); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.resultSizeBytes != null && Object.hasOwnProperty.call(message, "resultSizeBytes")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.resultSizeBytes); + if (message.dataProcessedBytes != null && Object.hasOwnProperty.call(message, "dataProcessedBytes")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.dataProcessedBytes); + return writer; + }; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.queryId = reader.string(); + break; + } + case 2: { + message.queryText = reader.string(); + break; + } + case 3: { + message.engine = reader.int32(); + break; + } + case 4: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.resultSizeBytes = reader.int64(); + break; + } + case 6: { + message.dataProcessedBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDetail message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.queryId != null && message.hasOwnProperty("queryId")) + if (!$util.isString(message.queryId)) + return "queryId: string expected"; + if (message.queryText != null && message.hasOwnProperty("queryText")) + if (!$util.isString(message.queryText)) + return "queryText: string expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (!$util.isInteger(message.resultSizeBytes) && !(message.resultSizeBytes && $util.isInteger(message.resultSizeBytes.low) && $util.isInteger(message.resultSizeBytes.high))) + return "resultSizeBytes: integer|Long expected"; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (!$util.isInteger(message.dataProcessedBytes) && !(message.dataProcessedBytes && $util.isInteger(message.dataProcessedBytes.low) && $util.isInteger(message.dataProcessedBytes.high))) + return "dataProcessedBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + */ + QueryDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + if (object.queryId != null) + message.queryId = String(object.queryId); + if (object.queryText != null) + message.queryText = String(object.queryText); + switch (object.engine) { + default: + if (typeof object.engine === "number") { + message.engine = object.engine; + break; + } + break; + case "ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "SPARK_SQL": + case 1: + message.engine = 1; + break; + case "BIGQUERY": + case 2: + message.engine = 2; + break; + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.QueryDetail.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.resultSizeBytes != null) + if ($util.Long) + (message.resultSizeBytes = $util.Long.fromValue(object.resultSizeBytes)).unsigned = false; + else if (typeof object.resultSizeBytes === "string") + message.resultSizeBytes = parseInt(object.resultSizeBytes, 10); + else if (typeof object.resultSizeBytes === "number") + message.resultSizeBytes = object.resultSizeBytes; + else if (typeof object.resultSizeBytes === "object") + message.resultSizeBytes = new $util.LongBits(object.resultSizeBytes.low >>> 0, object.resultSizeBytes.high >>> 0).toNumber(); + if (object.dataProcessedBytes != null) + if ($util.Long) + (message.dataProcessedBytes = $util.Long.fromValue(object.dataProcessedBytes)).unsigned = false; + else if (typeof object.dataProcessedBytes === "string") + message.dataProcessedBytes = parseInt(object.dataProcessedBytes, 10); + else if (typeof object.dataProcessedBytes === "number") + message.dataProcessedBytes = object.dataProcessedBytes; + else if (typeof object.dataProcessedBytes === "object") + message.dataProcessedBytes = new $util.LongBits(object.dataProcessedBytes.low >>> 0, object.dataProcessedBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.QueryDetail} message QueryDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.queryId = ""; + object.queryText = ""; + object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; + object.duration = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resultSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resultSizeBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataProcessedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataProcessedBytes = options.longs === String ? "0" : 0; + } + if (message.queryId != null && message.hasOwnProperty("queryId")) + object.queryId = message.queryId; + if (message.queryText != null && message.hasOwnProperty("queryText")) + object.queryText = message.queryText; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] === undefined ? message.engine : $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] : message.engine; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (typeof message.resultSizeBytes === "number") + object.resultSizeBytes = options.longs === String ? String(message.resultSizeBytes) : message.resultSizeBytes; + else + object.resultSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resultSizeBytes) : options.longs === Number ? new $util.LongBits(message.resultSizeBytes.low >>> 0, message.resultSizeBytes.high >>> 0).toNumber() : message.resultSizeBytes; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (typeof message.dataProcessedBytes === "number") + object.dataProcessedBytes = options.longs === String ? String(message.dataProcessedBytes) : message.dataProcessedBytes; + else + object.dataProcessedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataProcessedBytes) : options.longs === Number ? new $util.LongBits(message.dataProcessedBytes.low >>> 0, message.dataProcessedBytes.high >>> 0).toNumber() : message.dataProcessedBytes; + return object; + }; + + /** + * Converts this QueryDetail to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + * @returns {Object.} JSON object + */ + QueryDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryDetail + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent.QueryDetail"; + }; - /** - * Service enum. - * @name google.cloud.dataplex.v1.JobEvent.Service - * @enum {number} - * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value - * @property {number} DATAPROC=1 DATAPROC value - */ - JobEvent.Service = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATAPROC"] = 1; - return values; + /** + * Engine enum. + * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine + * @enum {number} + * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value + * @property {number} SPARK_SQL=1 SPARK_SQL value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + QueryDetail.Engine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK_SQL"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; + })(); + + return QueryDetail; })(); - return JobEvent; + return SessionEvent; })(); - v1.SessionEvent = (function() { + v1.DataScanEvent = (function() { /** - * Properties of a SessionEvent. + * Properties of a DataScanEvent. * @memberof google.cloud.dataplex.v1 - * @interface ISessionEvent - * @property {string|null} [message] SessionEvent message - * @property {string|null} [userId] SessionEvent userId - * @property {string|null} [sessionId] SessionEvent sessionId - * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type - * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query - * @property {boolean|null} [eventSucceeded] SessionEvent eventSucceeded - * @property {boolean|null} [fastStartupEnabled] SessionEvent fastStartupEnabled - * @property {google.protobuf.IDuration|null} [unassignedDuration] SessionEvent unassignedDuration - */ - - /** - * Constructs a new SessionEvent. + * @interface IDataScanEvent + * @property {string|null} [dataSource] DataScanEvent dataSource + * @property {string|null} [jobId] DataScanEvent jobId + * @property {google.protobuf.ITimestamp|null} [startTime] DataScanEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] DataScanEvent endTime + * @property {google.cloud.dataplex.v1.DataScanEvent.ScanType|null} [type] DataScanEvent type + * @property {google.cloud.dataplex.v1.DataScanEvent.State|null} [state] DataScanEvent state + * @property {string|null} [message] DataScanEvent message + * @property {string|null} [specVersion] DataScanEvent specVersion + * @property {google.cloud.dataplex.v1.DataScanEvent.Trigger|null} [trigger] DataScanEvent trigger + * @property {google.cloud.dataplex.v1.DataScanEvent.Scope|null} [scope] DataScanEvent scope + * @property {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null} [dataProfile] DataScanEvent dataProfile + * @property {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null} [dataQuality] DataScanEvent dataQuality + */ + + /** + * Constructs a new DataScanEvent. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a SessionEvent. - * @implements ISessionEvent + * @classdesc Represents a DataScanEvent. + * @implements IDataScanEvent * @constructor - * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDataScanEvent=} [properties] Properties to set */ - function SessionEvent(properties) { + function DataScanEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15992,187 +29118,243 @@ } /** - * SessionEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.SessionEvent + * DataScanEvent dataSource. + * @member {string} dataSource + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - SessionEvent.prototype.message = ""; + DataScanEvent.prototype.dataSource = ""; /** - * SessionEvent userId. - * @member {string} userId - * @memberof google.cloud.dataplex.v1.SessionEvent + * DataScanEvent jobId. + * @member {string} jobId + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - SessionEvent.prototype.userId = ""; + DataScanEvent.prototype.jobId = ""; /** - * SessionEvent sessionId. - * @member {string} sessionId - * @memberof google.cloud.dataplex.v1.SessionEvent + * DataScanEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - SessionEvent.prototype.sessionId = ""; + DataScanEvent.prototype.startTime = null; /** - * SessionEvent type. - * @member {google.cloud.dataplex.v1.SessionEvent.EventType} type - * @memberof google.cloud.dataplex.v1.SessionEvent + * DataScanEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - SessionEvent.prototype.type = 0; + DataScanEvent.prototype.endTime = null; /** - * SessionEvent query. - * @member {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null|undefined} query - * @memberof google.cloud.dataplex.v1.SessionEvent + * DataScanEvent type. + * @member {google.cloud.dataplex.v1.DataScanEvent.ScanType} type + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - SessionEvent.prototype.query = null; + DataScanEvent.prototype.type = 0; /** - * SessionEvent eventSucceeded. - * @member {boolean} eventSucceeded - * @memberof google.cloud.dataplex.v1.SessionEvent + * DataScanEvent state. + * @member {google.cloud.dataplex.v1.DataScanEvent.State} state + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - SessionEvent.prototype.eventSucceeded = false; + DataScanEvent.prototype.state = 0; /** - * SessionEvent fastStartupEnabled. - * @member {boolean} fastStartupEnabled - * @memberof google.cloud.dataplex.v1.SessionEvent + * DataScanEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - SessionEvent.prototype.fastStartupEnabled = false; + DataScanEvent.prototype.message = ""; /** - * SessionEvent unassignedDuration. - * @member {google.protobuf.IDuration|null|undefined} unassignedDuration - * @memberof google.cloud.dataplex.v1.SessionEvent + * DataScanEvent specVersion. + * @member {string} specVersion + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - SessionEvent.prototype.unassignedDuration = null; + DataScanEvent.prototype.specVersion = ""; + + /** + * DataScanEvent trigger. + * @member {google.cloud.dataplex.v1.DataScanEvent.Trigger} trigger + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.trigger = 0; + + /** + * DataScanEvent scope. + * @member {google.cloud.dataplex.v1.DataScanEvent.Scope} scope + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.scope = 0; + + /** + * DataScanEvent dataProfile. + * @member {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null|undefined} dataProfile + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.dataProfile = null; + + /** + * DataScanEvent dataQuality. + * @member {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null|undefined} dataQuality + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.dataQuality = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * SessionEvent detail. - * @member {"query"|undefined} detail - * @memberof google.cloud.dataplex.v1.SessionEvent + * DataScanEvent result. + * @member {"dataProfile"|"dataQuality"|undefined} result + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - Object.defineProperty(SessionEvent.prototype, "detail", { - get: $util.oneOfGetter($oneOfFields = ["query"]), + Object.defineProperty(DataScanEvent.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["dataProfile", "dataQuality"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SessionEvent instance using the specified properties. + * Creates a new DataScanEvent instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static - * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent instance + * @param {google.cloud.dataplex.v1.IDataScanEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent instance */ - SessionEvent.create = function create(properties) { - return new SessionEvent(properties); + DataScanEvent.create = function create(properties) { + return new DataScanEvent(properties); }; /** - * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * Encodes the specified DataScanEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static - * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IDataScanEvent} message DataScanEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEvent.encode = function encode(message, writer) { + DataScanEvent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); - if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.eventSucceeded != null && Object.hasOwnProperty.call(message, "eventSucceeded")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.eventSucceeded); - if (message.fastStartupEnabled != null && Object.hasOwnProperty.call(message, "fastStartupEnabled")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.fastStartupEnabled); - if (message.unassignedDuration != null && Object.hasOwnProperty.call(message, "unassignedDuration")) - $root.google.protobuf.Duration.encode(message.unassignedDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.message); + if (message.specVersion != null && Object.hasOwnProperty.call(message, "specVersion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.specVersion); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.trigger); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.scope); + if (message.dataProfile != null && Object.hasOwnProperty.call(message, "dataProfile")) + $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.encode(message.dataProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.dataQuality != null && Object.hasOwnProperty.call(message, "dataQuality")) + $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.encode(message.dataQuality, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); return writer; }; /** - * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * Encodes the specified DataScanEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static - * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IDataScanEvent} message DataScanEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEvent.encodeDelimited = function encodeDelimited(message, writer) { + DataScanEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionEvent message from the specified reader or buffer. + * Decodes a DataScanEvent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionEvent.decode = function decode(reader, length) { + DataScanEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.message = reader.string(); + message.dataSource = reader.string(); break; } case 2: { - message.userId = reader.string(); + message.jobId = reader.string(); break; } case 3: { - message.sessionId = reader.string(); + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.type = reader.int32(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 5: { - message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); + message.type = reader.int32(); break; } case 6: { - message.eventSucceeded = reader.bool(); + message.state = reader.int32(); break; } case 7: { - message.fastStartupEnabled = reader.bool(); + message.message = reader.string(); break; } case 8: { - message.unassignedDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.specVersion = reader.string(); + break; + } + case 9: { + message.trigger = reader.int32(); + break; + } + case 10: { + message.scope = reader.int32(); + break; + } + case 101: { + message.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.decode(reader, reader.uint32()); + break; + } + case 102: { + message.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.decode(reader, reader.uint32()); break; } default: @@ -16184,93 +29366,140 @@ }; /** - * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * Decodes a DataScanEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionEvent.decodeDelimited = function decodeDelimited(reader) { + DataScanEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionEvent message. + * Verifies a DataScanEvent message. * @function verify - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionEvent.verify = function verify(message) { + DataScanEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.userId != null && message.hasOwnProperty("userId")) - if (!$util.isString(message.userId)) - return "userId: string expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - if (!$util.isString(message.sessionId)) - return "sessionId: string expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string 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; + } if (message.type != null && message.hasOwnProperty("type")) switch (message.type) { default: return "type: enum value expected"; case 0: case 1: + case 2: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: case 2: case 3: case 4: break; } - if (message.query != null && message.hasOwnProperty("query")) { - properties.detail = 1; - { - var error = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify(message.query); - if (error) - return "query." + error; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.specVersion != null && message.hasOwnProperty("specVersion")) + if (!$util.isString(message.specVersion)) + return "specVersion: string expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) + switch (message.trigger) { + default: + return "trigger: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) { + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify(message.dataProfile); + if (error) + return "dataProfile." + error; + } + } + if (message.dataQuality != null && message.hasOwnProperty("dataQuality")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify(message.dataQuality); + if (error) + return "dataQuality." + error; } - } - if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) - if (typeof message.eventSucceeded !== "boolean") - return "eventSucceeded: boolean expected"; - if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) - if (typeof message.fastStartupEnabled !== "boolean") - return "fastStartupEnabled: boolean expected"; - if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) { - var error = $root.google.protobuf.Duration.verify(message.unassignedDuration); - if (error) - return "unassignedDuration." + error; } return null; }; /** - * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * Creates a DataScanEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent */ - SessionEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent) + DataScanEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent) return object; - var message = new $root.google.cloud.dataplex.v1.SessionEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.userId != null) - message.userId = String(object.userId); - if (object.sessionId != null) - message.sessionId = String(object.sessionId); + var message = new $root.google.cloud.dataplex.v1.DataScanEvent(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } switch (object.type) { default: if (typeof object.type === "number") { @@ -16278,303 +29507,618 @@ break; } break; - case "EVENT_TYPE_UNSPECIFIED": + case "SCAN_TYPE_UNSPECIFIED": case 0: message.type = 0; break; - case "START": + case "DATA_PROFILE": case 1: message.type = 1; break; - case "STOP": + case "DATA_QUALITY": case 2: message.type = 2; break; - case "QUERY": + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STARTED": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": case 3: - message.type = 3; + message.state = 3; break; - case "CREATE": + case "CANCELLED": case 4: - message.type = 4; + message.state = 4; break; } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); - message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); + if (object.message != null) + message.message = String(object.message); + if (object.specVersion != null) + message.specVersion = String(object.specVersion); + switch (object.trigger) { + default: + if (typeof object.trigger === "number") { + message.trigger = object.trigger; + break; + } + break; + case "TRIGGER_UNSPECIFIED": + case 0: + message.trigger = 0; + break; + case "ON_DEMAND": + case 1: + message.trigger = 1; + break; + case "SCHEDULE": + case 2: + message.trigger = 2; + break; } - if (object.eventSucceeded != null) - message.eventSucceeded = Boolean(object.eventSucceeded); - if (object.fastStartupEnabled != null) - message.fastStartupEnabled = Boolean(object.fastStartupEnabled); - if (object.unassignedDuration != null) { - if (typeof object.unassignedDuration !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.unassignedDuration: object expected"); - message.unassignedDuration = $root.google.protobuf.Duration.fromObject(object.unassignedDuration); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "FULL": + case 1: + message.scope = 1; + break; + case "INCREMENTAL": + case 2: + message.scope = 2; + break; + } + if (object.dataProfile != null) { + if (typeof object.dataProfile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataProfile: object expected"); + message.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.fromObject(object.dataProfile); + } + if (object.dataQuality != null) { + if (typeof object.dataQuality !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataQuality: object expected"); + message.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.fromObject(object.dataQuality); } return message; }; /** - * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * Creates a plain object from a DataScanEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static - * @param {google.cloud.dataplex.v1.SessionEvent} message SessionEvent + * @param {google.cloud.dataplex.v1.DataScanEvent} message DataScanEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionEvent.toObject = function toObject(message, options) { + DataScanEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { + object.dataSource = ""; + object.jobId = ""; + object.startTime = null; + object.endTime = null; + object.type = options.enums === String ? "SCAN_TYPE_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.message = ""; - object.userId = ""; - object.sessionId = ""; - object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; - object.eventSucceeded = false; - object.fastStartupEnabled = false; - object.unassignedDuration = null; + object.specVersion = ""; + object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + 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); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.ScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanEvent.ScanType[message.type] : message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataScanEvent.State[message.state] : message.state; if (message.message != null && message.hasOwnProperty("message")) object.message = message.message; - if (message.userId != null && message.hasOwnProperty("userId")) - object.userId = message.userId; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - object.sessionId = message.sessionId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] : message.type; - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.toObject(message.query, options); + if (message.specVersion != null && message.hasOwnProperty("specVersion")) + object.specVersion = message.specVersion; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.dataplex.v1.DataScanEvent.Trigger[message.trigger] : message.trigger; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.dataplex.v1.DataScanEvent.Scope[message.scope] : message.scope; + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) { + object.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.toObject(message.dataProfile, options); if (options.oneofs) - object.detail = "query"; + object.result = "dataProfile"; + } + if (message.dataQuality != null && message.hasOwnProperty("dataQuality")) { + object.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.toObject(message.dataQuality, options); + if (options.oneofs) + object.result = "dataQuality"; } - if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) - object.eventSucceeded = message.eventSucceeded; - if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) - object.fastStartupEnabled = message.fastStartupEnabled; - if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) - object.unassignedDuration = $root.google.protobuf.Duration.toObject(message.unassignedDuration, options); return object; }; /** - * Converts this SessionEvent to JSON. + * Converts this DataScanEvent to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance * @returns {Object.} JSON object */ - SessionEvent.prototype.toJSON = function toJSON() { + DataScanEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SessionEvent + * Gets the default type url for DataScanEvent * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SessionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataScanEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent"; }; /** - * EventType enum. - * @name google.cloud.dataplex.v1.SessionEvent.EventType + * ScanType enum. + * @name google.cloud.dataplex.v1.DataScanEvent.ScanType * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} START=1 START value - * @property {number} STOP=2 STOP value - * @property {number} QUERY=3 QUERY value - * @property {number} CREATE=4 CREATE value + * @property {number} SCAN_TYPE_UNSPECIFIED=0 SCAN_TYPE_UNSPECIFIED value + * @property {number} DATA_PROFILE=1 DATA_PROFILE value + * @property {number} DATA_QUALITY=2 DATA_QUALITY value */ - SessionEvent.EventType = (function() { + DataScanEvent.ScanType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "START"] = 1; - values[valuesById[2] = "STOP"] = 2; - values[valuesById[3] = "QUERY"] = 3; - values[valuesById[4] = "CREATE"] = 4; + values[valuesById[0] = "SCAN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATA_PROFILE"] = 1; + values[valuesById[2] = "DATA_QUALITY"] = 2; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.DataScanEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STARTED=1 STARTED value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value + */ + DataScanEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STARTED"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + return values; + })(); + + /** + * Trigger enum. + * @name google.cloud.dataplex.v1.DataScanEvent.Trigger + * @enum {number} + * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} SCHEDULE=2 SCHEDULE value + */ + DataScanEvent.Trigger = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "SCHEDULE"] = 2; + return values; + })(); + + /** + * Scope enum. + * @name google.cloud.dataplex.v1.DataScanEvent.Scope + * @enum {number} + * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value + * @property {number} FULL=1 FULL value + * @property {number} INCREMENTAL=2 INCREMENTAL value + */ + DataScanEvent.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FULL"] = 1; + values[valuesById[2] = "INCREMENTAL"] = 2; return values; })(); - SessionEvent.QueryDetail = (function() { + DataScanEvent.DataProfileResult = (function() { + + /** + * Properties of a DataProfileResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @interface IDataProfileResult + * @property {number|Long|null} [rowCount] DataProfileResult rowCount + */ + + /** + * Constructs a new DataProfileResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @classdesc Represents a DataProfileResult. + * @implements IDataProfileResult + * @constructor + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult=} [properties] Properties to set + */ + function DataProfileResult(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]]; + } + + /** + * DataProfileResult rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @instance + */ + DataProfileResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DataProfileResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult instance + */ + DataProfileResult.create = function create(properties) { + return new DataProfileResult(properties); + }; + + /** + * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult} message DataProfileResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowCount); + return writer; + }; + + /** + * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult} message DataProfileResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rowCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + return null; + }; /** - * Properties of a QueryDetail. - * @memberof google.cloud.dataplex.v1.SessionEvent - * @interface IQueryDetail - * @property {string|null} [queryId] QueryDetail queryId - * @property {string|null} [queryText] QueryDetail queryText - * @property {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null} [engine] QueryDetail engine - * @property {google.protobuf.IDuration|null} [duration] QueryDetail duration - * @property {number|Long|null} [resultSizeBytes] QueryDetail resultSizeBytes - * @property {number|Long|null} [dataProcessedBytes] QueryDetail dataProcessedBytes + * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult */ + DataProfileResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult(); + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + return message; + }; /** - * Constructs a new QueryDetail. - * @memberof google.cloud.dataplex.v1.SessionEvent - * @classdesc Represents a QueryDetail. - * @implements IQueryDetail - * @constructor - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} message DataProfileResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - function QueryDetail(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]]; - } + DataProfileResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + return object; + }; /** - * QueryDetail queryId. - * @member {string} queryId - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * Converts this DataProfileResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult * @instance + * @returns {Object.} JSON object */ - QueryDetail.prototype.queryId = ""; + DataProfileResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * QueryDetail queryText. - * @member {string} queryText - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance + * Gets the default type url for DataProfileResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - QueryDetail.prototype.queryText = ""; + DataProfileResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataProfileResult"; + }; + + return DataProfileResult; + })(); + + DataScanEvent.DataQualityResult = (function() { /** - * QueryDetail engine. - * @member {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine} engine - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance + * Properties of a DataQualityResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @interface IDataQualityResult + * @property {number|Long|null} [rowCount] DataQualityResult rowCount + * @property {boolean|null} [passed] DataQualityResult passed + * @property {Object.|null} [dimensionPassed] DataQualityResult dimensionPassed */ - QueryDetail.prototype.engine = 0; /** - * QueryDetail duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * Constructs a new DataQualityResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @classdesc Represents a DataQualityResult. + * @implements IDataQualityResult + * @constructor + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult=} [properties] Properties to set + */ + function DataQualityResult(properties) { + this.dimensionPassed = {}; + 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]]; + } + + /** + * DataQualityResult rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @instance */ - QueryDetail.prototype.duration = null; + DataQualityResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * QueryDetail resultSizeBytes. - * @member {number|Long} resultSizeBytes - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * DataQualityResult passed. + * @member {boolean} passed + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @instance */ - QueryDetail.prototype.resultSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DataQualityResult.prototype.passed = false; /** - * QueryDetail dataProcessedBytes. - * @member {number|Long} dataProcessedBytes - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * DataQualityResult dimensionPassed. + * @member {Object.} dimensionPassed + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @instance */ - QueryDetail.prototype.dataProcessedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DataQualityResult.prototype.dimensionPassed = $util.emptyObject; /** - * Creates a new QueryDetail instance using the specified properties. + * Creates a new DataQualityResult instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail instance + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult instance */ - QueryDetail.create = function create(properties) { - return new QueryDetail(properties); + DataQualityResult.create = function create(properties) { + return new DataQualityResult(properties); }; /** - * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult} message DataQualityResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryDetail.encode = function encode(message, writer) { + DataQualityResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); - if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryText); - if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.engine); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.resultSizeBytes != null && Object.hasOwnProperty.call(message, "resultSizeBytes")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.resultSizeBytes); - if (message.dataProcessedBytes != null && Object.hasOwnProperty.call(message, "dataProcessedBytes")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.dataProcessedBytes); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowCount); + if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.passed); + if (message.dimensionPassed != null && Object.hasOwnProperty.call(message, "dimensionPassed")) + for (var keys = Object.keys(message.dimensionPassed), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).bool(message.dimensionPassed[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult} message DataQualityResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryDetail.encodeDelimited = function encodeDelimited(message, writer) { + DataQualityResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryDetail message from the specified reader or buffer. + * Decodes a DataQualityResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryDetail.decode = function decode(reader, length) { + DataQualityResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.queryId = reader.string(); + message.rowCount = reader.int64(); break; } case 2: { - message.queryText = reader.string(); + message.passed = reader.bool(); break; } case 3: { - message.engine = reader.int32(); - break; - } - case 4: { - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 5: { - message.resultSizeBytes = reader.int64(); - break; - } - case 6: { - message.dataProcessedBytes = reader.int64(); + if (message.dimensionPassed === $util.emptyObject) + message.dimensionPassed = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = false; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.bool(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.dimensionPassed[key] = value; break; } default: @@ -16586,219 +30130,151 @@ }; /** - * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDetail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDetail message. - * @function verify - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDetail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.queryId != null && message.hasOwnProperty("queryId")) - if (!$util.isString(message.queryId)) - return "queryId: string expected"; - if (message.queryText != null && message.hasOwnProperty("queryText")) - if (!$util.isString(message.queryText)) - return "queryText: string expected"; - if (message.engine != null && message.hasOwnProperty("engine")) - switch (message.engine) { - default: - return "engine: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) - if (!$util.isInteger(message.resultSizeBytes) && !(message.resultSizeBytes && $util.isInteger(message.resultSizeBytes.low) && $util.isInteger(message.resultSizeBytes.high))) - return "resultSizeBytes: integer|Long expected"; - if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) - if (!$util.isInteger(message.dataProcessedBytes) && !(message.dataProcessedBytes && $util.isInteger(message.dataProcessedBytes.low) && $util.isInteger(message.dataProcessedBytes.high))) - return "dataProcessedBytes: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail - */ - QueryDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail) - return object; - var message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); - if (object.queryId != null) - message.queryId = String(object.queryId); - if (object.queryText != null) - message.queryText = String(object.queryText); - switch (object.engine) { - default: - if (typeof object.engine === "number") { - message.engine = object.engine; - break; - } - break; - case "ENGINE_UNSPECIFIED": - case 0: - message.engine = 0; - break; - case "SPARK_SQL": - case 1: - message.engine = 1; - break; - case "BIGQUERY": - case 2: - message.engine = 2; - break; - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.QueryDetail.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + */ + DataQualityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataQualityResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + if (message.passed != null && message.hasOwnProperty("passed")) + if (typeof message.passed !== "boolean") + return "passed: boolean expected"; + if (message.dimensionPassed != null && message.hasOwnProperty("dimensionPassed")) { + if (!$util.isObject(message.dimensionPassed)) + return "dimensionPassed: object expected"; + var key = Object.keys(message.dimensionPassed); + for (var i = 0; i < key.length; ++i) + if (typeof message.dimensionPassed[key[i]] !== "boolean") + return "dimensionPassed: boolean{k:string} expected"; } - if (object.resultSizeBytes != null) - if ($util.Long) - (message.resultSizeBytes = $util.Long.fromValue(object.resultSizeBytes)).unsigned = false; - else if (typeof object.resultSizeBytes === "string") - message.resultSizeBytes = parseInt(object.resultSizeBytes, 10); - else if (typeof object.resultSizeBytes === "number") - message.resultSizeBytes = object.resultSizeBytes; - else if (typeof object.resultSizeBytes === "object") - message.resultSizeBytes = new $util.LongBits(object.resultSizeBytes.low >>> 0, object.resultSizeBytes.high >>> 0).toNumber(); - if (object.dataProcessedBytes != null) + return null; + }; + + /** + * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult + */ + DataQualityResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult(); + if (object.rowCount != null) if ($util.Long) - (message.dataProcessedBytes = $util.Long.fromValue(object.dataProcessedBytes)).unsigned = false; - else if (typeof object.dataProcessedBytes === "string") - message.dataProcessedBytes = parseInt(object.dataProcessedBytes, 10); - else if (typeof object.dataProcessedBytes === "number") - message.dataProcessedBytes = object.dataProcessedBytes; - else if (typeof object.dataProcessedBytes === "object") - message.dataProcessedBytes = new $util.LongBits(object.dataProcessedBytes.low >>> 0, object.dataProcessedBytes.high >>> 0).toNumber(); + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + if (object.passed != null) + message.passed = Boolean(object.passed); + if (object.dimensionPassed) { + if (typeof object.dimensionPassed !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.dimensionPassed: object expected"); + message.dimensionPassed = {}; + for (var keys = Object.keys(object.dimensionPassed), i = 0; i < keys.length; ++i) + message.dimensionPassed[keys[i]] = Boolean(object.dimensionPassed[keys[i]]); + } return message; }; /** - * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @static - * @param {google.cloud.dataplex.v1.SessionEvent.QueryDetail} message QueryDetail + * @param {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} message DataQualityResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryDetail.toObject = function toObject(message, options) { + DataQualityResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.dimensionPassed = {}; if (options.defaults) { - object.queryId = ""; - object.queryText = ""; - object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; - object.duration = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.resultSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.resultSizeBytes = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); - object.dataProcessedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.dataProcessedBytes = options.longs === String ? "0" : 0; + object.rowCount = options.longs === String ? "0" : 0; + object.passed = false; } - if (message.queryId != null && message.hasOwnProperty("queryId")) - object.queryId = message.queryId; - if (message.queryText != null && message.hasOwnProperty("queryText")) - object.queryText = message.queryText; - if (message.engine != null && message.hasOwnProperty("engine")) - object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] === undefined ? message.engine : $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] : message.engine; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) - if (typeof message.resultSizeBytes === "number") - object.resultSizeBytes = options.longs === String ? String(message.resultSizeBytes) : message.resultSizeBytes; - else - object.resultSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resultSizeBytes) : options.longs === Number ? new $util.LongBits(message.resultSizeBytes.low >>> 0, message.resultSizeBytes.high >>> 0).toNumber() : message.resultSizeBytes; - if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) - if (typeof message.dataProcessedBytes === "number") - object.dataProcessedBytes = options.longs === String ? String(message.dataProcessedBytes) : message.dataProcessedBytes; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; else - object.dataProcessedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataProcessedBytes) : options.longs === Number ? new $util.LongBits(message.dataProcessedBytes.low >>> 0, message.dataProcessedBytes.high >>> 0).toNumber() : message.dataProcessedBytes; + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + if (message.passed != null && message.hasOwnProperty("passed")) + object.passed = message.passed; + var keys2; + if (message.dimensionPassed && (keys2 = Object.keys(message.dimensionPassed)).length) { + object.dimensionPassed = {}; + for (var j = 0; j < keys2.length; ++j) + object.dimensionPassed[keys2[j]] = message.dimensionPassed[keys2[j]]; + } return object; }; /** - * Converts this QueryDetail to JSON. + * Converts this DataQualityResult to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @instance * @returns {Object.} JSON object */ - QueryDetail.prototype.toJSON = function toJSON() { + DataQualityResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QueryDetail + * Gets the default type url for DataQualityResult * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QueryDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent.QueryDetail"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataQualityResult"; }; - /** - * Engine enum. - * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine - * @enum {number} - * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value - * @property {number} SPARK_SQL=1 SPARK_SQL value - * @property {number} BIGQUERY=2 BIGQUERY value - */ - QueryDetail.Engine = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK_SQL"] = 1; - values[valuesById[2] = "BIGQUERY"] = 2; - return values; - })(); - - return QueryDetail; + return DataQualityResult; })(); - return SessionEvent; + return DataScanEvent; })(); v1.MetadataService = (function() { @@ -22476,6 +35952,7 @@ * @property {string|null} [mimeType] StorageFormat mimeType * @property {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null} [csv] StorageFormat csv * @property {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null} [json] StorageFormat json + * @property {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null} [iceberg] StorageFormat iceberg */ /** @@ -22533,17 +36010,25 @@ */ StorageFormat.prototype.json = null; + /** + * StorageFormat iceberg. + * @member {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null|undefined} iceberg + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.iceberg = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * StorageFormat options. - * @member {"csv"|"json"|undefined} options + * @member {"csv"|"json"|"iceberg"|undefined} options * @memberof google.cloud.dataplex.v1.StorageFormat * @instance */ Object.defineProperty(StorageFormat.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["csv", "json"]), + get: $util.oneOfGetter($oneOfFields = ["csv", "json", "iceberg"]), set: $util.oneOfSetter($oneOfFields) }); @@ -22581,6 +36066,8 @@ $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.encode(message.csv, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.json != null && Object.hasOwnProperty.call(message, "json")) $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.encode(message.json, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.iceberg != null && Object.hasOwnProperty.call(message, "iceberg")) + $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.encode(message.iceberg, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; @@ -22635,6 +36122,10 @@ message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); break; } + case 12: { + message.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22720,6 +36211,16 @@ return "json." + error; } } + if (message.iceberg != null && message.hasOwnProperty("iceberg")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify(message.iceberg); + if (error) + return "iceberg." + error; + } + } return null; }; @@ -22827,6 +36328,11 @@ throw TypeError(".google.cloud.dataplex.v1.StorageFormat.json: object expected"); message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.fromObject(object.json); } + if (object.iceberg != null) { + if (typeof object.iceberg !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.iceberg: object expected"); + message.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.fromObject(object.iceberg); + } return message; }; @@ -22864,6 +36370,11 @@ if (options.oneofs) object.options = "json"; } + if (message.iceberg != null && message.hasOwnProperty("iceberg")) { + object.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.toObject(message.iceberg, options); + if (options.oneofs) + object.options = "iceberg"; + } return object; }; @@ -23369,6 +36880,209 @@ return JsonOptions; })(); + StorageFormat.IcebergOptions = (function() { + + /** + * Properties of an IcebergOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface IIcebergOptions + * @property {string|null} [metadataLocation] IcebergOptions metadataLocation + */ + + /** + * Constructs a new IcebergOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents an IcebergOptions. + * @implements IIcebergOptions + * @constructor + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions=} [properties] Properties to set + */ + function IcebergOptions(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]]; + } + + /** + * IcebergOptions metadataLocation. + * @member {string} metadataLocation + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @instance + */ + IcebergOptions.prototype.metadataLocation = ""; + + /** + * Creates a new IcebergOptions instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions instance + */ + IcebergOptions.create = function create(properties) { + return new IcebergOptions(properties); + }; + + /** + * Encodes the specified IcebergOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions} message IcebergOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IcebergOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadataLocation != null && Object.hasOwnProperty.call(message, "metadataLocation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metadataLocation); + return writer; + }; + + /** + * Encodes the specified IcebergOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions} message IcebergOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IcebergOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IcebergOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IcebergOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metadataLocation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IcebergOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IcebergOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IcebergOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IcebergOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) + if (!$util.isString(message.metadataLocation)) + return "metadataLocation: string expected"; + return null; + }; + + /** + * Creates an IcebergOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions + */ + IcebergOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions) + return object; + var message = new $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions(); + if (object.metadataLocation != null) + message.metadataLocation = String(object.metadataLocation); + return message; + }; + + /** + * Creates a plain object from an IcebergOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} message IcebergOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IcebergOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadataLocation = ""; + if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) + object.metadataLocation = message.metadataLocation; + return object; + }; + + /** + * Converts this IcebergOptions to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @instance + * @returns {Object.} JSON object + */ + IcebergOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IcebergOptions + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IcebergOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.IcebergOptions"; + }; + + return IcebergOptions; + })(); + /** * Format enum. * @name google.cloud.dataplex.v1.StorageFormat.Format diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json index bd794d65777..0353dbbe225 100644 --- a/packages/google-cloud-dataplex/protos/protos.json +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -1683,6 +1683,1224 @@ } } }, + "DataProfileSpec": { + "fields": {} + }, + "DataProfileResult": { + "fields": { + "rowCount": { + "type": "int64", + "id": 3 + }, + "profile": { + "type": "Profile", + "id": 4 + }, + "scannedData": { + "type": "ScannedData", + "id": 5 + } + }, + "nested": { + "Profile": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 2 + } + }, + "nested": { + "Field": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "string", + "id": 2 + }, + "mode": { + "type": "string", + "id": 3 + }, + "profile": { + "type": "ProfileInfo", + "id": 4 + } + }, + "nested": { + "ProfileInfo": { + "oneofs": { + "fieldInfo": { + "oneof": [ + "stringProfile", + "integerProfile", + "doubleProfile" + ] + } + }, + "fields": { + "nullRatio": { + "type": "double", + "id": 2 + }, + "distinctRatio": { + "type": "double", + "id": 3 + }, + "topNValues": { + "rule": "repeated", + "type": "TopNValue", + "id": 4 + }, + "stringProfile": { + "type": "StringFieldInfo", + "id": 101 + }, + "integerProfile": { + "type": "IntegerFieldInfo", + "id": 102 + }, + "doubleProfile": { + "type": "DoubleFieldInfo", + "id": 103 + } + }, + "nested": { + "StringFieldInfo": { + "fields": { + "minLength": { + "type": "int64", + "id": 1 + }, + "maxLength": { + "type": "int64", + "id": 2 + }, + "averageLength": { + "type": "double", + "id": 3 + } + } + }, + "IntegerFieldInfo": { + "fields": { + "average": { + "type": "double", + "id": 1 + }, + "standardDeviation": { + "type": "double", + "id": 3 + }, + "min": { + "type": "int64", + "id": 4 + }, + "quartiles": { + "rule": "repeated", + "type": "int64", + "id": 6 + }, + "max": { + "type": "int64", + "id": 5 + } + } + }, + "DoubleFieldInfo": { + "fields": { + "average": { + "type": "double", + "id": 1 + }, + "standardDeviation": { + "type": "double", + "id": 3 + }, + "min": { + "type": "double", + "id": 4 + }, + "quartiles": { + "rule": "repeated", + "type": "double", + "id": 6 + }, + "max": { + "type": "double", + "id": 5 + } + } + }, + "TopNValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + }, + "count": { + "type": "int64", + "id": 2 + } + } + } + } + } + } + } + } + } + } + }, + "Trigger": { + "oneofs": { + "mode": { + "oneof": [ + "onDemand", + "schedule" + ] + } + }, + "fields": { + "onDemand": { + "type": "OnDemand", + "id": 100 + }, + "schedule": { + "type": "Schedule", + "id": 101 + } + }, + "nested": { + "OnDemand": { + "fields": {} + }, + "Schedule": { + "fields": { + "cron": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "DataSource": { + "oneofs": { + "source": { + "oneof": [ + "entity" + ] + } + }, + "fields": { + "entity": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + } + } + }, + "ScannedData": { + "oneofs": { + "dataRange": { + "oneof": [ + "incrementalField" + ] + } + }, + "fields": { + "incrementalField": { + "type": "IncrementalField", + "id": 1 + } + }, + "nested": { + "IncrementalField": { + "fields": { + "field": { + "type": "string", + "id": 1 + }, + "start": { + "type": "string", + "id": 2 + }, + "end": { + "type": "string", + "id": 3 + } + } + } + } + }, + "DataQualitySpec": { + "fields": { + "rules": { + "rule": "repeated", + "type": "DataQualityRule", + "id": 1 + } + } + }, + "DataQualityResult": { + "fields": { + "passed": { + "type": "bool", + "id": 5 + }, + "dimensions": { + "rule": "repeated", + "type": "DataQualityDimensionResult", + "id": 2 + }, + "rules": { + "rule": "repeated", + "type": "DataQualityRuleResult", + "id": 3 + }, + "rowCount": { + "type": "int64", + "id": 4 + }, + "scannedData": { + "type": "ScannedData", + "id": 7 + } + } + }, + "DataQualityRuleResult": { + "fields": { + "rule": { + "type": "DataQualityRule", + "id": 1 + }, + "passed": { + "type": "bool", + "id": 7 + }, + "evaluatedCount": { + "type": "int64", + "id": 9 + }, + "passedCount": { + "type": "int64", + "id": 8 + }, + "nullCount": { + "type": "int64", + "id": 5 + }, + "passRatio": { + "type": "double", + "id": 6 + }, + "failingRowsQuery": { + "type": "string", + "id": 10 + } + } + }, + "DataQualityDimensionResult": { + "fields": { + "passed": { + "type": "bool", + "id": 3 + } + } + }, + "DataQualityRule": { + "oneofs": { + "ruleType": { + "oneof": [ + "rangeExpectation", + "nonNullExpectation", + "setExpectation", + "regexExpectation", + "uniquenessExpectation", + "statisticRangeExpectation", + "rowConditionExpectation", + "tableConditionExpectation" + ] + } + }, + "fields": { + "rangeExpectation": { + "type": "RangeExpectation", + "id": 1 + }, + "nonNullExpectation": { + "type": "NonNullExpectation", + "id": 2 + }, + "setExpectation": { + "type": "SetExpectation", + "id": 3 + }, + "regexExpectation": { + "type": "RegexExpectation", + "id": 4 + }, + "uniquenessExpectation": { + "type": "UniquenessExpectation", + "id": 100 + }, + "statisticRangeExpectation": { + "type": "StatisticRangeExpectation", + "id": 101 + }, + "rowConditionExpectation": { + "type": "RowConditionExpectation", + "id": 200 + }, + "tableConditionExpectation": { + "type": "TableConditionExpectation", + "id": 201 + }, + "column": { + "type": "string", + "id": 500, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ignoreNull": { + "type": "bool", + "id": 501, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dimension": { + "type": "string", + "id": 502, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "threshold": { + "type": "double", + "id": 503, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RangeExpectation": { + "fields": { + "minValue": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxValue": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "strictMinEnabled": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "strictMaxEnabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NonNullExpectation": { + "fields": {} + }, + "SetExpectation": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "RegexExpectation": { + "fields": { + "regex": { + "type": "string", + "id": 1 + } + } + }, + "UniquenessExpectation": { + "fields": {} + }, + "StatisticRangeExpectation": { + "fields": { + "statistic": { + "type": "ColumnStatistic", + "id": 1 + }, + "minValue": { + "type": "string", + "id": 2 + }, + "maxValue": { + "type": "string", + "id": 3 + }, + "strictMinEnabled": { + "type": "bool", + "id": 4 + }, + "strictMaxEnabled": { + "type": "bool", + "id": 5 + } + }, + "nested": { + "ColumnStatistic": { + "values": { + "STATISTIC_UNDEFINED": 0, + "MEAN": 1, + "MIN": 2, + "MAX": 3 + } + } + } + }, + "RowConditionExpectation": { + "fields": { + "sqlExpression": { + "type": "string", + "id": 1 + } + } + }, + "TableConditionExpectation": { + "fields": { + "sqlExpression": { + "type": "string", + "id": 1 + } + } + } + } + }, + "DataScanService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateDataScan": { + "requestType": "CreateDataScanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/dataScans", + "(google.api.http).body": "data_scan", + "(google.api.method_signature)": "parent,data_scan,data_scan_id", + "(google.longrunning.operation_info).response_type": "DataScan", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/dataScans", + "body": "data_scan" + } + }, + { + "(google.api.method_signature)": "parent,data_scan,data_scan_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataScan", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateDataScan": { + "requestType": "UpdateDataScanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{data_scan.name=projects/*/locations/*/dataScans/*}", + "(google.api.http).body": "data_scan", + "(google.api.method_signature)": "data_scan,update_mask", + "(google.longrunning.operation_info).response_type": "DataScan", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_scan.name=projects/*/locations/*/dataScans/*}", + "body": "data_scan" + } + }, + { + "(google.api.method_signature)": "data_scan,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataScan", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteDataScan": { + "requestType": "DeleteDataScanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/dataScans/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/dataScans/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetDataScan": { + "requestType": "GetDataScanRequest", + "responseType": "DataScan", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataScans/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/dataScans/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDataScans": { + "requestType": "ListDataScansRequest", + "responseType": "ListDataScansResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/dataScans", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/dataScans" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "RunDataScan": { + "requestType": "RunDataScanRequest", + "responseType": "RunDataScanResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/dataScans/*}:run", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/dataScans/*}:run", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetDataScanJob": { + "requestType": "GetDataScanJobRequest", + "responseType": "DataScanJob", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDataScanJobs": { + "requestType": "ListDataScanJobsRequest", + "responseType": "ListDataScanJobsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/dataScans/*}/jobs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/dataScans/*}/jobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateDataScanRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "dataScan": { + "type": "DataScan", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataScanId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateDataScanRequest": { + "fields": { + "dataScan": { + "type": "DataScan", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteDataScanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" + } + } + } + }, + "GetDataScanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" + } + }, + "view": { + "type": "DataScanView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DataScanView": { + "values": { + "DATA_SCAN_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 10 + } + } + } + }, + "ListDataScansRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataScansResponse": { + "fields": { + "dataScans": { + "rule": "repeated", + "type": "DataScan", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "RunDataScanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" + } + } + } + }, + "RunDataScanResponse": { + "fields": { + "job": { + "type": "DataScanJob", + "id": 1 + } + } + }, + "GetDataScanJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScanJob" + } + }, + "view": { + "type": "DataScanJobView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DataScanJobView": { + "values": { + "DATA_SCAN_JOB_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 10 + } + } + } + }, + "ListDataScanJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/DataScan" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataScanJobsResponse": { + "fields": { + "dataScanJobs": { + "rule": "repeated", + "type": "DataScanJob", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DataScan": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/DataScan", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataScans/{dataScan}" + }, + "oneofs": { + "spec": { + "oneof": [ + "dataQualitySpec", + "dataProfileSpec" + ] + }, + "result": { + "oneof": [ + "dataQualityResult", + "dataProfileResult" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "data": { + "type": "DataSource", + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "executionSpec": { + "type": "ExecutionSpec", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "executionStatus": { + "type": "ExecutionStatus", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "DataScanType", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataQualitySpec": { + "type": "DataQualitySpec", + "id": 100 + }, + "dataProfileSpec": { + "type": "DataProfileSpec", + "id": 101 + }, + "dataQualityResult": { + "type": "DataQualityResult", + "id": 200, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataProfileResult": { + "type": "DataProfileResult", + "id": 201, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "ExecutionSpec": { + "oneofs": { + "incremental": { + "oneof": [ + "field" + ] + } + }, + "fields": { + "trigger": { + "type": "Trigger", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "field": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "ExecutionStatus": { + "fields": { + "latestJobStartTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "latestJobEndTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + } + } + } + } + }, + "DataScanJob": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/DataScanJob", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}" + }, + "oneofs": { + "spec": { + "oneof": [ + "dataQualitySpec", + "dataProfileSpec" + ] + }, + "result": { + "oneof": [ + "dataQualityResult", + "dataProfileResult" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "message": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "DataScanType", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataQualitySpec": { + "type": "DataQualitySpec", + "id": 100, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataProfileSpec": { + "type": "DataProfileSpec", + "id": 101, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataQualityResult": { + "type": "DataQualityResult", + "id": 200, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataProfileResult": { + "type": "DataProfileResult", + "id": 201, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "CANCELING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4, + "FAILED": 5, + "PENDING": 7 + } + } + } + }, + "DataScanType": { + "values": { + "DATA_SCAN_TYPE_UNSPECIFIED": 0, + "DATA_QUALITY": 1, + "DATA_PROFILE": 2 + } + }, "DiscoveryEvent": { "oneofs": { "details": { @@ -1963,6 +3181,123 @@ } } }, + "DataScanEvent": { + "oneofs": { + "result": { + "oneof": [ + "dataProfile", + "dataQuality" + ] + } + }, + "fields": { + "dataSource": { + "type": "string", + "id": 1 + }, + "jobId": { + "type": "string", + "id": 2 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "type": { + "type": "ScanType", + "id": 5 + }, + "state": { + "type": "State", + "id": 6 + }, + "message": { + "type": "string", + "id": 7 + }, + "specVersion": { + "type": "string", + "id": 8 + }, + "trigger": { + "type": "Trigger", + "id": 9 + }, + "scope": { + "type": "Scope", + "id": 10 + }, + "dataProfile": { + "type": "DataProfileResult", + "id": 101 + }, + "dataQuality": { + "type": "DataQualityResult", + "id": 102 + } + }, + "nested": { + "ScanType": { + "values": { + "SCAN_TYPE_UNSPECIFIED": 0, + "DATA_PROFILE": 1, + "DATA_QUALITY": 2 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STARTED": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "CANCELLED": 4 + } + }, + "Trigger": { + "values": { + "TRIGGER_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "SCHEDULE": 2 + } + }, + "Scope": { + "values": { + "SCOPE_UNSPECIFIED": 0, + "FULL": 1, + "INCREMENTAL": 2 + } + }, + "DataProfileResult": { + "fields": { + "rowCount": { + "type": "int64", + "id": 1 + } + } + }, + "DataQualityResult": { + "fields": { + "rowCount": { + "type": "int64", + "id": 1 + }, + "passed": { + "type": "bool", + "id": 2 + }, + "dimensionPassed": { + "keyType": "string", + "type": "bool", + "id": 3 + } + } + } + } + }, "MetadataService": { "options": { "(google.api.default_host)": "dataplex.googleapis.com", @@ -2733,7 +4068,8 @@ "options": { "oneof": [ "csv", - "json" + "json", + "iceberg" ] } }, @@ -2772,6 +4108,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "iceberg": { + "type": "IcebergOptions", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -2818,6 +4161,17 @@ } } }, + "IcebergOptions": { + "fields": { + "metadataLocation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "Format": { "values": { "FORMAT_UNSPECIFIED": 0, diff --git a/packages/google-cloud-dataplex/samples/README.md b/packages/google-cloud-dataplex/samples/README.md index 070b4ee4751..7133f36ef00 100644 --- a/packages/google-cloud-dataplex/samples/README.md +++ b/packages/google-cloud-dataplex/samples/README.md @@ -20,6 +20,14 @@ * [Content_service.set_iam_policy](#content_service.set_iam_policy) * [Content_service.test_iam_permissions](#content_service.test_iam_permissions) * [Content_service.update_content](#content_service.update_content) + * [Data_scan_service.create_data_scan](#data_scan_service.create_data_scan) + * [Data_scan_service.delete_data_scan](#data_scan_service.delete_data_scan) + * [Data_scan_service.get_data_scan](#data_scan_service.get_data_scan) + * [Data_scan_service.get_data_scan_job](#data_scan_service.get_data_scan_job) + * [Data_scan_service.list_data_scan_jobs](#data_scan_service.list_data_scan_jobs) + * [Data_scan_service.list_data_scans](#data_scan_service.list_data_scans) + * [Data_scan_service.run_data_scan](#data_scan_service.run_data_scan) + * [Data_scan_service.update_data_scan](#data_scan_service.update_data_scan) * [Dataplex_service.cancel_job](#dataplex_service.cancel_job) * [Dataplex_service.create_asset](#dataplex_service.create_asset) * [Dataplex_service.create_environment](#dataplex_service.create_environment) @@ -215,6 +223,142 @@ __Usage:__ +### Data_scan_service.create_data_scan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js` + + +----- + + + + +### Data_scan_service.delete_data_scan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.delete_data_scan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.delete_data_scan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.delete_data_scan.js` + + +----- + + + + +### Data_scan_service.get_data_scan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan.js` + + +----- + + + + +### Data_scan_service.get_data_scan_job + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js` + + +----- + + + + +### Data_scan_service.list_data_scan_jobs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scan_jobs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scan_jobs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scan_jobs.js` + + +----- + + + + +### Data_scan_service.list_data_scans + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js` + + +----- + + + + +### Data_scan_service.run_data_scan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.run_data_scan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.run_data_scan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.run_data_scan.js` + + +----- + + + + +### Data_scan_service.update_data_scan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js` + + +----- + + + + ### Dataplex_service.cancel_job View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.cancel_job.js). diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js new file mode 100644 index 00000000000..47d66fc5362 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js @@ -0,0 +1,80 @@ +// Copyright 2022 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, dataScan, dataScanId) { + // [START dataplex_v1_generated_DataScanService_CreateDataScan_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 resource name of the parent location: + * projects/{project}/locations/{location_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Required. DataScan resource. + */ + // const dataScan = {} + /** + * Required. DataScan identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + */ + // const dataScanId = 'abc123' + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callCreateDataScan() { + // Construct request + const request = { + parent, + dataScan, + dataScanId, + }; + + // Run request + const [operation] = await dataplexClient.createDataScan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateDataScan(); + // [END dataplex_v1_generated_DataScanService_CreateDataScan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.delete_data_scan.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.delete_data_scan.js new file mode 100644 index 00000000000..5d04e125f6a --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.delete_data_scan.js @@ -0,0 +1,65 @@ +// Copyright 2022 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(name) { + // [START dataplex_v1_generated_DataScanService_DeleteDataScan_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 resource name of the dataScan: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callDeleteDataScan() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await dataplexClient.deleteDataScan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteDataScan(); + // [END dataplex_v1_generated_DataScanService_DeleteDataScan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan.js new file mode 100644 index 00000000000..1767166d695 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan.js @@ -0,0 +1,69 @@ +// Copyright 2022 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(name) { + // [START dataplex_v1_generated_DataScanService_GetDataScan_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 resource name of the dataScan: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + */ + // const name = 'abc123' + /** + * Optional. Used to select the subset of DataScan information to return. + * Defaults to `BASIC`. + */ + // const view = {} + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callGetDataScan() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getDataScan(request); + console.log(response); + } + + callGetDataScan(); + // [END dataplex_v1_generated_DataScanService_GetDataScan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js new file mode 100644 index 00000000000..3edec413dcc --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js @@ -0,0 +1,69 @@ +// Copyright 2022 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(name) { + // [START dataplex_v1_generated_DataScanService_GetDataScanJob_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 resource name of the DataScanJob: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/dataScanJobs/{data_scan_job_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + */ + // const name = 'abc123' + /** + * Optional. Used to select the subset of DataScan information to return. + * Defaults to `BASIC`. + */ + // const view = {} + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callGetDataScanJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.getDataScanJob(request); + console.log(response); + } + + callGetDataScanJob(); + // [END dataplex_v1_generated_DataScanService_GetDataScanJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scan_jobs.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scan_jobs.js new file mode 100644 index 00000000000..baf6e93cc40 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scan_jobs.js @@ -0,0 +1,80 @@ +// Copyright 2022 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) { + // [START dataplex_v1_generated_DataScanService_ListDataScanJobs_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 resource name of the parent environment: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` must match the call that provided + * the page token. + */ + // const pageToken = 'abc123' + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callListDataScanJobs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listDataScanJobsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataScanJobs(); + // [END dataplex_v1_generated_DataScanService_ListDataScanJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js new file mode 100644 index 00000000000..437ea6bc449 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js @@ -0,0 +1,87 @@ +// Copyright 2022 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) { + // [START dataplex_v1_generated_DataScanService_ListDataScans_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. projects/{project}/locations/{location_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + */ + // const parent = 'abc123' + /** + * Optional. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 10 scans will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Filter request. + */ + // const filter = 'abc123' + /** + * Optional. Order by fields (name or create_time) for the result. + * If not specified, the ordering is undefined. + */ + // const orderBy = 'abc123' + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callListDataScans() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await dataplexClient.listDataScansAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataScans(); + // [END dataplex_v1_generated_DataScanService_ListDataScans_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.run_data_scan.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.run_data_scan.js new file mode 100644 index 00000000000..471c6b028fd --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.run_data_scan.js @@ -0,0 +1,65 @@ +// Copyright 2022 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(name) { + // [START dataplex_v1_generated_DataScanService_RunDataScan_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 resource name of the DataScan: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * Only on-demand DataScans are allowed. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callRunDataScan() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.runDataScan(request); + console.log(response); + } + + callRunDataScan(); + // [END dataplex_v1_generated_DataScanService_RunDataScan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js new file mode 100644 index 00000000000..87a29a57f34 --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js @@ -0,0 +1,68 @@ +// Copyright 2022 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(dataScan, updateMask) { + // [START dataplex_v1_generated_DataScanService_UpdateDataScan_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. Update description. + * Only fields specified in `update_mask` are updated. + */ + // const dataScan = {} + /** + * Required. Mask of fields to update. + */ + // const updateMask = {} + + // Imports the Dataplex library + const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataScanServiceClient(); + + async function callUpdateDataScan() { + // Construct request + const request = { + dataScan, + updateMask, + }; + + // Run request + const [operation] = await dataplexClient.updateDataScan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDataScan(); + // [END dataplex_v1_generated_DataScanService_UpdateDataScan_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index f026108b3b9..e2816b4a76a 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -1883,6 +1883,370 @@ } } }, + { + "regionTag": "dataplex_v1_generated_DataScanService_CreateDataScan_async", + "title": "ContentService createDataScan Sample", + "origin": "API_DEFINITION", + "description": " Creates a dataScan resource.", + "canonical": true, + "file": "data_scan_service.create_data_scan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_scan", + "type": ".google.cloud.dataplex.v1.DataScan" + }, + { + "name": "data_scan_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "CreateDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.CreateDataScan", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_UpdateDataScan_async", + "title": "ContentService updateDataScan Sample", + "origin": "API_DEFINITION", + "description": " Update the dataScan resource.", + "canonical": true, + "file": "data_scan_service.update_data_scan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", + "async": true, + "parameters": [ + { + "name": "data_scan", + "type": ".google.cloud.dataplex.v1.DataScan" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "UpdateDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.UpdateDataScan", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_DeleteDataScan_async", + "title": "ContentService deleteDataScan Sample", + "origin": "API_DEFINITION", + "description": " Delete the dataScan resource.", + "canonical": true, + "file": "data_scan_service.delete_data_scan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "DeleteDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.DeleteDataScan", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_GetDataScan_async", + "title": "ContentService getDataScan Sample", + "origin": "API_DEFINITION", + "description": " Get dataScan resource.", + "canonical": true, + "file": "data_scan_service.get_data_scan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.GetDataScanRequest.DataScanView" + } + ], + "resultType": ".google.cloud.dataplex.v1.DataScan", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "GetDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScan", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_ListDataScans_async", + "title": "ContentService listDataScans Sample", + "origin": "API_DEFINITION", + "description": " Lists dataScans.", + "canonical": true, + "file": "data_scan_service.list_data_scans.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataScans", + "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScans", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListDataScansResponse", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "ListDataScans", + "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScans", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_RunDataScan_async", + "title": "ContentService runDataScan Sample", + "origin": "API_DEFINITION", + "description": " Run an on demand execution of a DataScan.", + "canonical": true, + "file": "data_scan_service.run_data_scan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.RunDataScan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.RunDataScanResponse", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "RunDataScan", + "fullName": "google.cloud.dataplex.v1.DataScanService.RunDataScan", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_GetDataScanJob_async", + "title": "ContentService getDataScanJob Sample", + "origin": "API_DEFINITION", + "description": " Get DataScanJob resource.", + "canonical": true, + "file": "data_scan_service.get_data_scan_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataScanJob", + "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView" + } + ], + "resultType": ".google.cloud.dataplex.v1.DataScanJob", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "GetDataScanJob", + "fullName": "google.cloud.dataplex.v1.DataScanService.GetDataScanJob", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, + { + "regionTag": "dataplex_v1_generated_DataScanService_ListDataScanJobs_async", + "title": "ContentService listDataScanJobs Sample", + "origin": "API_DEFINITION", + "description": " Lists DataScanJobs under the given dataScan.", + "canonical": true, + "file": "data_scan_service.list_data_scan_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataScanJobs", + "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.ListDataScanJobsResponse", + "client": { + "shortName": "DataScanServiceClient", + "fullName": "google.cloud.dataplex.v1.DataScanServiceClient" + }, + "method": { + "shortName": "ListDataScanJobs", + "fullName": "google.cloud.dataplex.v1.DataScanService.ListDataScanJobs", + "service": { + "shortName": "DataScanService", + "fullName": "google.cloud.dataplex.v1.DataScanService" + } + } + } + }, { "regionTag": "dataplex_v1_generated_MetadataService_CreateEntity_async", "title": "ContentService createEntity Sample", diff --git a/packages/google-cloud-dataplex/src/index.ts b/packages/google-cloud-dataplex/src/index.ts index f44a72d6237..9ffc2e15b96 100644 --- a/packages/google-cloud-dataplex/src/index.ts +++ b/packages/google-cloud-dataplex/src/index.ts @@ -22,14 +22,23 @@ const ContentServiceClient = v1.ContentServiceClient; type ContentServiceClient = v1.ContentServiceClient; const DataplexServiceClient = v1.DataplexServiceClient; type DataplexServiceClient = v1.DataplexServiceClient; +const DataScanServiceClient = v1.DataScanServiceClient; +type DataScanServiceClient = v1.DataScanServiceClient; const MetadataServiceClient = v1.MetadataServiceClient; type MetadataServiceClient = v1.MetadataServiceClient; -export {v1, ContentServiceClient, DataplexServiceClient, MetadataServiceClient}; +export { + v1, + ContentServiceClient, + DataplexServiceClient, + DataScanServiceClient, + MetadataServiceClient, +}; export default { v1, ContentServiceClient, DataplexServiceClient, + DataScanServiceClient, MetadataServiceClient, }; import * as protos from '../protos/protos'; diff --git a/packages/google-cloud-dataplex/src/v1/content_service_client.ts b/packages/google-cloud-dataplex/src/v1/content_service_client.ts index 4cb43a4d8e2..b4a01478fb5 100644 --- a/packages/google-cloud-dataplex/src/v1/content_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/content_service_client.ts @@ -193,6 +193,12 @@ export class ContentServiceClient { contentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' ), + dataScanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}' + ), + dataScanJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' + ), entityPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' ), @@ -276,6 +282,18 @@ export class ContentServiceClient { { get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', + }, ], }, { @@ -299,6 +317,22 @@ export class ContentServiceClient { post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -322,6 +356,22 @@ export class ContentServiceClient { post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', + body: '*', + }, ], }, { @@ -1774,6 +1824,126 @@ export class ContentServiceClient { return this.pathTemplates.contentPathTemplate.match(contentName).content; } + /** + * Return a fully-qualified dataScan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @returns {string} Resource name string. + */ + dataScanPath(project: string, location: string, dataScan: string) { + return this.pathTemplates.dataScanPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + }); + } + + /** + * Parse the project from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; + } + + /** + * Parse the location from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; + } + + /** + * Parse the dataScan from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; + } + + /** + * Return a fully-qualified dataScanJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @param {string} job + * @returns {string} Resource name string. + */ + dataScanJobPath( + project: string, + location: string, + dataScan: string, + job: string + ) { + return this.pathTemplates.dataScanJobPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + job: job, + }); + } + + /** + * Parse the project from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .project; + } + + /** + * Parse the location from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .location; + } + + /** + * Parse the dataScan from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .dataScan; + } + + /** + * Parse the job from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the job. + */ + matchJobFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .job; + } + /** * Return a fully-qualified entity resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json index 37d1b351085..0aa66af2f6c 100644 --- a/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/content_service_proto_list.json @@ -1,8 +1,12 @@ [ "../../protos/google/cloud/dataplex/v1/analyze.proto", "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_profile.proto", + "../../protos/google/cloud/dataplex/v1/data_quality.proto", + "../../protos/google/cloud/dataplex/v1/datascans.proto", "../../protos/google/cloud/dataplex/v1/logs.proto", "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/processing.proto", "../../protos/google/cloud/dataplex/v1/resources.proto", "../../protos/google/cloud/dataplex/v1/service.proto", "../../protos/google/cloud/dataplex/v1/tasks.proto" diff --git a/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts b/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts new file mode 100644 index 00000000000..75ea7f84187 --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts @@ -0,0 +1,3200 @@ +// Copyright 2022 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. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/data_scan_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './data_scan_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * @class + * @memberof v1 + */ +export class DataScanServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + dataScanServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataScanServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataScanServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DataScanServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else if (opts.fallback === 'rest') { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + assetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}' + ), + contentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' + ), + dataScanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}' + ), + dataScanJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' + ), + entityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' + ), + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}' + ), + jobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}' + ), + lakePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + partitionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}' + ), + projectLocationLakeActionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/actions/{action}' + ), + projectLocationLakeZoneActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}' + ), + projectLocationLakeZoneAssetActionPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}' + ), + sessionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}/sessions/{session}' + ), + taskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}' + ), + zonePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listDataScans: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'dataScans' + ), + listDataScanJobs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'dataScanJobs' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1/{name=projects/*}/locations', + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createDataScanResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.DataScan' + ) as gax.protobuf.Type; + const createDataScanMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateDataScanResponse = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.DataScan' + ) as gax.protobuf.Type; + const updateDataScanMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteDataScanResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteDataScanMetadata = protoFilesRoot.lookup( + '.google.cloud.dataplex.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createDataScan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createDataScanResponse.decode.bind(createDataScanResponse), + createDataScanMetadata.decode.bind(createDataScanMetadata) + ), + updateDataScan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataScanResponse.decode.bind(updateDataScanResponse), + updateDataScanMetadata.decode.bind(updateDataScanMetadata) + ), + deleteDataScan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteDataScanResponse.decode.bind(deleteDataScanResponse), + deleteDataScanMetadata.decode.bind(deleteDataScanMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.dataplex.v1.DataScanService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + {'x-goog-api-client': clientHeader.join(' ')} + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dataScanServiceStub) { + return this.dataScanServiceStub; + } + + // Put together the "service stub" for + // google.cloud.dataplex.v1.DataScanService. + this.dataScanServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.dataplex.v1.DataScanService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.dataplex.v1.DataScanService, + this._opts, + this._providedCustomServicePath + ) as Promise<{[method: string]: Function}>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dataScanServiceStubMethods = [ + 'createDataScan', + 'updateDataScan', + 'deleteDataScan', + 'getDataScan', + 'listDataScans', + 'runDataScan', + 'getDataScanJob', + 'listDataScanJobs', + ]; + for (const methodName of dataScanServiceStubMethods) { + const callPromise = this.dataScanServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dataScanServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'dataplex.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'dataplex.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Get dataScan resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataScan: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * @param {google.cloud.dataplex.v1.GetDataScanRequest.DataScanView} [request.view] + * Optional. Used to select the subset of DataScan information to return. + * Defaults to `BASIC`. + * @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. + * The first element of the array is an object representing [DataScan]{@link google.cloud.dataplex.v1.DataScan}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.get_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_GetDataScan_async + */ + getDataScan( + request?: protos.google.cloud.dataplex.v1.IGetDataScanRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest | undefined, + {} | undefined + ] + >; + getDataScan( + request: protos.google.cloud.dataplex.v1.IGetDataScanRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest | null | undefined, + {} | null | undefined + > + ): void; + getDataScan( + request: protos.google.cloud.dataplex.v1.IGetDataScanRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest | null | undefined, + {} | null | undefined + > + ): void; + getDataScan( + request?: protos.google.cloud.dataplex.v1.IGetDataScanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IDataScan, + | protos.google.cloud.dataplex.v1.IGetDataScanRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IGetDataScanRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDataScan(request, options, callback); + } + /** + * Run an on demand execution of a DataScan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DataScan: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * Only on-demand DataScans are allowed. + * @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. + * The first element of the array is an object representing [RunDataScanResponse]{@link google.cloud.dataplex.v1.RunDataScanResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.run_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_RunDataScan_async + */ + runDataScan( + request?: protos.google.cloud.dataplex.v1.IRunDataScanRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest | undefined, + {} | undefined + ] + >; + runDataScan( + request: protos.google.cloud.dataplex.v1.IRunDataScanRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest | null | undefined, + {} | null | undefined + > + ): void; + runDataScan( + request: protos.google.cloud.dataplex.v1.IRunDataScanRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest | null | undefined, + {} | null | undefined + > + ): void; + runDataScan( + request?: protos.google.cloud.dataplex.v1.IRunDataScanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + | protos.google.cloud.dataplex.v1.IRunDataScanRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IRunDataScanResponse, + protos.google.cloud.dataplex.v1.IRunDataScanRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.runDataScan(request, options, callback); + } + /** + * Get DataScanJob resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the DataScanJob: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/dataScanJobs/{data_scan_job_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * @param {google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView} [request.view] + * Optional. Used to select the subset of DataScan information to return. + * Defaults to `BASIC`. + * @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. + * The first element of the array is an object representing [DataScanJob]{@link google.cloud.dataplex.v1.DataScanJob}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.get_data_scan_job.js + * region_tag:dataplex_v1_generated_DataScanService_GetDataScanJob_async + */ + getDataScanJob( + request?: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest | undefined, + {} | undefined + ] + >; + getDataScanJob( + request: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest | null | undefined, + {} | null | undefined + > + ): void; + getDataScanJob( + request: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest | null | undefined, + {} | null | undefined + > + ): void; + getDataScanJob( + request?: protos.google.cloud.dataplex.v1.IGetDataScanJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IDataScanJob, + | protos.google.cloud.dataplex.v1.IGetDataScanJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IDataScanJob, + protos.google.cloud.dataplex.v1.IGetDataScanJobRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDataScanJob(request, options, callback); + } + + /** + * Creates a dataScan resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent location: + * projects/{project}/locations/{location_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * @param {google.cloud.dataplex.v1.DataScan} request.dataScan + * Required. DataScan resource. + * @param {string} request.dataScanId + * Required. DataScan identifier. + * * Must contain only lowercase letters, numbers and hyphens. + * * Must start with a letter. + * * Must end with a number or a letter. + * * Must be between 1-63 characters. + * * Must be unique within the customer project / location. + * @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. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.create_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_CreateDataScan_async + */ + createDataScan( + request?: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createDataScan( + request: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createDataScan( + request: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createDataScan( + request?: protos.google.cloud.dataplex.v1.ICreateDataScanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + 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(); + return this.innerApiCalls.createDataScan(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createDataScan()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.create_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_CreateDataScan_async + */ + async checkCreateDataScanProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.DataScan, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createDataScan, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.DataScan, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Update the dataScan resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dataplex.v1.DataScan} request.dataScan + * Required. Update description. + * Only fields specified in `update_mask` are updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @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. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.update_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_UpdateDataScan_async + */ + updateDataScan( + request?: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateDataScan( + request: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDataScan( + request: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, + callback: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDataScan( + request?: protos.google.cloud.dataplex.v1.IUpdateDataScanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'data_scan.name': request.dataScan!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataScan(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateDataScan()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.update_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_UpdateDataScan_async + */ + async checkUpdateDataScanProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.dataplex.v1.DataScan, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.updateDataScan, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.dataplex.v1.DataScan, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Delete the dataScan resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the dataScan: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * @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. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.delete_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_DeleteDataScan_async + */ + deleteDataScan( + request?: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteDataScan( + request: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteDataScan( + request: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteDataScan( + request?: protos.google.cloud.dataplex.v1.IDeleteDataScanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteDataScan(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteDataScan()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.delete_data_scan.js + * region_tag:dataplex_v1_generated_DataScanService_DeleteDataScan_async + */ + async checkDeleteDataScanProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteDataScan, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.dataplex.v1.OperationMetadata + >; + } + /** + * Lists dataScans. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. projects/{project}/locations/{location_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 10 scans will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields (name or create_time) for the result. + * If not specified, the ordering is undefined. + * @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. + * The first element of the array is Array of [DataScan]{@link google.cloud.dataplex.v1.DataScan}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDataScansAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDataScans( + request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IDataScan[], + protos.google.cloud.dataplex.v1.IListDataScansRequest | null, + protos.google.cloud.dataplex.v1.IListDataScansResponse + ] + >; + listDataScans( + request: protos.google.cloud.dataplex.v1.IListDataScansRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScansRequest, + protos.google.cloud.dataplex.v1.IListDataScansResponse | null | undefined, + protos.google.cloud.dataplex.v1.IDataScan + > + ): void; + listDataScans( + request: protos.google.cloud.dataplex.v1.IListDataScansRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScansRequest, + protos.google.cloud.dataplex.v1.IListDataScansResponse | null | undefined, + protos.google.cloud.dataplex.v1.IDataScan + > + ): void; + listDataScans( + request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScansRequest, + | protos.google.cloud.dataplex.v1.IListDataScansResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IDataScan + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScansRequest, + protos.google.cloud.dataplex.v1.IListDataScansResponse | null | undefined, + protos.google.cloud.dataplex.v1.IDataScan + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IDataScan[], + protos.google.cloud.dataplex.v1.IListDataScansRequest | null, + protos.google.cloud.dataplex.v1.IListDataScansResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + 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(); + return this.innerApiCalls.listDataScans(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. projects/{project}/locations/{location_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 10 scans will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields (name or create_time) for the result. + * If not specified, the ordering is undefined. + * @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 an object representing [DataScan]{@link google.cloud.dataplex.v1.DataScan} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDataScansAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDataScansStream( + request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, + options?: CallOptions + ): Transform { + 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 ?? '', + }); + const defaultCallSettings = this._defaults['listDataScans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataScans.createStream( + this.innerApiCalls.listDataScans as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDataScans`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. projects/{project}/locations/{location_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of dataScans to return. The service may return + * fewer than this value. If unspecified, at most 10 scans will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScans` call. Provide + * this to retrieve the subsequent page. When paginating, all other parameters + * provided to `ListDataScans` must match the call that provided the + * page token. + * @param {string} [request.filter] + * Optional. Filter request. + * @param {string} [request.orderBy] + * Optional. Order by fields (name or create_time) for the result. + * If not specified, the ordering is undefined. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [DataScan]{@link google.cloud.dataplex.v1.DataScan}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.list_data_scans.js + * region_tag:dataplex_v1_generated_DataScanService_ListDataScans_async + */ + listDataScansAsync( + request?: protos.google.cloud.dataplex.v1.IListDataScansRequest, + options?: CallOptions + ): AsyncIterable { + 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 ?? '', + }); + const defaultCallSettings = this._defaults['listDataScans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataScans.asyncIterate( + this.innerApiCalls['listDataScans'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataScanJobs under the given dataScan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent environment: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` must match the call that provided + * the page token. + * @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. + * The first element of the array is Array of [DataScanJob]{@link google.cloud.dataplex.v1.DataScanJob}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDataScanJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDataScanJobs( + request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IDataScanJob[], + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest | null, + protos.google.cloud.dataplex.v1.IListDataScanJobsResponse + ] + >; + listDataScanJobs( + request: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + | protos.google.cloud.dataplex.v1.IListDataScanJobsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IDataScanJob + > + ): void; + listDataScanJobs( + request: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + callback: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + | protos.google.cloud.dataplex.v1.IListDataScanJobsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IDataScanJob + > + ): void; + listDataScanJobs( + request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + | protos.google.cloud.dataplex.v1.IListDataScanJobsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IDataScanJob + >, + callback?: PaginationCallback< + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + | protos.google.cloud.dataplex.v1.IListDataScanJobsResponse + | null + | undefined, + protos.google.cloud.dataplex.v1.IDataScanJob + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IDataScanJob[], + protos.google.cloud.dataplex.v1.IListDataScanJobsRequest | null, + protos.google.cloud.dataplex.v1.IListDataScanJobsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + 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(); + return this.innerApiCalls.listDataScanJobs(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent environment: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` must match the call that provided + * the page token. + * @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 an object representing [DataScanJob]{@link google.cloud.dataplex.v1.DataScanJob} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDataScanJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDataScanJobsStream( + request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + options?: CallOptions + ): Transform { + 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 ?? '', + }); + const defaultCallSettings = this._defaults['listDataScanJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataScanJobs.createStream( + this.innerApiCalls.listDataScanJobs as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDataScanJobs`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent environment: + * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} + * where `{project}` refers to a project_id or project_number and + * `location_id` refers to a GCP region. + * @param {number} [request.pageSize] + * Optional. Maximum number of DataScanJobs to return. The service may return + * fewer than this value. If unspecified, at most 10 DataScanJobs will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @param {string} [request.pageToken] + * Optional. Page token received from a previous `ListDataScanJobs` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `ListDataScanJobs` must match the call that provided + * the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [DataScanJob]{@link google.cloud.dataplex.v1.DataScanJob}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/data_scan_service.list_data_scan_jobs.js + * region_tag:dataplex_v1_generated_DataScanService_ListDataScanJobs_async + */ + listDataScanJobsAsync( + request?: protos.google.cloud.dataplex.v1.IListDataScanJobsRequest, + options?: CallOptions + ): AsyncIterable { + 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 ?? '', + }); + const defaultCallSettings = this._defaults['listDataScanJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataScanJobs.asyncIterate( + this.innerApiCalls['listDataScanJobs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @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. + * The first element of the array is an object representing [Location]{@link google.cloud.location.Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Location]{@link google.cloud.location.Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified asset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @returns {string} Resource name string. + */ + assetPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string + ) { + return this.pathTemplates.assetPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + }); + } + + /** + * Parse the project from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).project; + } + + /** + * Parse the location from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).location; + } + + /** + * Parse the lake from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).lake; + } + + /** + * Parse the zone from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).zone; + } + + /** + * Parse the asset from Asset resource. + * + * @param {string} assetName + * A fully-qualified path representing Asset resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromAssetName(assetName: string) { + return this.pathTemplates.assetPathTemplate.match(assetName).asset; + } + + /** + * Return a fully-qualified content resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} content + * @returns {string} Resource name string. + */ + contentPath( + project: string, + location: string, + lake: string, + content: string + ) { + return this.pathTemplates.contentPathTemplate.render({ + project: project, + location: location, + lake: lake, + content: content, + }); + } + + /** + * Parse the project from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).project; + } + + /** + * Parse the location from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).location; + } + + /** + * Parse the lake from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).lake; + } + + /** + * Parse the content from Content resource. + * + * @param {string} contentName + * A fully-qualified path representing Content resource. + * @returns {string} A string representing the content. + */ + matchContentFromContentName(contentName: string) { + return this.pathTemplates.contentPathTemplate.match(contentName).content; + } + + /** + * Return a fully-qualified dataScan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @returns {string} Resource name string. + */ + dataScanPath(project: string, location: string, dataScan: string) { + return this.pathTemplates.dataScanPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + }); + } + + /** + * Parse the project from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; + } + + /** + * Parse the location from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; + } + + /** + * Parse the dataScan from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; + } + + /** + * Return a fully-qualified dataScanJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @param {string} job + * @returns {string} Resource name string. + */ + dataScanJobPath( + project: string, + location: string, + dataScan: string, + job: string + ) { + return this.pathTemplates.dataScanJobPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + job: job, + }); + } + + /** + * Parse the project from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .project; + } + + /** + * Parse the location from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .location; + } + + /** + * Parse the dataScan from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .dataScan; + } + + /** + * Parse the job from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the job. + */ + matchJobFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .job; + } + + /** + * Return a fully-qualified entity resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @returns {string} Resource name string. + */ + entityPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string + ) { + return this.pathTemplates.entityPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + }); + } + + /** + * Parse the project from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).project; + } + + /** + * Parse the location from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).location; + } + + /** + * Parse the lake from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).lake; + } + + /** + * Parse the zone from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).zone; + } + + /** + * Parse the entity from Entity resource. + * + * @param {string} entityName + * A fully-qualified path representing Entity resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromEntityName(entityName: string) { + return this.pathTemplates.entityPathTemplate.match(entityName).entity; + } + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath( + project: string, + location: string, + lake: string, + environment: string + ) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .location; + } + + /** + * Parse the lake from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .lake; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName) + .environment; + } + + /** + * Return a fully-qualified job resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @param {string} job + * @returns {string} Resource name string. + */ + jobPath( + project: string, + location: string, + lake: string, + task: string, + job: string + ) { + return this.pathTemplates.jobPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + job: job, + }); + } + + /** + * Parse the project from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).project; + } + + /** + * Parse the location from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).location; + } + + /** + * Parse the lake from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).lake; + } + + /** + * Parse the task from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the task. + */ + matchTaskFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).task; + } + + /** + * Parse the job from Job resource. + * + * @param {string} jobName + * A fully-qualified path representing Job resource. + * @returns {string} A string representing the job. + */ + matchJobFromJobName(jobName: string) { + return this.pathTemplates.jobPathTemplate.match(jobName).job; + } + + /** + * Return a fully-qualified lake resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @returns {string} Resource name string. + */ + lakePath(project: string, location: string, lake: string) { + return this.pathTemplates.lakePathTemplate.render({ + project: project, + location: location, + lake: lake, + }); + } + + /** + * Parse the project from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).project; + } + + /** + * Parse the location from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).location; + } + + /** + * Parse the lake from Lake resource. + * + * @param {string} lakeName + * A fully-qualified path representing Lake resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromLakeName(lakeName: string) { + return this.pathTemplates.lakePathTemplate.match(lakeName).lake; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified partition resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} entity + * @param {string} partition + * @returns {string} Resource name string. + */ + partitionPath( + project: string, + location: string, + lake: string, + zone: string, + entity: string, + partition: string + ) { + return this.pathTemplates.partitionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + entity: entity, + partition: partition, + }); + } + + /** + * Parse the project from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .project; + } + + /** + * Parse the location from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .location; + } + + /** + * Parse the lake from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).lake; + } + + /** + * Parse the zone from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).zone; + } + + /** + * Parse the entity from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the entity. + */ + matchEntityFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName).entity; + } + + /** + * Parse the partition from Partition resource. + * + * @param {string} partitionName + * A fully-qualified path representing Partition resource. + * @returns {string} A string representing the partition. + */ + matchPartitionFromPartitionName(partitionName: string) { + return this.pathTemplates.partitionPathTemplate.match(partitionName) + .partition; + } + + /** + * Return a fully-qualified projectLocationLakeAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeActionPath( + project: string, + location: string, + lake: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).lake; + } + + /** + * Parse the action from ProjectLocationLakeAction resource. + * + * @param {string} projectLocationLakeActionName + * A fully-qualified path representing project_location_lake_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeActionName( + projectLocationLakeActionName: string + ) { + return this.pathTemplates.projectLocationLakeActionPathTemplate.match( + projectLocationLakeActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneActionPath( + project: string, + location: string, + lake: string, + zone: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + action: action, + }); + } + + /** + * Parse the project from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).zone; + } + + /** + * Parse the action from ProjectLocationLakeZoneAction resource. + * + * @param {string} projectLocationLakeZoneActionName + * A fully-qualified path representing project_location_lake_zone_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneActionName( + projectLocationLakeZoneActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneActionPathTemplate.match( + projectLocationLakeZoneActionName + ).action; + } + + /** + * Return a fully-qualified projectLocationLakeZoneAssetAction resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @param {string} asset + * @param {string} action + * @returns {string} Resource name string. + */ + projectLocationLakeZoneAssetActionPath( + project: string, + location: string, + lake: string, + zone: string, + asset: string, + action: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render( + { + project: project, + location: location, + lake: lake, + zone: zone, + asset: asset, + action: action, + } + ); + } + + /** + * Parse the project from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).project; + } + + /** + * Parse the location from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).location; + } + + /** + * Parse the lake from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).lake; + } + + /** + * Parse the zone from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).zone; + } + + /** + * Parse the asset from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the asset. + */ + matchAssetFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).asset; + } + + /** + * Parse the action from ProjectLocationLakeZoneAssetAction resource. + * + * @param {string} projectLocationLakeZoneAssetActionName + * A fully-qualified path representing project_location_lake_zone_asset_action resource. + * @returns {string} A string representing the action. + */ + matchActionFromProjectLocationLakeZoneAssetActionName( + projectLocationLakeZoneAssetActionName: string + ) { + return this.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match( + projectLocationLakeZoneAssetActionName + ).action; + } + + /** + * Return a fully-qualified session resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} environment + * @param {string} session + * @returns {string} Resource name string. + */ + sessionPath( + project: string, + location: string, + lake: string, + environment: string, + session: string + ) { + return this.pathTemplates.sessionPathTemplate.render({ + project: project, + location: location, + lake: lake, + environment: environment, + session: session, + }); + } + + /** + * Parse the project from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).project; + } + + /** + * Parse the location from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).location; + } + + /** + * Parse the lake from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).lake; + } + + /** + * Parse the environment from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName) + .environment; + } + + /** + * Parse the session from Session resource. + * + * @param {string} sessionName + * A fully-qualified path representing Session resource. + * @returns {string} A string representing the session. + */ + matchSessionFromSessionName(sessionName: string) { + return this.pathTemplates.sessionPathTemplate.match(sessionName).session; + } + + /** + * Return a fully-qualified task resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} task + * @returns {string} Resource name string. + */ + taskPath(project: string, location: string, lake: string, task: string) { + return this.pathTemplates.taskPathTemplate.render({ + project: project, + location: location, + lake: lake, + task: task, + }); + } + + /** + * Parse the project from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).project; + } + + /** + * Parse the location from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).location; + } + + /** + * Parse the lake from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).lake; + } + + /** + * Parse the task from Task resource. + * + * @param {string} taskName + * A fully-qualified path representing Task resource. + * @returns {string} A string representing the task. + */ + matchTaskFromTaskName(taskName: string) { + return this.pathTemplates.taskPathTemplate.match(taskName).task; + } + + /** + * Return a fully-qualified zone resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} lake + * @param {string} zone + * @returns {string} Resource name string. + */ + zonePath(project: string, location: string, lake: string, zone: string) { + return this.pathTemplates.zonePathTemplate.render({ + project: project, + location: location, + lake: lake, + zone: zone, + }); + } + + /** + * Parse the project from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the project. + */ + matchProjectFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).project; + } + + /** + * Parse the location from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the location. + */ + matchLocationFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).location; + } + + /** + * Parse the lake from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the lake. + */ + matchLakeFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).lake; + } + + /** + * Parse the zone from Zone resource. + * + * @param {string} zoneName + * A fully-qualified path representing Zone resource. + * @returns {string} A string representing the zone. + */ + matchZoneFromZoneName(zoneName: string) { + return this.pathTemplates.zonePathTemplate.match(zoneName).zone; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dataScanServiceStub && !this._terminated) { + return this.dataScanServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-dataplex/src/v1/data_scan_service_client_config.json b/packages/google-cloud-dataplex/src/v1/data_scan_service_client_config.json new file mode 100644 index 00000000000..fccf7f3678a --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/data_scan_service_client_config.json @@ -0,0 +1,58 @@ +{ + "interfaces": { + "google.cloud.dataplex.v1.DataScanService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateDataScan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDataScan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteDataScan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDataScan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataScans": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RunDataScan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDataScanJob": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataScanJobs": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-dataplex/src/v1/data_scan_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/data_scan_service_proto_list.json new file mode 100644 index 00000000000..0aa66af2f6c --- /dev/null +++ b/packages/google-cloud-dataplex/src/v1/data_scan_service_proto_list.json @@ -0,0 +1,13 @@ +[ + "../../protos/google/cloud/dataplex/v1/analyze.proto", + "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_profile.proto", + "../../protos/google/cloud/dataplex/v1/data_quality.proto", + "../../protos/google/cloud/dataplex/v1/datascans.proto", + "../../protos/google/cloud/dataplex/v1/logs.proto", + "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/processing.proto", + "../../protos/google/cloud/dataplex/v1/resources.proto", + "../../protos/google/cloud/dataplex/v1/service.proto", + "../../protos/google/cloud/dataplex/v1/tasks.proto" +] diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts index 37e51088460..8c8ac28c91a 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -198,6 +198,12 @@ export class DataplexServiceClient { contentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' ), + dataScanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}' + ), + dataScanJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' + ), entityPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' ), @@ -329,6 +335,18 @@ export class DataplexServiceClient { { get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', + }, ], }, { @@ -352,6 +370,22 @@ export class DataplexServiceClient { post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -375,6 +409,22 @@ export class DataplexServiceClient { post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', + body: '*', + }, ], }, { @@ -6008,6 +6058,126 @@ export class DataplexServiceClient { return this.pathTemplates.contentPathTemplate.match(contentName).content; } + /** + * Return a fully-qualified dataScan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @returns {string} Resource name string. + */ + dataScanPath(project: string, location: string, dataScan: string) { + return this.pathTemplates.dataScanPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + }); + } + + /** + * Parse the project from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; + } + + /** + * Parse the location from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; + } + + /** + * Parse the dataScan from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; + } + + /** + * Return a fully-qualified dataScanJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @param {string} job + * @returns {string} Resource name string. + */ + dataScanJobPath( + project: string, + location: string, + dataScan: string, + job: string + ) { + return this.pathTemplates.dataScanJobPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + job: job, + }); + } + + /** + * Parse the project from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .project; + } + + /** + * Parse the location from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .location; + } + + /** + * Parse the dataScan from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .dataScan; + } + + /** + * Parse the job from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the job. + */ + matchJobFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .job; + } + /** * Return a fully-qualified entity resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json index 37d1b351085..0aa66af2f6c 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_proto_list.json @@ -1,8 +1,12 @@ [ "../../protos/google/cloud/dataplex/v1/analyze.proto", "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_profile.proto", + "../../protos/google/cloud/dataplex/v1/data_quality.proto", + "../../protos/google/cloud/dataplex/v1/datascans.proto", "../../protos/google/cloud/dataplex/v1/logs.proto", "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/processing.proto", "../../protos/google/cloud/dataplex/v1/resources.proto", "../../protos/google/cloud/dataplex/v1/service.proto", "../../protos/google/cloud/dataplex/v1/tasks.proto" diff --git a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json index 85d7970d52b..9b67ace2916 100644 --- a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json +++ b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json @@ -477,6 +477,108 @@ } } }, + "DataScanService": { + "clients": { + "grpc": { + "libraryClient": "DataScanServiceClient", + "rpcs": { + "GetDataScan": { + "methods": [ + "getDataScan" + ] + }, + "RunDataScan": { + "methods": [ + "runDataScan" + ] + }, + "GetDataScanJob": { + "methods": [ + "getDataScanJob" + ] + }, + "CreateDataScan": { + "methods": [ + "createDataScan" + ] + }, + "UpdateDataScan": { + "methods": [ + "updateDataScan" + ] + }, + "DeleteDataScan": { + "methods": [ + "deleteDataScan" + ] + }, + "ListDataScans": { + "methods": [ + "listDataScans", + "listDataScansStream", + "listDataScansAsync" + ] + }, + "ListDataScanJobs": { + "methods": [ + "listDataScanJobs", + "listDataScanJobsStream", + "listDataScanJobsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataScanServiceClient", + "rpcs": { + "GetDataScan": { + "methods": [ + "getDataScan" + ] + }, + "RunDataScan": { + "methods": [ + "runDataScan" + ] + }, + "GetDataScanJob": { + "methods": [ + "getDataScanJob" + ] + }, + "CreateDataScan": { + "methods": [ + "createDataScan" + ] + }, + "UpdateDataScan": { + "methods": [ + "updateDataScan" + ] + }, + "DeleteDataScan": { + "methods": [ + "deleteDataScan" + ] + }, + "ListDataScans": { + "methods": [ + "listDataScans", + "listDataScansStream", + "listDataScansAsync" + ] + }, + "ListDataScanJobs": { + "methods": [ + "listDataScanJobs", + "listDataScanJobsStream", + "listDataScanJobsAsync" + ] + } + } + } + } + }, "MetadataService": { "clients": { "grpc": { diff --git a/packages/google-cloud-dataplex/src/v1/index.ts b/packages/google-cloud-dataplex/src/v1/index.ts index 3806c719115..cebf72adb2f 100644 --- a/packages/google-cloud-dataplex/src/v1/index.ts +++ b/packages/google-cloud-dataplex/src/v1/index.ts @@ -18,4 +18,5 @@ export {ContentServiceClient} from './content_service_client'; export {DataplexServiceClient} from './dataplex_service_client'; +export {DataScanServiceClient} from './data_scan_service_client'; export {MetadataServiceClient} from './metadata_service_client'; diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts index cc5b444fb80..5991b13b1a8 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_client.ts @@ -194,6 +194,12 @@ export class MetadataServiceClient { contentPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}' ), + dataScanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}' + ), + dataScanJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}' + ), entityPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}' ), @@ -282,6 +288,18 @@ export class MetadataServiceClient { { get: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', + }, ], }, { @@ -305,6 +323,22 @@ export class MetadataServiceClient { post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -328,6 +362,22 @@ export class MetadataServiceClient { post: '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', + body: '*', + }, ], }, { @@ -2051,6 +2101,126 @@ export class MetadataServiceClient { return this.pathTemplates.contentPathTemplate.match(contentName).content; } + /** + * Return a fully-qualified dataScan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @returns {string} Resource name string. + */ + dataScanPath(project: string, location: string, dataScan: string) { + return this.pathTemplates.dataScanPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + }); + } + + /** + * Parse the project from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).project; + } + + /** + * Parse the location from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).location; + } + + /** + * Parse the dataScan from DataScan resource. + * + * @param {string} dataScanName + * A fully-qualified path representing DataScan resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanName(dataScanName: string) { + return this.pathTemplates.dataScanPathTemplate.match(dataScanName).dataScan; + } + + /** + * Return a fully-qualified dataScanJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataScan + * @param {string} job + * @returns {string} Resource name string. + */ + dataScanJobPath( + project: string, + location: string, + dataScan: string, + job: string + ) { + return this.pathTemplates.dataScanJobPathTemplate.render({ + project: project, + location: location, + dataScan: dataScan, + job: job, + }); + } + + /** + * Parse the project from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .project; + } + + /** + * Parse the location from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .location; + } + + /** + * Parse the dataScan from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the dataScan. + */ + matchDataScanFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .dataScan; + } + + /** + * Parse the job from DataScanJob resource. + * + * @param {string} dataScanJobName + * A fully-qualified path representing DataScanJob resource. + * @returns {string} A string representing the job. + */ + matchJobFromDataScanJobName(dataScanJobName: string) { + return this.pathTemplates.dataScanJobPathTemplate.match(dataScanJobName) + .job; + } + /** * Return a fully-qualified entity resource name string. * diff --git a/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json b/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json index 37d1b351085..0aa66af2f6c 100644 --- a/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json +++ b/packages/google-cloud-dataplex/src/v1/metadata_service_proto_list.json @@ -1,8 +1,12 @@ [ "../../protos/google/cloud/dataplex/v1/analyze.proto", "../../protos/google/cloud/dataplex/v1/content.proto", + "../../protos/google/cloud/dataplex/v1/data_profile.proto", + "../../protos/google/cloud/dataplex/v1/data_quality.proto", + "../../protos/google/cloud/dataplex/v1/datascans.proto", "../../protos/google/cloud/dataplex/v1/logs.proto", "../../protos/google/cloud/dataplex/v1/metadata.proto", + "../../protos/google/cloud/dataplex/v1/processing.proto", "../../protos/google/cloud/dataplex/v1/resources.proto", "../../protos/google/cloud/dataplex/v1/service.proto", "../../protos/google/cloud/dataplex/v1/tasks.proto" diff --git a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js index a52c6d6d867..82bc27d30f1 100644 --- a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.js @@ -22,6 +22,7 @@ const dataplex = require('@google-cloud/dataplex'); function main() { const contentServiceClient = new dataplex.ContentServiceClient(); const dataplexServiceClient = new dataplex.DataplexServiceClient(); + const dataScanServiceClient = new dataplex.DataScanServiceClient(); const metadataServiceClient = new dataplex.MetadataServiceClient(); } diff --git a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts index c2dc9e474ac..66dc35d2b06 100644 --- a/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-dataplex/system-test/fixtures/sample/src/index.ts @@ -19,6 +19,7 @@ import { ContentServiceClient, DataplexServiceClient, + DataScanServiceClient, MetadataServiceClient, } from '@google-cloud/dataplex'; @@ -29,6 +30,9 @@ function doStuffWithContentServiceClient(client: ContentServiceClient) { function doStuffWithDataplexServiceClient(client: DataplexServiceClient) { client.close(); } +function doStuffWithDataScanServiceClient(client: DataScanServiceClient) { + client.close(); +} function doStuffWithMetadataServiceClient(client: MetadataServiceClient) { client.close(); } @@ -41,6 +45,9 @@ function main() { const dataplexServiceClient = new DataplexServiceClient(); doStuffWithDataplexServiceClient(dataplexServiceClient); // check that the client instance can be created + const dataScanServiceClient = new DataScanServiceClient(); + doStuffWithDataScanServiceClient(dataScanServiceClient); + // check that the client instance can be created const metadataServiceClient = new MetadataServiceClient(); doStuffWithMetadataServiceClient(metadataServiceClient); } diff --git a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts index 0d2c6ad2576..b51bbaee271 100644 --- a/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_content_service_v1.ts @@ -2115,6 +2115,146 @@ describe('v1.ContentServiceClient', () => { }); }); + describe('dataScan', () => { + const fakePath = '/rendered/path/dataScan'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataScan: 'dataScanValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataScanPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataScanPath', () => { + const result = client.dataScanPath( + 'projectValue', + 'locationValue', + 'dataScanValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataScanPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataScanName', () => { + const result = client.matchProjectFromDataScanName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataScanName', () => { + const result = client.matchLocationFromDataScanName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataScanFromDataScanName', () => { + const result = client.matchDataScanFromDataScanName(fakePath); + assert.strictEqual(result, 'dataScanValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataScanJob', () => { + const fakePath = '/rendered/path/dataScanJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataScan: 'dataScanValue', + job: 'jobValue', + }; + const client = new contentserviceModule.v1.ContentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataScanJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataScanJobPath', () => { + const result = client.dataScanJobPath( + 'projectValue', + 'locationValue', + 'dataScanValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataScanJobName', () => { + const result = client.matchProjectFromDataScanJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataScanJobName', () => { + const result = client.matchLocationFromDataScanJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataScanFromDataScanJobName', () => { + const result = client.matchDataScanFromDataScanJobName(fakePath); + assert.strictEqual(result, 'dataScanValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromDataScanJobName', () => { + const result = client.matchJobFromDataScanJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('entity', () => { const fakePath = '/rendered/path/entity'; const expectedParameters = { diff --git a/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts new file mode 100644 index 00000000000..25ba896a68e --- /dev/null +++ b/packages/google-cloud-dataplex/test/gapic_data_scan_service_v1.ts @@ -0,0 +1,3717 @@ +// Copyright 2022 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. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import {SinonStub} from 'sinon'; +import {describe, it} from 'mocha'; +import * as datascanserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.DataScanServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + datascanserviceModule.v1.DataScanServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + datascanserviceModule.v1.DataScanServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = datascanserviceModule.v1.DataScanServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new datascanserviceModule.v1.DataScanServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataScanServiceStub, undefined); + await client.initialize(); + assert(client.dataScanServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.dataScanServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataScanServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('getDataScan', () => { + it('invokes getDataScan without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScan() + ); + client.innerApiCalls.getDataScan = stubSimpleCall(expectedResponse); + const [response] = await client.getDataScan(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScan without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScan() + ); + client.innerApiCalls.getDataScan = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataScan( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IDataScan | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScan with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataScan = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getDataScan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScan with closed client', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataScan(request), expectedError); + }); + }); + + describe('runDataScan', () => { + it('invokes runDataScan without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.RunDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanResponse() + ); + client.innerApiCalls.runDataScan = stubSimpleCall(expectedResponse); + const [response] = await client.runDataScan(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.runDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runDataScan without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.RunDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanResponse() + ); + client.innerApiCalls.runDataScan = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runDataScan( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IRunDataScanResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.runDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runDataScan with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.RunDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.runDataScan = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.runDataScan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.runDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runDataScan with closed client', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.RunDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.runDataScan(request), expectedError); + }); + }); + + describe('getDataScanJob', () => { + it('invokes getDataScanJob without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetDataScanJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ); + client.innerApiCalls.getDataScanJob = stubSimpleCall(expectedResponse); + const [response] = await client.getDataScanJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataScanJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataScanJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScanJob without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetDataScanJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ); + client.innerApiCalls.getDataScanJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataScanJob( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IDataScanJob | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataScanJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataScanJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScanJob with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetDataScanJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataScanJob = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getDataScanJob(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getDataScanJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataScanJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataScanJob with closed client', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.GetDataScanJobRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.GetDataScanJobRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataScanJob(request), expectedError); + }); + }); + + describe('createDataScan', () => { + it('invokes createDataScan without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateDataScanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataScan = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createDataScan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataScan without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateDataScanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createDataScan = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataScan( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataScan with call error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateDataScanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataScan = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createDataScan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataScan with LRO error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.CreateDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.CreateDataScanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataScan = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createDataScan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateDataScanProgress without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateDataScanProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateDataScanProgress with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateDataScanProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateDataScan', () => { + it('invokes updateDataScan without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() + ); + request.dataScan ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateDataScanRequest', + ['dataScan', 'name'] + ); + request.dataScan.name = defaultValue1; + const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataScan = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataScan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataScan without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() + ); + request.dataScan ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateDataScanRequest', + ['dataScan', 'name'] + ); + request.dataScan.name = defaultValue1; + const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataScan = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataScan( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.dataplex.v1.IDataScan, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataScan with call error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() + ); + request.dataScan ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateDataScanRequest', + ['dataScan', 'name'] + ); + request.dataScan.name = defaultValue1; + const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataScan = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateDataScan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataScan with LRO error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.UpdateDataScanRequest() + ); + request.dataScan ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.UpdateDataScanRequest', + ['dataScan', 'name'] + ); + request.dataScan.name = defaultValue1; + const expectedHeaderRequestParams = `data_scan.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataScan = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateDataScan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataScanProgress without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateDataScanProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataScanProgress with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateDataScanProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteDataScan', () => { + it('invokes deleteDataScan without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataScan = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteDataScan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataScan without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteDataScan = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataScan( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.dataplex.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataScan with call error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataScan = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteDataScan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataScan with LRO error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.DeleteDataScanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.DeleteDataScanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataScan = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteDataScan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteDataScan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDataScan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteDataScanProgress without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteDataScanProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteDataScanProgress with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteDataScanProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listDataScans', () => { + it('invokes listDataScans without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + ]; + client.innerApiCalls.listDataScans = stubSimpleCall(expectedResponse); + const [response] = await client.listDataScans(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataScans as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataScans as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScans without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + ]; + client.innerApiCalls.listDataScans = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataScans( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IDataScan[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataScans as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataScans as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScans with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataScans = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listDataScans(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listDataScans as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataScans as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScansStream without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + ]; + client.descriptors.page.listDataScans.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDataScansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataScan[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.DataScan) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listDataScans.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataScans, request) + ); + assert( + (client.descriptors.page.listDataScans.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataScansStream with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataScans.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataScansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataScan[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.DataScan) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listDataScans.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataScans, request) + ); + assert( + (client.descriptors.page.listDataScans.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataScans without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + generateSampleMessage(new protos.google.cloud.dataplex.v1.DataScan()), + ]; + client.descriptors.page.listDataScans.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IDataScan[] = []; + const iterable = client.listDataScansAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataScans.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataScans.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataScans with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataScans.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataScansAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IDataScan[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataScans.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataScans.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataScanJobs', () => { + it('invokes listDataScanJobs without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScanJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + ]; + client.innerApiCalls.listDataScanJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listDataScanJobs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataScanJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataScanJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScanJobs without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScanJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + ]; + client.innerApiCalls.listDataScanJobs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataScanJobs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IDataScanJob[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataScanJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataScanJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScanJobs with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScanJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataScanJobs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listDataScanJobs(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listDataScanJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataScanJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataScanJobsStream without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScanJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + ]; + client.descriptors.page.listDataScanJobs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDataScanJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataScanJob[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.DataScanJob) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listDataScanJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataScanJobs, request) + ); + assert( + (client.descriptors.page.listDataScanJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataScanJobsStream with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScanJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataScanJobs.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataScanJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.dataplex.v1.DataScanJob[] = []; + stream.on( + 'data', + (response: protos.google.cloud.dataplex.v1.DataScanJob) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listDataScanJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataScanJobs, request) + ); + assert( + (client.descriptors.page.listDataScanJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataScanJobs without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScanJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + generateSampleMessage( + new protos.google.cloud.dataplex.v1.DataScanJob() + ), + ]; + client.descriptors.page.listDataScanJobs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.dataplex.v1.IDataScanJob[] = []; + const iterable = client.listDataScanJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataScanJobs with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.ListDataScanJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.ListDataScanJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataScanJobs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataScanJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.dataplex.v1.IDataScanJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataScanJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('asset', () => { + const fakePath = '/rendered/path/asset'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.assetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.assetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('assetPath', () => { + const result = client.assetPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.assetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAssetName', () => { + const result = client.matchProjectFromAssetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAssetName', () => { + const result = client.matchLocationFromAssetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromAssetName', () => { + const result = client.matchLakeFromAssetName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromAssetName', () => { + const result = client.matchZoneFromAssetName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromAssetName', () => { + const result = client.matchAssetFromAssetName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + (client.pathTemplates.assetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('content', () => { + const fakePath = '/rendered/path/content'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + content: 'contentValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.contentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('contentPath', () => { + const result = client.contentPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'contentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.contentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromContentName', () => { + const result = client.matchProjectFromContentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromContentName', () => { + const result = client.matchLocationFromContentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromContentName', () => { + const result = client.matchLakeFromContentName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchContentFromContentName', () => { + const result = client.matchContentFromContentName(fakePath); + assert.strictEqual(result, 'contentValue'); + assert( + (client.pathTemplates.contentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataScan', () => { + const fakePath = '/rendered/path/dataScan'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataScan: 'dataScanValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataScanPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataScanPath', () => { + const result = client.dataScanPath( + 'projectValue', + 'locationValue', + 'dataScanValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataScanPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataScanName', () => { + const result = client.matchProjectFromDataScanName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataScanName', () => { + const result = client.matchLocationFromDataScanName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataScanFromDataScanName', () => { + const result = client.matchDataScanFromDataScanName(fakePath); + assert.strictEqual(result, 'dataScanValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataScanJob', () => { + const fakePath = '/rendered/path/dataScanJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataScan: 'dataScanValue', + job: 'jobValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataScanJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataScanJobPath', () => { + const result = client.dataScanJobPath( + 'projectValue', + 'locationValue', + 'dataScanValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataScanJobName', () => { + const result = client.matchProjectFromDataScanJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataScanJobName', () => { + const result = client.matchLocationFromDataScanJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataScanFromDataScanJobName', () => { + const result = client.matchDataScanFromDataScanJobName(fakePath); + assert.strictEqual(result, 'dataScanValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromDataScanJobName', () => { + const result = client.matchJobFromDataScanJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entity', () => { + const fakePath = '/rendered/path/entity'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityPath', () => { + const result = client.entityPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityName', () => { + const result = client.matchProjectFromEntityName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityName', () => { + const result = client.matchLocationFromEntityName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromEntityName', () => { + const result = client.matchLakeFromEntityName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromEntityName', () => { + const result = client.matchZoneFromEntityName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromEntityName', () => { + const result = client.matchEntityFromEntityName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.entityPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('environment', () => { + const fakePath = '/rendered/path/environment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + environment: 'environmentValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'environmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromEnvironmentName', () => { + const result = client.matchLakeFromEnvironmentName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('job', () => { + const fakePath = '/rendered/path/job'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + job: 'jobValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.jobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.jobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('jobPath', () => { + const result = client.jobPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.jobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromJobName', () => { + const result = client.matchProjectFromJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromJobName', () => { + const result = client.matchLocationFromJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromJobName', () => { + const result = client.matchLakeFromJobName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromJobName', () => { + const result = client.matchTaskFromJobName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromJobName', () => { + const result = client.matchJobFromJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.jobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('lake', () => { + const fakePath = '/rendered/path/lake'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.lakePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.lakePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('lakePath', () => { + const result = client.lakePath( + 'projectValue', + 'locationValue', + 'lakeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.lakePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLakeName', () => { + const result = client.matchProjectFromLakeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLakeName', () => { + const result = client.matchLocationFromLakeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromLakeName', () => { + const result = client.matchLakeFromLakeName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.lakePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('partition', () => { + const fakePath = '/rendered/path/partition'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + entity: 'entityValue', + partition: 'partitionValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.partitionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.partitionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('partitionPath', () => { + const result = client.partitionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'entityValue', + 'partitionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.partitionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPartitionName', () => { + const result = client.matchProjectFromPartitionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPartitionName', () => { + const result = client.matchLocationFromPartitionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromPartitionName', () => { + const result = client.matchLakeFromPartitionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromPartitionName', () => { + const result = client.matchZoneFromPartitionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityFromPartitionName', () => { + const result = client.matchEntityFromPartitionName(fakePath); + assert.strictEqual(result, 'entityValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPartitionFromPartitionName', () => { + const result = client.matchPartitionFromPartitionName(fakePath); + assert.strictEqual(result, 'partitionValue'); + assert( + (client.pathTemplates.partitionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeAction', () => { + const fakePath = '/rendered/path/projectLocationLakeAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + action: 'actionValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeActionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationLakeActionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationLakeActionPath', () => { + const result = client.projectLocationLakeActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeActionName', () => { + const result = + client.matchActionFromProjectLocationLakeActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + action: 'actionValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneActionPath', () => { + const result = client.projectLocationLakeZoneActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneActionName(fakePath); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationLakeZoneAssetAction', () => { + const fakePath = '/rendered/path/projectLocationLakeZoneAssetAction'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + asset: 'assetValue', + action: 'actionValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationLakeZoneAssetActionPath', () => { + const result = client.projectLocationLakeZoneAssetActionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue', + 'assetValue', + 'actionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchProjectFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLocationFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchLakeFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchZoneFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAssetFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchAssetFromProjectLocationLakeZoneAssetActionName(fakePath); + assert.strictEqual(result, 'assetValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchActionFromProjectLocationLakeZoneAssetActionName', () => { + const result = + client.matchActionFromProjectLocationLakeZoneAssetActionName( + fakePath + ); + assert.strictEqual(result, 'actionValue'); + assert( + ( + client.pathTemplates.projectLocationLakeZoneAssetActionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('session', () => { + const fakePath = '/rendered/path/session'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + environment: 'environmentValue', + session: 'sessionValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.sessionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.sessionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('sessionPath', () => { + const result = client.sessionPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'environmentValue', + 'sessionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.sessionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSessionName', () => { + const result = client.matchProjectFromSessionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSessionName', () => { + const result = client.matchLocationFromSessionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromSessionName', () => { + const result = client.matchLakeFromSessionName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnvironmentFromSessionName', () => { + const result = client.matchEnvironmentFromSessionName(fakePath); + assert.strictEqual(result, 'environmentValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSessionFromSessionName', () => { + const result = client.matchSessionFromSessionName(fakePath); + assert.strictEqual(result, 'sessionValue'); + assert( + (client.pathTemplates.sessionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('task', () => { + const fakePath = '/rendered/path/task'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + task: 'taskValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.taskPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.taskPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('taskPath', () => { + const result = client.taskPath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'taskValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.taskPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTaskName', () => { + const result = client.matchProjectFromTaskName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTaskName', () => { + const result = client.matchLocationFromTaskName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromTaskName', () => { + const result = client.matchLakeFromTaskName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTaskFromTaskName', () => { + const result = client.matchTaskFromTaskName(fakePath); + assert.strictEqual(result, 'taskValue'); + assert( + (client.pathTemplates.taskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('zone', () => { + const fakePath = '/rendered/path/zone'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + lake: 'lakeValue', + zone: 'zoneValue', + }; + const client = new datascanserviceModule.v1.DataScanServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.zonePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.zonePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('zonePath', () => { + const result = client.zonePath( + 'projectValue', + 'locationValue', + 'lakeValue', + 'zoneValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.zonePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromZoneName', () => { + const result = client.matchProjectFromZoneName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromZoneName', () => { + const result = client.matchLocationFromZoneName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLakeFromZoneName', () => { + const result = client.matchLakeFromZoneName(fakePath); + assert.strictEqual(result, 'lakeValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchZoneFromZoneName', () => { + const result = client.matchZoneFromZoneName(fakePath); + assert.strictEqual(result, 'zoneValue'); + assert( + (client.pathTemplates.zonePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts index ee85b6ded00..957530c125f 100644 --- a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -7712,6 +7712,146 @@ describe('v1.DataplexServiceClient', () => { }); }); + describe('dataScan', () => { + const fakePath = '/rendered/path/dataScan'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataScan: 'dataScanValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataScanPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataScanPath', () => { + const result = client.dataScanPath( + 'projectValue', + 'locationValue', + 'dataScanValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataScanPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataScanName', () => { + const result = client.matchProjectFromDataScanName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataScanName', () => { + const result = client.matchLocationFromDataScanName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataScanFromDataScanName', () => { + const result = client.matchDataScanFromDataScanName(fakePath); + assert.strictEqual(result, 'dataScanValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataScanJob', () => { + const fakePath = '/rendered/path/dataScanJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataScan: 'dataScanValue', + job: 'jobValue', + }; + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataScanJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataScanJobPath', () => { + const result = client.dataScanJobPath( + 'projectValue', + 'locationValue', + 'dataScanValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataScanJobName', () => { + const result = client.matchProjectFromDataScanJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataScanJobName', () => { + const result = client.matchLocationFromDataScanJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataScanFromDataScanJobName', () => { + const result = client.matchDataScanFromDataScanJobName(fakePath); + assert.strictEqual(result, 'dataScanValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromDataScanJobName', () => { + const result = client.matchJobFromDataScanJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('entity', () => { const fakePath = '/rendered/path/entity'; const expectedParameters = { diff --git a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts index 7a63943c87f..bfcec65cb29 100644 --- a/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_metadata_service_v1.ts @@ -2410,6 +2410,146 @@ describe('v1.MetadataServiceClient', () => { }); }); + describe('dataScan', () => { + const fakePath = '/rendered/path/dataScan'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataScan: 'dataScanValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataScanPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataScanPath', () => { + const result = client.dataScanPath( + 'projectValue', + 'locationValue', + 'dataScanValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataScanPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataScanName', () => { + const result = client.matchProjectFromDataScanName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataScanName', () => { + const result = client.matchLocationFromDataScanName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataScanFromDataScanName', () => { + const result = client.matchDataScanFromDataScanName(fakePath); + assert.strictEqual(result, 'dataScanValue'); + assert( + (client.pathTemplates.dataScanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataScanJob', () => { + const fakePath = '/rendered/path/dataScanJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataScan: 'dataScanValue', + job: 'jobValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataScanJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataScanJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataScanJobPath', () => { + const result = client.dataScanJobPath( + 'projectValue', + 'locationValue', + 'dataScanValue', + 'jobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataScanJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataScanJobName', () => { + const result = client.matchProjectFromDataScanJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataScanJobName', () => { + const result = client.matchLocationFromDataScanJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataScanFromDataScanJobName', () => { + const result = client.matchDataScanFromDataScanJobName(fakePath); + assert.strictEqual(result, 'dataScanValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchJobFromDataScanJobName', () => { + const result = client.matchJobFromDataScanJobName(fakePath); + assert.strictEqual(result, 'jobValue'); + assert( + (client.pathTemplates.dataScanJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('entity', () => { const fakePath = '/rendered/path/entity'; const expectedParameters = {