From ca4db6283b23e8f99bdffb0ed4ea76005ee62f9e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:25:07 -0800 Subject: [PATCH] feat: [datastream] A new method `RunStream` is added to service `Datastream` (#5834) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: A new method `RunStream` is added to service `Datastream` feat: A new field `sql_server_rdbms` is added to message `.google.cloud.datastream.v1.DiscoverConnectionProfileRequest` feat: A new field `sql_server_rdbms` is added to message `.google.cloud.datastream.v1.DiscoverConnectionProfileResponse` feat: A new message `RunStreamRequest` is added feat: A new field `oracle_ssl_config` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new field `oracle_asm_config` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new field `secret_manager_stored_password` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new message `OracleAsmConfig` is added feat: A new message `SqlServerProfile` is added feat: A new message `OracleSslConfig` is added feat: A new field `sql_server_profile` is added to message `.google.cloud.datastream.v1.ConnectionProfile` feat: A new message `LogMiner` is added feat: A new message `BinaryLogParser` is added feat: A new field `log_miner` is added to message `.google.cloud.datastream.v1.OracleSourceConfig` feat: A new field `binary_log_parser` is added to message `.google.cloud.datastream.v1.OracleSourceConfig` feat: A new message `SqlServerColumn` is added feat: A new message `SqlServerTable` is added feat: A new message `SqlServerSchema` is added feat: A new message `SqlServerRdbms` is added feat: A new message `SqlServerSourceConfig` is added feat: A new message `SqlServerTransactionLogs` is added feat: A new message `SqlServerChangeTables` is added feat: A new message `BinaryLogPosition` is added feat: A new message `Gtid` is added feat: A new field `binary_log_position` is added to message `.google.cloud.datastream.v1.MysqlSourceConfig` feat: A new field `gtid` is added to message `.google.cloud.datastream.v1.MysqlSourceConfig` feat: A new field `sql_server_source_config` is added to message `.google.cloud.datastream.v1.SourceConfig` feat: A new message `AppendOnly` is added feat: A new message `Merge` is added feat: A new field `merge` is added to message `.google.cloud.datastream.v1.BigQueryDestinationConfig` feat: A new field `append_only` is added to message `.google.cloud.datastream.v1.BigQueryDestinationConfig` feat: A new field `sql_server_excluded_objects` is added to message `.google.cloud.datastream.v1.Stream` feat: A new field `last_recovery_time` is added to message `.google.cloud.datastream.v1.Stream` feat: A new message `SqlServerObjectIdentifier` is added feat: A new field `sql_server_identifier` is added to message `.google.cloud.datastream.v1.SourceObjectIdentifier` feat: A new value `WARNING` is added to enum `State` feat: A new message `CdcStrategy` is added feat: A new message `SqlServerLsnPosition` is added feat: A new message `OracleScnPosition` is added feat: A new message `MysqlLogPosition` is added docs: A comment for field `requested_cancellation` in message `.google.cloud.datastream.v1.OperationMetadata` is changed docs: A comment for message `OracleProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.OracleProfile` is changed docs: A comment for message `MysqlProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.MysqlProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.PostgresqlProfile` is changed docs: A comment for field `stream_large_objects` in message `.google.cloud.datastream.v1.OracleSourceConfig` is changed docs: A comment for field `dataset_id` in message `.google.cloud.datastream.v1.BigQueryDestinationConfig` is changed docs: A comment for field `state` in message `.google.cloud.datastream.v1.BackfillJob` is changed docs: A comment for field `state` in message `.google.cloud.datastream.v1.Validation` is changed PiperOrigin-RevId: 698715682 Source-Link: https://github.com/googleapis/googleapis/commit/798a8beed228908584c64a2a3a5d11d8eeb290d8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c1fe03a818c9c10b2d58ba7f34eb66c3f0a0819a Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0vLk93bEJvdC55YW1sIiwiaCI6ImMxZmUwM2E4MThjOWMxMGIyZDU4YmE3ZjM0ZWI2NmMzZjBhMDgxOWEifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- packages/google-cloud-datastream/README.md | 5 +- .../cloud/datastream/v1/datastream.proto | 45 +- .../datastream/v1/datastream_resources.proto | 343 +- .../protos/protos.d.ts | 6498 ++-- .../google-cloud-datastream/protos/protos.js | 24999 ++++++++++------ .../protos/protos.json | 596 +- .../google-cloud-datastream/samples/README.md | 18 + .../datastream.discover_connection_profile.js | 4 + .../generated/v1/datastream.run_stream.js | 72 + ...t_metadata_google.cloud.datastream.v1.json | 54 +- .../src/v1/datastream_client.ts | 157 + .../src/v1/datastream_client_config.json | 5 + .../src/v1/gapic_metadata.json | 10 + .../test/gapic_datastream_v1.ts | 190 + 14 files changed, 22148 insertions(+), 10848 deletions(-) create mode 100644 packages/google-cloud-datastream/samples/generated/v1/datastream.run_stream.js diff --git a/packages/google-cloud-datastream/README.md b/packages/google-cloud-datastream/README.md index 1bb9bc9d39b..62d02dbc86a 100644 --- a/packages/google-cloud-datastream/README.md +++ b/packages/google-cloud-datastream/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Datastream API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -139,6 +139,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Datastream.list_stream_objects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_stream_objects.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-datastream/samples/generated/v1/datastream.list_stream_objects.js,packages/google-cloud-datastream/samples/README.md) | | Datastream.list_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_streams.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-datastream/samples/generated/v1/datastream.list_streams.js,packages/google-cloud-datastream/samples/README.md) | | Datastream.lookup_stream_object | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.lookup_stream_object.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-datastream/samples/generated/v1/datastream.lookup_stream_object.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.run_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.run_stream.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-datastream/samples/generated/v1/datastream.run_stream.js,packages/google-cloud-datastream/samples/README.md) | | Datastream.start_backfill_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_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-datastream/samples/generated/v1/datastream.start_backfill_job.js,packages/google-cloud-datastream/samples/README.md) | | Datastream.stop_backfill_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_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-datastream/samples/generated/v1/datastream.stop_backfill_job.js,packages/google-cloud-datastream/samples/README.md) | | Datastream.update_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.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-datastream/samples/generated/v1/datastream.update_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | @@ -234,4 +235,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=datastream.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream.proto b/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream.proto index 2f033a537cc..8cf46f06328 100644 --- a/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream.proto +++ b/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream.proto @@ -167,6 +167,19 @@ service Datastream { }; } + // Use this method to start, resume or recover a stream with a non default CDC + // strategy. + rpc RunStream(RunStreamRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/streams/*}:run" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Stream" + metadata_type: "OperationMetadata" + }; + } + // Use this method to get details about a stream object. rpc GetStreamObject(GetStreamObjectRequest) returns (StreamObject) { option (google.api.http) = { @@ -352,6 +365,9 @@ message DiscoverConnectionProfileRequest { // PostgreSQL RDBMS to enrich with child data objects and metadata. PostgresqlRdbms postgresql_rdbms = 102; + + // SQLServer RDBMS to enrich with child data objects and metadata. + SqlServerRdbms sql_server_rdbms = 103; } } @@ -367,6 +383,9 @@ message DiscoverConnectionProfileResponse { // Enriched PostgreSQL RDBMS object. PostgresqlRdbms postgresql_rdbms = 102; + + // Enriched SQLServer RDBMS object. + SqlServerRdbms sql_server_rdbms = 103; } } @@ -709,6 +728,25 @@ message DeleteStreamRequest { string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; } +// Request message for running a stream. +message RunStreamRequest { + // Required. Name of the stream resource to start, in the format: + // projects/{project_id}/locations/{location}/streams/{stream_name} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datastream.googleapis.com/Stream" + } + ]; + + // Optional. The CDC strategy of the stream. If not set, the system's default + // value will be used. + CdcStrategy cdc_strategy = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Update the stream without validating it. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + // Request for fetching a specific stream object. message GetStreamObjectRequest { // Required. The name of the stream object resource to get. @@ -826,9 +864,10 @@ message OperationMetadata { // Output only. Identifies whether the user has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. + // have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. diff --git a/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto b/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto index 0d46d644adf..7c6669aaeda 100644 --- a/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto +++ b/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto @@ -34,6 +34,7 @@ option (google.api.resource_definition) = { }; // Oracle database profile. +// Next ID: 10. message OracleProfile { // Required. Hostname for the Oracle connection. string hostname = 1 [(google.api.field_behavior) = REQUIRED]; @@ -44,17 +45,58 @@ message OracleProfile { // Required. Username for the Oracle connection. string username = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. Password for the Oracle connection. - string password = 4 [(google.api.field_behavior) = REQUIRED]; + // Optional. Password for the Oracle connection. Mutually exclusive with the + // `secret_manager_stored_password` field. + string password = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. Database for the Oracle connection. string database_service = 5 [(google.api.field_behavior) = REQUIRED]; // Connection string attributes map connection_attributes = 6; + + // Optional. SSL configuration for the Oracle connection. + OracleSslConfig oracle_ssl_config = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for Oracle ASM connection. + OracleAsmConfig oracle_asm_config = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A reference to a Secret Manager resource name storing the Oracle + // connection password. Mutually exclusive with the `password` field. + string secret_manager_stored_password = 9 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for Oracle Automatic Storage Management (ASM) connection. +message OracleAsmConfig { + // Required. Hostname for the Oracle ASM connection. + string hostname = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Port for the Oracle ASM connection. + int32 port = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Username for the Oracle ASM connection. + string username = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Password for the Oracle ASM connection. + string password = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. ASM service name for the Oracle ASM connection. + string asm_service = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Connection string attributes + map connection_attributes = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SSL configuration for the Oracle connection. + OracleSslConfig oracle_ssl_config = 7 + [(google.api.field_behavior) = OPTIONAL]; } // MySQL database profile. +// Next ID: 7. message MysqlProfile { // Required. Hostname for the MySQL connection. string hostname = 1 [(google.api.field_behavior) = REQUIRED]; @@ -65,9 +107,10 @@ message MysqlProfile { // Required. Username for the MySQL connection. string username = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. Input only. Password for the MySQL connection. + // Optional. Input only. Password for the MySQL connection. Mutually exclusive + // with the `secret_manager_stored_password` field. string password = 4 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.field_behavior) = INPUT_ONLY ]; @@ -86,13 +129,34 @@ message PostgresqlProfile { // Required. Username for the PostgreSQL connection. string username = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. Password for the PostgreSQL connection. - string password = 4 [(google.api.field_behavior) = REQUIRED]; + // Optional. Password for the PostgreSQL connection. Mutually exclusive with + // the `secret_manager_stored_password` field. + string password = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. Database for the PostgreSQL connection. string database = 5 [(google.api.field_behavior) = REQUIRED]; } +// SQLServer database profile. +// Next ID: 8. +message SqlServerProfile { + // Required. Hostname for the SQLServer connection. + string hostname = 1 [(google.api.field_behavior) = REQUIRED]; + + // Port for the SQLServer connection, default value is 1433. + int32 port = 2; + + // Required. Username for the SQLServer connection. + string username = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Password for the SQLServer connection. Mutually exclusive with + // the `secret_manager_stored_password` field. + string password = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Database for the SQLServer connection. + string database = 5 [(google.api.field_behavior) = REQUIRED]; +} + // Cloud Storage bucket profile. message GcsProfile { // Required. The Cloud Storage bucket name. @@ -273,6 +337,17 @@ message MysqlSslConfig { bool ca_certificate_set = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Oracle SSL configuration information. +message OracleSslConfig { + // Input only. PEM-encoded certificate of the CA that signed the source + // database server's certificate. + string ca_certificate = 1 [(google.api.field_behavior) = INPUT_ONLY]; + + // Output only. Indicates whether the ca_certificate field has been set for + // this Connection-Profile. + bool ca_certificate_set = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // A set of reusable connection configurations to be used as a source or // destination for a stream. message ConnectionProfile { @@ -314,6 +389,9 @@ message ConnectionProfile { // PostgreSQL Connection Profile configuration. PostgresqlProfile postgresql_profile = 104; + + // SQLServer Connection Profile configuration. + SqlServerProfile sql_server_profile = 105; } // Connectivity options used to establish a connection to the profile. @@ -393,6 +471,34 @@ message OracleSourceConfig { // Configuration to stream large object values. message StreamLargeObjects {} + // Configuration to use LogMiner CDC method. + message LogMiner {} + + // Configuration to use Binary Log Parser CDC technique. + message BinaryLogParser { + // Configuration to use Oracle ASM to access the log files. + message OracleAsmLogFileAccess {} + + // Configuration to specify the Oracle directories to access the log files. + message LogFileDirectories { + // Required. Oracle directory for online logs. + string online_log_directory = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Oracle directory for archived logs. + string archived_log_directory = 2 + [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration to specify how the log file should be accessed. + oneof log_file_access { + // Use Oracle ASM. + OracleAsmLogFileAccess oracle_asm_log_file_access = 1; + + // Use Oracle directories. + LogFileDirectories log_file_directories = 2; + } + } + // Oracle objects to include in the stream. OracleRdbms include_objects = 1; @@ -412,9 +518,18 @@ message OracleSourceConfig { // Drop large object values. DropLargeObjects drop_large_objects = 100; - // Stream large object values. NOTE: This feature is currently experimental. + // Stream large object values. StreamLargeObjects stream_large_objects = 102; } + + // Configuration to select the CDC method. + oneof cdc_method { + // Use LogMiner. + LogMiner log_miner = 103; + + // Use Binary Log Parser. + BinaryLogParser binary_log_parser = 104; + } } // PostgreSQL Column. @@ -495,6 +610,89 @@ message PostgresqlSourceConfig { int32 max_concurrent_backfill_tasks = 5; } +// SQLServer Column. +message SqlServerColumn { + // Column name. + string column = 1; + + // The SQLServer data type. + string data_type = 2; + + // Column length. + int32 length = 3; + + // Column precision. + int32 precision = 4; + + // Column scale. + int32 scale = 5; + + // Whether or not the column represents a primary key. + bool primary_key = 6; + + // Whether or not the column can accept a null value. + bool nullable = 7; + + // The ordinal position of the column in the table. + int32 ordinal_position = 8; +} + +// SQLServer table. +message SqlServerTable { + // Table name. + string table = 1; + + // SQLServer columns in the schema. + // When unspecified as part of include/exclude objects, + // includes/excludes everything. + repeated SqlServerColumn columns = 2; +} + +// SQLServer schema. +message SqlServerSchema { + // Schema name. + string schema = 1; + + // Tables in the schema. + repeated SqlServerTable tables = 2; +} + +// SQLServer database structure. +message SqlServerRdbms { + // SQLServer schemas in the database server. + repeated SqlServerSchema schemas = 1; +} + +// SQLServer data source configuration +message SqlServerSourceConfig { + // SQLServer objects to include in the stream. + SqlServerRdbms include_objects = 1; + + // SQLServer objects to exclude from the stream. + SqlServerRdbms exclude_objects = 2; + + // Max concurrent CDC tasks. + int32 max_concurrent_cdc_tasks = 3; + + // Max concurrent backfill tasks. + int32 max_concurrent_backfill_tasks = 4; + + // Configuration to select the CDC read method for the stream. + oneof cdc_method { + // CDC reader reads from transaction logs. + SqlServerTransactionLogs transaction_logs = 101; + + // CDC reader reads from change tables. + SqlServerChangeTables change_tables = 102; + } +} + +// Configuration to use Transaction Logs CDC read method. +message SqlServerTransactionLogs {} + +// Configuration to use Change Tables CDC read method. +message SqlServerChangeTables {} + // MySQL Column. message MysqlColumn { // Column name. @@ -554,6 +752,12 @@ message MysqlRdbms { // MySQL source configuration message MysqlSourceConfig { + // Use Binary log position based replication. + message BinaryLogPosition {} + + // Use GTID based replication. + message Gtid {} + // MySQL objects to retrieve from the source. MysqlRdbms include_objects = 1; @@ -568,6 +772,15 @@ message MysqlSourceConfig { // negative. If not set (or set to 0), the system's default value will be // used. int32 max_concurrent_backfill_tasks = 4; + + // The CDC method to use for the stream. + oneof cdc_method { + // Use Binary log position based replication. + BinaryLogPosition binary_log_position = 101; + + // Use GTID based replication. + Gtid gtid = 102; + } } // The configuration of the stream source. @@ -591,6 +804,9 @@ message SourceConfig { // PostgreSQL data source configuration. PostgresqlSourceConfig postgresql_source_config = 102; + + // SQLServer data source configuration. + SqlServerSourceConfig sql_server_source_config = 103; } } @@ -658,6 +874,8 @@ message BigQueryDestinationConfig { // A single target dataset to which all data will be streamed. message SingleTargetDataset { // The dataset ID of the target dataset. + // DatasetIds allowed characters: + // https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. string dataset_id = 1; } @@ -690,6 +908,14 @@ message BigQueryDestinationConfig { DatasetTemplate dataset_template = 2; } + // AppendOnly mode defines that all changes to a table will be written to the + // destination table. + message AppendOnly {} + + // Merge mode defines that all changes to a table will be merged at the + // destination table. + message Merge {} + // Target dataset(s) configuration. oneof dataset_config { // Single destination dataset. @@ -704,6 +930,14 @@ message BigQueryDestinationConfig { // future, but existing tables will not be impacted. Lower values mean that // queries will return fresher data, but may result in higher cost. google.protobuf.Duration data_freshness = 300; + + oneof write_mode { + // The standard mode + Merge merge = 301; + + // Append only mode + AppendOnly append_only = 302; + } } // The configuration of the stream destination. @@ -781,6 +1015,9 @@ message Stream { // PostgreSQL data source objects to avoid backfilling. PostgresqlRdbms postgresql_excluded_objects = 3; + + // SQLServer data source objects to avoid backfilling + SqlServerRdbms sql_server_excluded_objects = 4; } } @@ -833,6 +1070,11 @@ message Stream { // encryption key provisioned through KMS. optional string customer_managed_encryption_key = 10 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. If the stream was recovered, the time of the last recovery. + // Note: This field is currently experimental. + google.protobuf.Timestamp last_recovery_time = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A specific stream object (e.g a specific DB table). @@ -895,6 +1137,15 @@ message SourceObjectIdentifier { string table = 2 [(google.api.field_behavior) = REQUIRED]; } + // SQLServer data source object identifier. + message SqlServerObjectIdentifier { + // Required. The schema name. + string schema = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The table name. + string table = 2 [(google.api.field_behavior) = REQUIRED]; + } + // The identifier for an object in the data source. oneof source_identifier { // Oracle data source object identifier. @@ -905,6 +1156,9 @@ message SourceObjectIdentifier { // PostgreSQL data source object identifier. PostgresqlObjectIdentifier postgresql_identifier = 3; + + // SQLServer data source object identifier. + SqlServerObjectIdentifier sql_server_identifier = 4; } } @@ -953,8 +1207,8 @@ message BackfillJob { MANUAL = 2; } - // Backfill job state. - State state = 1; + // Output only. Backfill job state. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Backfill job's triggering reason. Trigger trigger = 2; @@ -1012,13 +1266,16 @@ message Validation { // Validation passed. PASSED = 3; + + // Validation executed with warnings. + WARNING = 4; } // A short description of the validation. string description = 1; - // Validation execution status. - State state = 2; + // Output only. Validation execution status. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Messages reflecting the validation results. repeated ValidationMessage message = 3; @@ -1053,3 +1310,67 @@ message ValidationMessage { // A custom code identifying this specific message. string code = 4; } + +// The strategy that the stream uses for CDC replication. +message CdcStrategy { + // CDC strategy to start replicating from the most recent position in the + // source. + message MostRecentStartPosition {} + + // CDC strategy to resume replication from the next available position in the + // source. + message NextAvailableStartPosition {} + + // CDC strategy to start replicating from a specific position in the source. + message SpecificStartPosition { + oneof position { + // MySQL specific log position to start replicating from. + MysqlLogPosition mysql_log_position = 101; + + // Oracle SCN to start replicating from. + OracleScnPosition oracle_scn_position = 102; + + // SqlServer LSN to start replicating from. + SqlServerLsnPosition sql_server_lsn_position = 103; + } + } + + // The position to start reading from when starting, resuming, or recovering + // the stream. + // If not set, the system's default value will be used. + oneof start_position { + // Optional. Start replicating from the most recent position in the source. + MostRecentStartPosition most_recent_start_position = 101 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resume replication from the next available position in the + // source. + NextAvailableStartPosition next_available_start_position = 102 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Start replicating from a specific position in the source. + SpecificStartPosition specific_start_position = 103 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// SQL Server LSN position +message SqlServerLsnPosition { + // Required. Log sequence number (LSN) from where Logs will be read + string lsn = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Oracle SCN position +message OracleScnPosition { + // Required. SCN number from where Logs will be read + int64 scn = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// MySQL log position +message MysqlLogPosition { + // Required. The binary log file name. + string log_file = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The position within the binary log file. Default is head of file. + optional int32 log_position = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-datastream/protos/protos.d.ts b/packages/google-cloud-datastream/protos/protos.d.ts index 34d5989be6e..3d2490fec5f 100644 --- a/packages/google-cloud-datastream/protos/protos.d.ts +++ b/packages/google-cloud-datastream/protos/protos.d.ts @@ -200,6 +200,20 @@ export namespace google { */ public deleteStream(request: google.cloud.datastream.v1.IDeleteStreamRequest): Promise; + /** + * Calls RunStream. + * @param request RunStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public runStream(request: google.cloud.datastream.v1.IRunStreamRequest, callback: google.cloud.datastream.v1.Datastream.RunStreamCallback): void; + + /** + * Calls RunStream. + * @param request RunStreamRequest message or plain object + * @returns Promise + */ + public runStream(request: google.cloud.datastream.v1.IRunStreamRequest): Promise; + /** * Calls GetStreamObject. * @param request GetStreamObjectRequest message or plain object @@ -476,6 +490,13 @@ export namespace google { */ type DeleteStreamCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.cloud.datastream.v1.Datastream|runStream}. + * @param error Error, if any + * @param [response] Operation + */ + type RunStreamCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.datastream.v1.Datastream|getStreamObject}. * @param error Error, if any @@ -601,6 +622,9 @@ export namespace google { /** DiscoverConnectionProfileRequest postgresqlRdbms */ postgresqlRdbms?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); + + /** DiscoverConnectionProfileRequest sqlServerRdbms */ + sqlServerRdbms?: (google.cloud.datastream.v1.ISqlServerRdbms|null); } /** Represents a DiscoverConnectionProfileRequest. */ @@ -636,6 +660,9 @@ export namespace google { /** DiscoverConnectionProfileRequest postgresqlRdbms. */ public postgresqlRdbms?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); + /** DiscoverConnectionProfileRequest sqlServerRdbms. */ + public sqlServerRdbms?: (google.cloud.datastream.v1.ISqlServerRdbms|null); + /** DiscoverConnectionProfileRequest target. */ public target?: ("connectionProfile"|"connectionProfileName"); @@ -643,7 +670,7 @@ export namespace google { public hierarchy?: ("fullHierarchy"|"hierarchyDepth"); /** DiscoverConnectionProfileRequest dataObject. */ - public dataObject?: ("oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"); + public dataObject?: ("oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"|"sqlServerRdbms"); /** * Creates a new DiscoverConnectionProfileRequest instance using the specified properties. @@ -734,6 +761,9 @@ export namespace google { /** DiscoverConnectionProfileResponse postgresqlRdbms */ postgresqlRdbms?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); + + /** DiscoverConnectionProfileResponse sqlServerRdbms */ + sqlServerRdbms?: (google.cloud.datastream.v1.ISqlServerRdbms|null); } /** Represents a DiscoverConnectionProfileResponse. */ @@ -754,8 +784,11 @@ export namespace google { /** DiscoverConnectionProfileResponse postgresqlRdbms. */ public postgresqlRdbms?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); + /** DiscoverConnectionProfileResponse sqlServerRdbms. */ + public sqlServerRdbms?: (google.cloud.datastream.v1.ISqlServerRdbms|null); + /** DiscoverConnectionProfileResponse dataObject. */ - public dataObject?: ("oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"); + public dataObject?: ("oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"|"sqlServerRdbms"); /** * Creates a new DiscoverConnectionProfileResponse instance using the specified properties. @@ -2403,6 +2436,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a RunStreamRequest. */ + interface IRunStreamRequest { + + /** RunStreamRequest name */ + name?: (string|null); + + /** RunStreamRequest cdcStrategy */ + cdcStrategy?: (google.cloud.datastream.v1.ICdcStrategy|null); + + /** RunStreamRequest force */ + force?: (boolean|null); + } + + /** Represents a RunStreamRequest. */ + class RunStreamRequest implements IRunStreamRequest { + + /** + * Constructs a new RunStreamRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IRunStreamRequest); + + /** RunStreamRequest name. */ + public name: string; + + /** RunStreamRequest cdcStrategy. */ + public cdcStrategy?: (google.cloud.datastream.v1.ICdcStrategy|null); + + /** RunStreamRequest force. */ + public force: boolean; + + /** + * Creates a new RunStreamRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunStreamRequest instance + */ + public static create(properties?: google.cloud.datastream.v1.IRunStreamRequest): google.cloud.datastream.v1.RunStreamRequest; + + /** + * Encodes the specified RunStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.RunStreamRequest.verify|verify} messages. + * @param message RunStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IRunStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.RunStreamRequest.verify|verify} messages. + * @param message RunStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IRunStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunStreamRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunStreamRequest + * @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.datastream.v1.RunStreamRequest; + + /** + * Decodes a RunStreamRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunStreamRequest + * @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.datastream.v1.RunStreamRequest; + + /** + * Verifies a RunStreamRequest 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 RunStreamRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunStreamRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.RunStreamRequest; + + /** + * Creates a plain object from a RunStreamRequest message. Also converts values to other types if specified. + * @param message RunStreamRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.RunStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunStreamRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunStreamRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GetStreamObjectRequest. */ interface IGetStreamObjectRequest { @@ -4464,6 +4606,15 @@ export namespace google { /** OracleProfile connectionAttributes */ connectionAttributes?: ({ [k: string]: string }|null); + + /** OracleProfile oracleSslConfig */ + oracleSslConfig?: (google.cloud.datastream.v1.IOracleSslConfig|null); + + /** OracleProfile oracleAsmConfig */ + oracleAsmConfig?: (google.cloud.datastream.v1.IOracleAsmConfig|null); + + /** OracleProfile secretManagerStoredPassword */ + secretManagerStoredPassword?: (string|null); } /** Represents an OracleProfile. */ @@ -4493,6 +4644,15 @@ export namespace google { /** OracleProfile connectionAttributes. */ public connectionAttributes: { [k: string]: string }; + /** OracleProfile oracleSslConfig. */ + public oracleSslConfig?: (google.cloud.datastream.v1.IOracleSslConfig|null); + + /** OracleProfile oracleAsmConfig. */ + public oracleAsmConfig?: (google.cloud.datastream.v1.IOracleAsmConfig|null); + + /** OracleProfile secretManagerStoredPassword. */ + public secretManagerStoredPassword: string; + /** * Creates a new OracleProfile instance using the specified properties. * @param [properties] Properties to set @@ -4571,6 +4731,139 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an OracleAsmConfig. */ + interface IOracleAsmConfig { + + /** OracleAsmConfig hostname */ + hostname?: (string|null); + + /** OracleAsmConfig port */ + port?: (number|null); + + /** OracleAsmConfig username */ + username?: (string|null); + + /** OracleAsmConfig password */ + password?: (string|null); + + /** OracleAsmConfig asmService */ + asmService?: (string|null); + + /** OracleAsmConfig connectionAttributes */ + connectionAttributes?: ({ [k: string]: string }|null); + + /** OracleAsmConfig oracleSslConfig */ + oracleSslConfig?: (google.cloud.datastream.v1.IOracleSslConfig|null); + } + + /** Represents an OracleAsmConfig. */ + class OracleAsmConfig implements IOracleAsmConfig { + + /** + * Constructs a new OracleAsmConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IOracleAsmConfig); + + /** OracleAsmConfig hostname. */ + public hostname: string; + + /** OracleAsmConfig port. */ + public port: number; + + /** OracleAsmConfig username. */ + public username: string; + + /** OracleAsmConfig password. */ + public password: string; + + /** OracleAsmConfig asmService. */ + public asmService: string; + + /** OracleAsmConfig connectionAttributes. */ + public connectionAttributes: { [k: string]: string }; + + /** OracleAsmConfig oracleSslConfig. */ + public oracleSslConfig?: (google.cloud.datastream.v1.IOracleSslConfig|null); + + /** + * Creates a new OracleAsmConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns OracleAsmConfig instance + */ + public static create(properties?: google.cloud.datastream.v1.IOracleAsmConfig): google.cloud.datastream.v1.OracleAsmConfig; + + /** + * Encodes the specified OracleAsmConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleAsmConfig.verify|verify} messages. + * @param message OracleAsmConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IOracleAsmConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OracleAsmConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleAsmConfig.verify|verify} messages. + * @param message OracleAsmConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IOracleAsmConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OracleAsmConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OracleAsmConfig + * @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.datastream.v1.OracleAsmConfig; + + /** + * Decodes an OracleAsmConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OracleAsmConfig + * @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.datastream.v1.OracleAsmConfig; + + /** + * Verifies an OracleAsmConfig 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 OracleAsmConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OracleAsmConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleAsmConfig; + + /** + * Creates a plain object from an OracleAsmConfig message. Also converts values to other types if specified. + * @param message OracleAsmConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.OracleAsmConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OracleAsmConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OracleAsmConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a MysqlProfile. */ interface IMysqlProfile { @@ -4813,127 +5106,248 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GcsProfile. */ - interface IGcsProfile { + /** Properties of a SqlServerProfile. */ + interface ISqlServerProfile { - /** GcsProfile bucket */ - bucket?: (string|null); + /** SqlServerProfile hostname */ + hostname?: (string|null); - /** GcsProfile rootPath */ - rootPath?: (string|null); + /** SqlServerProfile port */ + port?: (number|null); + + /** SqlServerProfile username */ + username?: (string|null); + + /** SqlServerProfile password */ + password?: (string|null); + + /** SqlServerProfile database */ + database?: (string|null); } - /** Represents a GcsProfile. */ - class GcsProfile implements IGcsProfile { + /** Represents a SqlServerProfile. */ + class SqlServerProfile implements ISqlServerProfile { /** - * Constructs a new GcsProfile. + * Constructs a new SqlServerProfile. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IGcsProfile); + constructor(properties?: google.cloud.datastream.v1.ISqlServerProfile); - /** GcsProfile bucket. */ - public bucket: string; + /** SqlServerProfile hostname. */ + public hostname: string; - /** GcsProfile rootPath. */ - public rootPath: string; + /** SqlServerProfile port. */ + public port: number; + + /** SqlServerProfile username. */ + public username: string; + + /** SqlServerProfile password. */ + public password: string; + + /** SqlServerProfile database. */ + public database: string; /** - * Creates a new GcsProfile instance using the specified properties. + * Creates a new SqlServerProfile instance using the specified properties. * @param [properties] Properties to set - * @returns GcsProfile instance + * @returns SqlServerProfile instance */ - public static create(properties?: google.cloud.datastream.v1.IGcsProfile): google.cloud.datastream.v1.GcsProfile; + public static create(properties?: google.cloud.datastream.v1.ISqlServerProfile): google.cloud.datastream.v1.SqlServerProfile; /** - * Encodes the specified GcsProfile message. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. - * @param message GcsProfile message or plain object to encode + * Encodes the specified SqlServerProfile message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerProfile.verify|verify} messages. + * @param message SqlServerProfile message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IGcsProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ISqlServerProfile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. - * @param message GcsProfile message or plain object to encode + * Encodes the specified SqlServerProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerProfile.verify|verify} messages. + * @param message SqlServerProfile message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IGcsProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerProfile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsProfile message from the specified reader or buffer. + * Decodes a SqlServerProfile message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsProfile + * @returns SqlServerProfile * @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.datastream.v1.GcsProfile; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.SqlServerProfile; /** - * Decodes a GcsProfile message from the specified reader or buffer, length delimited. + * Decodes a SqlServerProfile message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsProfile + * @returns SqlServerProfile * @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.datastream.v1.GcsProfile; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.SqlServerProfile; /** - * Verifies a GcsProfile message. + * Verifies a SqlServerProfile 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 GcsProfile message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerProfile message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsProfile + * @returns SqlServerProfile */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GcsProfile; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerProfile; /** - * Creates a plain object from a GcsProfile message. Also converts values to other types if specified. - * @param message GcsProfile + * Creates a plain object from a SqlServerProfile message. Also converts values to other types if specified. + * @param message SqlServerProfile * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.GcsProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.SqlServerProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsProfile to JSON. + * Converts this SqlServerProfile to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GcsProfile + * Gets the default type url for SqlServerProfile * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BigQueryProfile. */ - interface IBigQueryProfile { + /** Properties of a GcsProfile. */ + interface IGcsProfile { + + /** GcsProfile bucket */ + bucket?: (string|null); + + /** GcsProfile rootPath */ + rootPath?: (string|null); } - /** Represents a BigQueryProfile. */ - class BigQueryProfile implements IBigQueryProfile { + /** Represents a GcsProfile. */ + class GcsProfile implements IGcsProfile { /** - * Constructs a new BigQueryProfile. + * Constructs a new GcsProfile. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IBigQueryProfile); + constructor(properties?: google.cloud.datastream.v1.IGcsProfile); - /** - * Creates a new BigQueryProfile instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryProfile instance - */ + /** GcsProfile bucket. */ + public bucket: string; + + /** GcsProfile rootPath. */ + public rootPath: string; + + /** + * Creates a new GcsProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsProfile instance + */ + public static create(properties?: google.cloud.datastream.v1.IGcsProfile): google.cloud.datastream.v1.GcsProfile; + + /** + * Encodes the specified GcsProfile message. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. + * @param message GcsProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IGcsProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. + * @param message GcsProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IGcsProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsProfile + * @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.datastream.v1.GcsProfile; + + /** + * Decodes a GcsProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsProfile + * @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.datastream.v1.GcsProfile; + + /** + * Verifies a GcsProfile 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 GcsProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsProfile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GcsProfile; + + /** + * Creates a plain object from a GcsProfile message. Also converts values to other types if specified. + * @param message GcsProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.GcsProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryProfile. */ + interface IBigQueryProfile { + } + + /** Represents a BigQueryProfile. */ + class BigQueryProfile implements IBigQueryProfile { + + /** + * Constructs a new BigQueryProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IBigQueryProfile); + + /** + * Creates a new BigQueryProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryProfile instance + */ public static create(properties?: google.cloud.datastream.v1.IBigQueryProfile): google.cloud.datastream.v1.BigQueryProfile; /** @@ -5834,6 +6248,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an OracleSslConfig. */ + interface IOracleSslConfig { + + /** OracleSslConfig caCertificate */ + caCertificate?: (string|null); + + /** OracleSslConfig caCertificateSet */ + caCertificateSet?: (boolean|null); + } + + /** Represents an OracleSslConfig. */ + class OracleSslConfig implements IOracleSslConfig { + + /** + * Constructs a new OracleSslConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IOracleSslConfig); + + /** OracleSslConfig caCertificate. */ + public caCertificate: string; + + /** OracleSslConfig caCertificateSet. */ + public caCertificateSet: boolean; + + /** + * Creates a new OracleSslConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns OracleSslConfig instance + */ + public static create(properties?: google.cloud.datastream.v1.IOracleSslConfig): google.cloud.datastream.v1.OracleSslConfig; + + /** + * Encodes the specified OracleSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleSslConfig.verify|verify} messages. + * @param message OracleSslConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IOracleSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OracleSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSslConfig.verify|verify} messages. + * @param message OracleSslConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IOracleSslConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OracleSslConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OracleSslConfig + * @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.datastream.v1.OracleSslConfig; + + /** + * Decodes an OracleSslConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OracleSslConfig + * @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.datastream.v1.OracleSslConfig; + + /** + * Verifies an OracleSslConfig 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 OracleSslConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OracleSslConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSslConfig; + + /** + * Creates a plain object from an OracleSslConfig message. Also converts values to other types if specified. + * @param message OracleSslConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.OracleSslConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OracleSslConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OracleSslConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ConnectionProfile. */ interface IConnectionProfile { @@ -5867,6 +6384,9 @@ export namespace google { /** ConnectionProfile postgresqlProfile */ postgresqlProfile?: (google.cloud.datastream.v1.IPostgresqlProfile|null); + /** ConnectionProfile sqlServerProfile */ + sqlServerProfile?: (google.cloud.datastream.v1.ISqlServerProfile|null); + /** ConnectionProfile staticServiceIpConnectivity */ staticServiceIpConnectivity?: (google.cloud.datastream.v1.IStaticServiceIpConnectivity|null); @@ -5916,6 +6436,9 @@ export namespace google { /** ConnectionProfile postgresqlProfile. */ public postgresqlProfile?: (google.cloud.datastream.v1.IPostgresqlProfile|null); + /** ConnectionProfile sqlServerProfile. */ + public sqlServerProfile?: (google.cloud.datastream.v1.ISqlServerProfile|null); + /** ConnectionProfile staticServiceIpConnectivity. */ public staticServiceIpConnectivity?: (google.cloud.datastream.v1.IStaticServiceIpConnectivity|null); @@ -5926,7 +6449,7 @@ export namespace google { public privateConnectivity?: (google.cloud.datastream.v1.IPrivateConnectivity|null); /** ConnectionProfile profile. */ - public profile?: ("oracleProfile"|"gcsProfile"|"mysqlProfile"|"bigqueryProfile"|"postgresqlProfile"); + public profile?: ("oracleProfile"|"gcsProfile"|"mysqlProfile"|"bigqueryProfile"|"postgresqlProfile"|"sqlServerProfile"); /** ConnectionProfile connectivity. */ public connectivity?: ("staticServiceIpConnectivity"|"forwardSshConnectivity"|"privateConnectivity"); @@ -6477,6 +7000,12 @@ export namespace google { /** OracleSourceConfig streamLargeObjects */ streamLargeObjects?: (google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null); + + /** OracleSourceConfig logMiner */ + logMiner?: (google.cloud.datastream.v1.OracleSourceConfig.ILogMiner|null); + + /** OracleSourceConfig binaryLogParser */ + binaryLogParser?: (google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser|null); } /** Represents an OracleSourceConfig. */ @@ -6506,9 +7035,18 @@ export namespace google { /** OracleSourceConfig streamLargeObjects. */ public streamLargeObjects?: (google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null); + /** OracleSourceConfig logMiner. */ + public logMiner?: (google.cloud.datastream.v1.OracleSourceConfig.ILogMiner|null); + + /** OracleSourceConfig binaryLogParser. */ + public binaryLogParser?: (google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser|null); + /** OracleSourceConfig largeObjectsHandling. */ public largeObjectsHandling?: ("dropLargeObjects"|"streamLargeObjects"); + /** OracleSourceConfig cdcMethod. */ + public cdcMethod?: ("logMiner"|"binaryLogParser"); + /** * Creates a new OracleSourceConfig instance using the specified properties. * @param [properties] Properties to set @@ -6770,55 +7308,449 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** Properties of a PostgresqlColumn. */ - interface IPostgresqlColumn { - - /** PostgresqlColumn column */ - column?: (string|null); - /** PostgresqlColumn dataType */ - dataType?: (string|null); + /** Properties of a LogMiner. */ + interface ILogMiner { + } - /** PostgresqlColumn length */ - length?: (number|null); + /** Represents a LogMiner. */ + class LogMiner implements ILogMiner { - /** PostgresqlColumn precision */ - precision?: (number|null); + /** + * Constructs a new LogMiner. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.OracleSourceConfig.ILogMiner); - /** PostgresqlColumn scale */ - scale?: (number|null); + /** + * Creates a new LogMiner instance using the specified properties. + * @param [properties] Properties to set + * @returns LogMiner instance + */ + public static create(properties?: google.cloud.datastream.v1.OracleSourceConfig.ILogMiner): google.cloud.datastream.v1.OracleSourceConfig.LogMiner; - /** PostgresqlColumn primaryKey */ - primaryKey?: (boolean|null); + /** + * Encodes the specified LogMiner message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.LogMiner.verify|verify} messages. + * @param message LogMiner message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.OracleSourceConfig.ILogMiner, writer?: $protobuf.Writer): $protobuf.Writer; - /** PostgresqlColumn nullable */ - nullable?: (boolean|null); + /** + * Encodes the specified LogMiner message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.LogMiner.verify|verify} messages. + * @param message LogMiner message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.OracleSourceConfig.ILogMiner, writer?: $protobuf.Writer): $protobuf.Writer; - /** PostgresqlColumn ordinalPosition */ - ordinalPosition?: (number|null); - } + /** + * Decodes a LogMiner message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogMiner + * @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.datastream.v1.OracleSourceConfig.LogMiner; - /** Represents a PostgresqlColumn. */ - class PostgresqlColumn implements IPostgresqlColumn { + /** + * Decodes a LogMiner message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogMiner + * @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.datastream.v1.OracleSourceConfig.LogMiner; - /** - * Constructs a new PostgresqlColumn. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IPostgresqlColumn); + /** + * Verifies a LogMiner 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); - /** PostgresqlColumn column. */ - public column: string; + /** + * Creates a LogMiner message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogMiner + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig.LogMiner; - /** PostgresqlColumn dataType. */ - public dataType: string; + /** + * Creates a plain object from a LogMiner message. Also converts values to other types if specified. + * @param message LogMiner + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig.LogMiner, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** PostgresqlColumn length. */ - public length: number; + /** + * Converts this LogMiner to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** PostgresqlColumn precision. */ + /** + * Gets the default type url for LogMiner + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BinaryLogParser. */ + interface IBinaryLogParser { + + /** BinaryLogParser oracleAsmLogFileAccess */ + oracleAsmLogFileAccess?: (google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess|null); + + /** BinaryLogParser logFileDirectories */ + logFileDirectories?: (google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories|null); + } + + /** Represents a BinaryLogParser. */ + class BinaryLogParser implements IBinaryLogParser { + + /** + * Constructs a new BinaryLogParser. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser); + + /** BinaryLogParser oracleAsmLogFileAccess. */ + public oracleAsmLogFileAccess?: (google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess|null); + + /** BinaryLogParser logFileDirectories. */ + public logFileDirectories?: (google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories|null); + + /** BinaryLogParser logFileAccess. */ + public logFileAccess?: ("oracleAsmLogFileAccess"|"logFileDirectories"); + + /** + * Creates a new BinaryLogParser instance using the specified properties. + * @param [properties] Properties to set + * @returns BinaryLogParser instance + */ + public static create(properties?: google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser; + + /** + * Encodes the specified BinaryLogParser message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.verify|verify} messages. + * @param message BinaryLogParser message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BinaryLogParser message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.verify|verify} messages. + * @param message BinaryLogParser message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BinaryLogParser message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BinaryLogParser + * @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.datastream.v1.OracleSourceConfig.BinaryLogParser; + + /** + * Decodes a BinaryLogParser message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BinaryLogParser + * @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.datastream.v1.OracleSourceConfig.BinaryLogParser; + + /** + * Verifies a BinaryLogParser 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 BinaryLogParser message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BinaryLogParser + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser; + + /** + * Creates a plain object from a BinaryLogParser message. Also converts values to other types if specified. + * @param message BinaryLogParser + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BinaryLogParser to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BinaryLogParser + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BinaryLogParser { + + /** Properties of an OracleAsmLogFileAccess. */ + interface IOracleAsmLogFileAccess { + } + + /** Represents an OracleAsmLogFileAccess. */ + class OracleAsmLogFileAccess implements IOracleAsmLogFileAccess { + + /** + * Constructs a new OracleAsmLogFileAccess. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess); + + /** + * Creates a new OracleAsmLogFileAccess instance using the specified properties. + * @param [properties] Properties to set + * @returns OracleAsmLogFileAccess instance + */ + public static create(properties?: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess; + + /** + * Encodes the specified OracleAsmLogFileAccess message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.verify|verify} messages. + * @param message OracleAsmLogFileAccess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OracleAsmLogFileAccess message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.verify|verify} messages. + * @param message OracleAsmLogFileAccess message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OracleAsmLogFileAccess message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OracleAsmLogFileAccess + * @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.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess; + + /** + * Decodes an OracleAsmLogFileAccess message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OracleAsmLogFileAccess + * @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.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess; + + /** + * Verifies an OracleAsmLogFileAccess 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 OracleAsmLogFileAccess message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OracleAsmLogFileAccess + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess; + + /** + * Creates a plain object from an OracleAsmLogFileAccess message. Also converts values to other types if specified. + * @param message OracleAsmLogFileAccess + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OracleAsmLogFileAccess to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OracleAsmLogFileAccess + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LogFileDirectories. */ + interface ILogFileDirectories { + + /** LogFileDirectories onlineLogDirectory */ + onlineLogDirectory?: (string|null); + + /** LogFileDirectories archivedLogDirectory */ + archivedLogDirectory?: (string|null); + } + + /** Represents a LogFileDirectories. */ + class LogFileDirectories implements ILogFileDirectories { + + /** + * Constructs a new LogFileDirectories. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories); + + /** LogFileDirectories onlineLogDirectory. */ + public onlineLogDirectory: string; + + /** LogFileDirectories archivedLogDirectory. */ + public archivedLogDirectory: string; + + /** + * Creates a new LogFileDirectories instance using the specified properties. + * @param [properties] Properties to set + * @returns LogFileDirectories instance + */ + public static create(properties?: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories; + + /** + * Encodes the specified LogFileDirectories message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.verify|verify} messages. + * @param message LogFileDirectories message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogFileDirectories message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.verify|verify} messages. + * @param message LogFileDirectories message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogFileDirectories message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LogFileDirectories + * @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.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories; + + /** + * Decodes a LogFileDirectories message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LogFileDirectories + * @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.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories; + + /** + * Verifies a LogFileDirectories 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 LogFileDirectories message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogFileDirectories + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories; + + /** + * Creates a plain object from a LogFileDirectories message. Also converts values to other types if specified. + * @param message LogFileDirectories + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogFileDirectories to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LogFileDirectories + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a PostgresqlColumn. */ + interface IPostgresqlColumn { + + /** PostgresqlColumn column */ + column?: (string|null); + + /** PostgresqlColumn dataType */ + dataType?: (string|null); + + /** PostgresqlColumn length */ + length?: (number|null); + + /** PostgresqlColumn precision */ + precision?: (number|null); + + /** PostgresqlColumn scale */ + scale?: (number|null); + + /** PostgresqlColumn primaryKey */ + primaryKey?: (boolean|null); + + /** PostgresqlColumn nullable */ + nullable?: (boolean|null); + + /** PostgresqlColumn ordinalPosition */ + ordinalPosition?: (number|null); + } + + /** Represents a PostgresqlColumn. */ + class PostgresqlColumn implements IPostgresqlColumn { + + /** + * Constructs a new PostgresqlColumn. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IPostgresqlColumn); + + /** PostgresqlColumn column. */ + public column: string; + + /** PostgresqlColumn dataType. */ + public dataType: string; + + /** PostgresqlColumn length. */ + public length: number; + + /** PostgresqlColumn precision. */ public precision: number; /** PostgresqlColumn scale. */ @@ -7335,3111 +8267,5099 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MysqlColumn. */ - interface IMysqlColumn { + /** Properties of a SqlServerColumn. */ + interface ISqlServerColumn { - /** MysqlColumn column */ + /** SqlServerColumn column */ column?: (string|null); - /** MysqlColumn dataType */ + /** SqlServerColumn dataType */ dataType?: (string|null); - /** MysqlColumn length */ + /** SqlServerColumn length */ length?: (number|null); - /** MysqlColumn collation */ - collation?: (string|null); + /** SqlServerColumn precision */ + precision?: (number|null); - /** MysqlColumn primaryKey */ + /** SqlServerColumn scale */ + scale?: (number|null); + + /** SqlServerColumn primaryKey */ primaryKey?: (boolean|null); - /** MysqlColumn nullable */ + /** SqlServerColumn nullable */ nullable?: (boolean|null); - /** MysqlColumn ordinalPosition */ + /** SqlServerColumn ordinalPosition */ ordinalPosition?: (number|null); - - /** MysqlColumn precision */ - precision?: (number|null); - - /** MysqlColumn scale */ - scale?: (number|null); } - /** Represents a MysqlColumn. */ - class MysqlColumn implements IMysqlColumn { + /** Represents a SqlServerColumn. */ + class SqlServerColumn implements ISqlServerColumn { /** - * Constructs a new MysqlColumn. + * Constructs a new SqlServerColumn. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IMysqlColumn); + constructor(properties?: google.cloud.datastream.v1.ISqlServerColumn); - /** MysqlColumn column. */ + /** SqlServerColumn column. */ public column: string; - /** MysqlColumn dataType. */ + /** SqlServerColumn dataType. */ public dataType: string; - /** MysqlColumn length. */ + /** SqlServerColumn length. */ public length: number; - /** MysqlColumn collation. */ - public collation: string; + /** SqlServerColumn precision. */ + public precision: number; - /** MysqlColumn primaryKey. */ + /** SqlServerColumn scale. */ + public scale: number; + + /** SqlServerColumn primaryKey. */ public primaryKey: boolean; - /** MysqlColumn nullable. */ + /** SqlServerColumn nullable. */ public nullable: boolean; - /** MysqlColumn ordinalPosition. */ + /** SqlServerColumn ordinalPosition. */ public ordinalPosition: number; - /** MysqlColumn precision. */ - public precision: number; - - /** MysqlColumn scale. */ - public scale: number; - /** - * Creates a new MysqlColumn instance using the specified properties. + * Creates a new SqlServerColumn instance using the specified properties. * @param [properties] Properties to set - * @returns MysqlColumn instance + * @returns SqlServerColumn instance */ - public static create(properties?: google.cloud.datastream.v1.IMysqlColumn): google.cloud.datastream.v1.MysqlColumn; + public static create(properties?: google.cloud.datastream.v1.ISqlServerColumn): google.cloud.datastream.v1.SqlServerColumn; /** - * Encodes the specified MysqlColumn message. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. - * @param message MysqlColumn message or plain object to encode + * Encodes the specified SqlServerColumn message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerColumn.verify|verify} messages. + * @param message SqlServerColumn message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IMysqlColumn, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ISqlServerColumn, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MysqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. - * @param message MysqlColumn message or plain object to encode + * Encodes the specified SqlServerColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerColumn.verify|verify} messages. + * @param message SqlServerColumn message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlColumn, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerColumn, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MysqlColumn message from the specified reader or buffer. + * Decodes a SqlServerColumn message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MysqlColumn + * @returns SqlServerColumn * @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.datastream.v1.MysqlColumn; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.SqlServerColumn; /** - * Decodes a MysqlColumn message from the specified reader or buffer, length delimited. + * Decodes a SqlServerColumn message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MysqlColumn + * @returns SqlServerColumn * @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.datastream.v1.MysqlColumn; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.SqlServerColumn; /** - * Verifies a MysqlColumn message. + * Verifies a SqlServerColumn 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 MysqlColumn message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerColumn message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MysqlColumn + * @returns SqlServerColumn */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlColumn; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerColumn; /** - * Creates a plain object from a MysqlColumn message. Also converts values to other types if specified. - * @param message MysqlColumn + * Creates a plain object from a SqlServerColumn message. Also converts values to other types if specified. + * @param message SqlServerColumn * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.MysqlColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.SqlServerColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MysqlColumn to JSON. + * Converts this SqlServerColumn to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MysqlColumn + * Gets the default type url for SqlServerColumn * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MysqlTable. */ - interface IMysqlTable { + /** Properties of a SqlServerTable. */ + interface ISqlServerTable { - /** MysqlTable table */ + /** SqlServerTable table */ table?: (string|null); - /** MysqlTable mysqlColumns */ - mysqlColumns?: (google.cloud.datastream.v1.IMysqlColumn[]|null); + /** SqlServerTable columns */ + columns?: (google.cloud.datastream.v1.ISqlServerColumn[]|null); } - /** Represents a MysqlTable. */ - class MysqlTable implements IMysqlTable { + /** Represents a SqlServerTable. */ + class SqlServerTable implements ISqlServerTable { /** - * Constructs a new MysqlTable. + * Constructs a new SqlServerTable. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IMysqlTable); + constructor(properties?: google.cloud.datastream.v1.ISqlServerTable); - /** MysqlTable table. */ + /** SqlServerTable table. */ public table: string; - /** MysqlTable mysqlColumns. */ - public mysqlColumns: google.cloud.datastream.v1.IMysqlColumn[]; + /** SqlServerTable columns. */ + public columns: google.cloud.datastream.v1.ISqlServerColumn[]; /** - * Creates a new MysqlTable instance using the specified properties. + * Creates a new SqlServerTable instance using the specified properties. * @param [properties] Properties to set - * @returns MysqlTable instance + * @returns SqlServerTable instance */ - public static create(properties?: google.cloud.datastream.v1.IMysqlTable): google.cloud.datastream.v1.MysqlTable; + public static create(properties?: google.cloud.datastream.v1.ISqlServerTable): google.cloud.datastream.v1.SqlServerTable; /** - * Encodes the specified MysqlTable message. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. - * @param message MysqlTable message or plain object to encode + * Encodes the specified SqlServerTable message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTable.verify|verify} messages. + * @param message SqlServerTable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IMysqlTable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ISqlServerTable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MysqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. - * @param message MysqlTable message or plain object to encode + * Encodes the specified SqlServerTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTable.verify|verify} messages. + * @param message SqlServerTable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlTable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerTable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MysqlTable message from the specified reader or buffer. + * Decodes a SqlServerTable message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MysqlTable + * @returns SqlServerTable * @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.datastream.v1.MysqlTable; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.SqlServerTable; /** - * Decodes a MysqlTable message from the specified reader or buffer, length delimited. + * Decodes a SqlServerTable message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MysqlTable + * @returns SqlServerTable * @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.datastream.v1.MysqlTable; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.SqlServerTable; /** - * Verifies a MysqlTable message. + * Verifies a SqlServerTable 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 MysqlTable message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerTable message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MysqlTable + * @returns SqlServerTable */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlTable; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerTable; /** - * Creates a plain object from a MysqlTable message. Also converts values to other types if specified. - * @param message MysqlTable + * Creates a plain object from a SqlServerTable message. Also converts values to other types if specified. + * @param message SqlServerTable * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.MysqlTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.SqlServerTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MysqlTable to JSON. + * Converts this SqlServerTable to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MysqlTable + * Gets the default type url for SqlServerTable * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MysqlDatabase. */ - interface IMysqlDatabase { + /** Properties of a SqlServerSchema. */ + interface ISqlServerSchema { - /** MysqlDatabase database */ - database?: (string|null); + /** SqlServerSchema schema */ + schema?: (string|null); - /** MysqlDatabase mysqlTables */ - mysqlTables?: (google.cloud.datastream.v1.IMysqlTable[]|null); + /** SqlServerSchema tables */ + tables?: (google.cloud.datastream.v1.ISqlServerTable[]|null); } - /** Represents a MysqlDatabase. */ - class MysqlDatabase implements IMysqlDatabase { + /** Represents a SqlServerSchema. */ + class SqlServerSchema implements ISqlServerSchema { /** - * Constructs a new MysqlDatabase. + * Constructs a new SqlServerSchema. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IMysqlDatabase); + constructor(properties?: google.cloud.datastream.v1.ISqlServerSchema); - /** MysqlDatabase database. */ - public database: string; + /** SqlServerSchema schema. */ + public schema: string; - /** MysqlDatabase mysqlTables. */ - public mysqlTables: google.cloud.datastream.v1.IMysqlTable[]; + /** SqlServerSchema tables. */ + public tables: google.cloud.datastream.v1.ISqlServerTable[]; /** - * Creates a new MysqlDatabase instance using the specified properties. + * Creates a new SqlServerSchema instance using the specified properties. * @param [properties] Properties to set - * @returns MysqlDatabase instance + * @returns SqlServerSchema instance */ - public static create(properties?: google.cloud.datastream.v1.IMysqlDatabase): google.cloud.datastream.v1.MysqlDatabase; + public static create(properties?: google.cloud.datastream.v1.ISqlServerSchema): google.cloud.datastream.v1.SqlServerSchema; /** - * Encodes the specified MysqlDatabase message. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. - * @param message MysqlDatabase message or plain object to encode + * Encodes the specified SqlServerSchema message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSchema.verify|verify} messages. + * @param message SqlServerSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IMysqlDatabase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ISqlServerSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MysqlDatabase message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. - * @param message MysqlDatabase message or plain object to encode + * Encodes the specified SqlServerSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSchema.verify|verify} messages. + * @param message SqlServerSchema message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlDatabase, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerSchema, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MysqlDatabase message from the specified reader or buffer. + * Decodes a SqlServerSchema message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MysqlDatabase + * @returns SqlServerSchema * @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.datastream.v1.MysqlDatabase; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.SqlServerSchema; /** - * Decodes a MysqlDatabase message from the specified reader or buffer, length delimited. + * Decodes a SqlServerSchema message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MysqlDatabase + * @returns SqlServerSchema * @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.datastream.v1.MysqlDatabase; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.SqlServerSchema; /** - * Verifies a MysqlDatabase message. + * Verifies a SqlServerSchema 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 MysqlDatabase message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerSchema message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MysqlDatabase + * @returns SqlServerSchema */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlDatabase; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerSchema; /** - * Creates a plain object from a MysqlDatabase message. Also converts values to other types if specified. - * @param message MysqlDatabase + * Creates a plain object from a SqlServerSchema message. Also converts values to other types if specified. + * @param message SqlServerSchema * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.MysqlDatabase, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.SqlServerSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MysqlDatabase to JSON. + * Converts this SqlServerSchema to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MysqlDatabase + * Gets the default type url for SqlServerSchema * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MysqlRdbms. */ - interface IMysqlRdbms { + /** Properties of a SqlServerRdbms. */ + interface ISqlServerRdbms { - /** MysqlRdbms mysqlDatabases */ - mysqlDatabases?: (google.cloud.datastream.v1.IMysqlDatabase[]|null); + /** SqlServerRdbms schemas */ + schemas?: (google.cloud.datastream.v1.ISqlServerSchema[]|null); } - /** Represents a MysqlRdbms. */ - class MysqlRdbms implements IMysqlRdbms { + /** Represents a SqlServerRdbms. */ + class SqlServerRdbms implements ISqlServerRdbms { /** - * Constructs a new MysqlRdbms. + * Constructs a new SqlServerRdbms. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IMysqlRdbms); + constructor(properties?: google.cloud.datastream.v1.ISqlServerRdbms); - /** MysqlRdbms mysqlDatabases. */ - public mysqlDatabases: google.cloud.datastream.v1.IMysqlDatabase[]; + /** SqlServerRdbms schemas. */ + public schemas: google.cloud.datastream.v1.ISqlServerSchema[]; /** - * Creates a new MysqlRdbms instance using the specified properties. + * Creates a new SqlServerRdbms instance using the specified properties. * @param [properties] Properties to set - * @returns MysqlRdbms instance + * @returns SqlServerRdbms instance */ - public static create(properties?: google.cloud.datastream.v1.IMysqlRdbms): google.cloud.datastream.v1.MysqlRdbms; + public static create(properties?: google.cloud.datastream.v1.ISqlServerRdbms): google.cloud.datastream.v1.SqlServerRdbms; /** - * Encodes the specified MysqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. - * @param message MysqlRdbms message or plain object to encode + * Encodes the specified SqlServerRdbms message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerRdbms.verify|verify} messages. + * @param message SqlServerRdbms message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IMysqlRdbms, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ISqlServerRdbms, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MysqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. - * @param message MysqlRdbms message or plain object to encode + * Encodes the specified SqlServerRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerRdbms.verify|verify} messages. + * @param message SqlServerRdbms message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlRdbms, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerRdbms, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MysqlRdbms message from the specified reader or buffer. + * Decodes a SqlServerRdbms message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MysqlRdbms + * @returns SqlServerRdbms * @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.datastream.v1.MysqlRdbms; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.SqlServerRdbms; /** - * Decodes a MysqlRdbms message from the specified reader or buffer, length delimited. + * Decodes a SqlServerRdbms message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MysqlRdbms + * @returns SqlServerRdbms * @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.datastream.v1.MysqlRdbms; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.SqlServerRdbms; /** - * Verifies a MysqlRdbms message. + * Verifies a SqlServerRdbms 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 MysqlRdbms message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerRdbms message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MysqlRdbms + * @returns SqlServerRdbms */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlRdbms; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerRdbms; /** - * Creates a plain object from a MysqlRdbms message. Also converts values to other types if specified. - * @param message MysqlRdbms + * Creates a plain object from a SqlServerRdbms message. Also converts values to other types if specified. + * @param message SqlServerRdbms * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.MysqlRdbms, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.SqlServerRdbms, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MysqlRdbms to JSON. + * Converts this SqlServerRdbms to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MysqlRdbms + * Gets the default type url for SqlServerRdbms * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MysqlSourceConfig. */ - interface IMysqlSourceConfig { + /** Properties of a SqlServerSourceConfig. */ + interface ISqlServerSourceConfig { - /** MysqlSourceConfig includeObjects */ - includeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + /** SqlServerSourceConfig includeObjects */ + includeObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - /** MysqlSourceConfig excludeObjects */ - excludeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + /** SqlServerSourceConfig excludeObjects */ + excludeObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - /** MysqlSourceConfig maxConcurrentCdcTasks */ + /** SqlServerSourceConfig maxConcurrentCdcTasks */ maxConcurrentCdcTasks?: (number|null); - /** MysqlSourceConfig maxConcurrentBackfillTasks */ + /** SqlServerSourceConfig maxConcurrentBackfillTasks */ maxConcurrentBackfillTasks?: (number|null); + + /** SqlServerSourceConfig transactionLogs */ + transactionLogs?: (google.cloud.datastream.v1.ISqlServerTransactionLogs|null); + + /** SqlServerSourceConfig changeTables */ + changeTables?: (google.cloud.datastream.v1.ISqlServerChangeTables|null); } - /** Represents a MysqlSourceConfig. */ - class MysqlSourceConfig implements IMysqlSourceConfig { + /** Represents a SqlServerSourceConfig. */ + class SqlServerSourceConfig implements ISqlServerSourceConfig { /** - * Constructs a new MysqlSourceConfig. + * Constructs a new SqlServerSourceConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IMysqlSourceConfig); + constructor(properties?: google.cloud.datastream.v1.ISqlServerSourceConfig); - /** MysqlSourceConfig includeObjects. */ - public includeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + /** SqlServerSourceConfig includeObjects. */ + public includeObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - /** MysqlSourceConfig excludeObjects. */ - public excludeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + /** SqlServerSourceConfig excludeObjects. */ + public excludeObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); - /** MysqlSourceConfig maxConcurrentCdcTasks. */ + /** SqlServerSourceConfig maxConcurrentCdcTasks. */ public maxConcurrentCdcTasks: number; - /** MysqlSourceConfig maxConcurrentBackfillTasks. */ + /** SqlServerSourceConfig maxConcurrentBackfillTasks. */ public maxConcurrentBackfillTasks: number; + /** SqlServerSourceConfig transactionLogs. */ + public transactionLogs?: (google.cloud.datastream.v1.ISqlServerTransactionLogs|null); + + /** SqlServerSourceConfig changeTables. */ + public changeTables?: (google.cloud.datastream.v1.ISqlServerChangeTables|null); + + /** SqlServerSourceConfig cdcMethod. */ + public cdcMethod?: ("transactionLogs"|"changeTables"); + /** - * Creates a new MysqlSourceConfig instance using the specified properties. + * Creates a new SqlServerSourceConfig instance using the specified properties. * @param [properties] Properties to set - * @returns MysqlSourceConfig instance + * @returns SqlServerSourceConfig instance */ - public static create(properties?: google.cloud.datastream.v1.IMysqlSourceConfig): google.cloud.datastream.v1.MysqlSourceConfig; + public static create(properties?: google.cloud.datastream.v1.ISqlServerSourceConfig): google.cloud.datastream.v1.SqlServerSourceConfig; /** - * Encodes the specified MysqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. - * @param message MysqlSourceConfig message or plain object to encode + * Encodes the specified SqlServerSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSourceConfig.verify|verify} messages. + * @param message SqlServerSourceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IMysqlSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ISqlServerSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MysqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. - * @param message MysqlSourceConfig message or plain object to encode + * Encodes the specified SqlServerSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSourceConfig.verify|verify} messages. + * @param message SqlServerSourceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer. + * Decodes a SqlServerSourceConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MysqlSourceConfig + * @returns SqlServerSourceConfig * @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.datastream.v1.MysqlSourceConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.SqlServerSourceConfig; /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer, length delimited. + * Decodes a SqlServerSourceConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MysqlSourceConfig + * @returns SqlServerSourceConfig * @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.datastream.v1.MysqlSourceConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.SqlServerSourceConfig; /** - * Verifies a MysqlSourceConfig message. + * Verifies a SqlServerSourceConfig 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 MysqlSourceConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerSourceConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MysqlSourceConfig + * @returns SqlServerSourceConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlSourceConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerSourceConfig; /** - * Creates a plain object from a MysqlSourceConfig message. Also converts values to other types if specified. - * @param message MysqlSourceConfig + * Creates a plain object from a SqlServerSourceConfig message. Also converts values to other types if specified. + * @param message SqlServerSourceConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.MysqlSourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.SqlServerSourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MysqlSourceConfig to JSON. + * Converts this SqlServerSourceConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MysqlSourceConfig + * Gets the default type url for SqlServerSourceConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SourceConfig. */ - interface ISourceConfig { - - /** SourceConfig sourceConnectionProfile */ - sourceConnectionProfile?: (string|null); - - /** SourceConfig oracleSourceConfig */ - oracleSourceConfig?: (google.cloud.datastream.v1.IOracleSourceConfig|null); - - /** SourceConfig mysqlSourceConfig */ - mysqlSourceConfig?: (google.cloud.datastream.v1.IMysqlSourceConfig|null); - - /** SourceConfig postgresqlSourceConfig */ - postgresqlSourceConfig?: (google.cloud.datastream.v1.IPostgresqlSourceConfig|null); + /** Properties of a SqlServerTransactionLogs. */ + interface ISqlServerTransactionLogs { } - /** Represents a SourceConfig. */ - class SourceConfig implements ISourceConfig { + /** Represents a SqlServerTransactionLogs. */ + class SqlServerTransactionLogs implements ISqlServerTransactionLogs { /** - * Constructs a new SourceConfig. + * Constructs a new SqlServerTransactionLogs. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.ISourceConfig); - - /** SourceConfig sourceConnectionProfile. */ - public sourceConnectionProfile: string; - - /** SourceConfig oracleSourceConfig. */ - public oracleSourceConfig?: (google.cloud.datastream.v1.IOracleSourceConfig|null); - - /** SourceConfig mysqlSourceConfig. */ - public mysqlSourceConfig?: (google.cloud.datastream.v1.IMysqlSourceConfig|null); - - /** SourceConfig postgresqlSourceConfig. */ - public postgresqlSourceConfig?: (google.cloud.datastream.v1.IPostgresqlSourceConfig|null); - - /** SourceConfig sourceStreamConfig. */ - public sourceStreamConfig?: ("oracleSourceConfig"|"mysqlSourceConfig"|"postgresqlSourceConfig"); + constructor(properties?: google.cloud.datastream.v1.ISqlServerTransactionLogs); /** - * Creates a new SourceConfig instance using the specified properties. + * Creates a new SqlServerTransactionLogs instance using the specified properties. * @param [properties] Properties to set - * @returns SourceConfig instance + * @returns SqlServerTransactionLogs instance */ - public static create(properties?: google.cloud.datastream.v1.ISourceConfig): google.cloud.datastream.v1.SourceConfig; + public static create(properties?: google.cloud.datastream.v1.ISqlServerTransactionLogs): google.cloud.datastream.v1.SqlServerTransactionLogs; /** - * Encodes the specified SourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. - * @param message SourceConfig message or plain object to encode + * Encodes the specified SqlServerTransactionLogs message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTransactionLogs.verify|verify} messages. + * @param message SqlServerTransactionLogs message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.ISourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ISqlServerTransactionLogs, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. - * @param message SourceConfig message or plain object to encode + * Encodes the specified SqlServerTransactionLogs message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTransactionLogs.verify|verify} messages. + * @param message SqlServerTransactionLogs message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerTransactionLogs, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceConfig message from the specified reader or buffer. + * Decodes a SqlServerTransactionLogs message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceConfig + * @returns SqlServerTransactionLogs * @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.datastream.v1.SourceConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.SqlServerTransactionLogs; /** - * Decodes a SourceConfig message from the specified reader or buffer, length delimited. + * Decodes a SqlServerTransactionLogs message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceConfig + * @returns SqlServerTransactionLogs * @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.datastream.v1.SourceConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.SqlServerTransactionLogs; /** - * Verifies a SourceConfig message. + * Verifies a SqlServerTransactionLogs 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 SourceConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerTransactionLogs message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceConfig + * @returns SqlServerTransactionLogs */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerTransactionLogs; /** - * Creates a plain object from a SourceConfig message. Also converts values to other types if specified. - * @param message SourceConfig + * Creates a plain object from a SqlServerTransactionLogs message. Also converts values to other types if specified. + * @param message SqlServerTransactionLogs * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.SourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.SqlServerTransactionLogs, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceConfig to JSON. + * Converts this SqlServerTransactionLogs to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SourceConfig + * Gets the default type url for SqlServerTransactionLogs * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AvroFileFormat. */ - interface IAvroFileFormat { + /** Properties of a SqlServerChangeTables. */ + interface ISqlServerChangeTables { } - /** Represents an AvroFileFormat. */ - class AvroFileFormat implements IAvroFileFormat { + /** Represents a SqlServerChangeTables. */ + class SqlServerChangeTables implements ISqlServerChangeTables { /** - * Constructs a new AvroFileFormat. + * Constructs a new SqlServerChangeTables. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IAvroFileFormat); + constructor(properties?: google.cloud.datastream.v1.ISqlServerChangeTables); /** - * Creates a new AvroFileFormat instance using the specified properties. + * Creates a new SqlServerChangeTables instance using the specified properties. * @param [properties] Properties to set - * @returns AvroFileFormat instance + * @returns SqlServerChangeTables instance */ - public static create(properties?: google.cloud.datastream.v1.IAvroFileFormat): google.cloud.datastream.v1.AvroFileFormat; + public static create(properties?: google.cloud.datastream.v1.ISqlServerChangeTables): google.cloud.datastream.v1.SqlServerChangeTables; /** - * Encodes the specified AvroFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. - * @param message AvroFileFormat message or plain object to encode + * Encodes the specified SqlServerChangeTables message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerChangeTables.verify|verify} messages. + * @param message SqlServerChangeTables message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IAvroFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ISqlServerChangeTables, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AvroFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. - * @param message AvroFileFormat message or plain object to encode + * Encodes the specified SqlServerChangeTables message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerChangeTables.verify|verify} messages. + * @param message SqlServerChangeTables message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IAvroFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerChangeTables, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AvroFileFormat message from the specified reader or buffer. + * Decodes a SqlServerChangeTables message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AvroFileFormat + * @returns SqlServerChangeTables * @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.datastream.v1.AvroFileFormat; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.SqlServerChangeTables; /** - * Decodes an AvroFileFormat message from the specified reader or buffer, length delimited. + * Decodes a SqlServerChangeTables message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AvroFileFormat + * @returns SqlServerChangeTables * @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.datastream.v1.AvroFileFormat; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.SqlServerChangeTables; /** - * Verifies an AvroFileFormat message. + * Verifies a SqlServerChangeTables 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 AvroFileFormat message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerChangeTables message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AvroFileFormat + * @returns SqlServerChangeTables */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.AvroFileFormat; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerChangeTables; /** - * Creates a plain object from an AvroFileFormat message. Also converts values to other types if specified. - * @param message AvroFileFormat + * Creates a plain object from a SqlServerChangeTables message. Also converts values to other types if specified. + * @param message SqlServerChangeTables * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.AvroFileFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.SqlServerChangeTables, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AvroFileFormat to JSON. + * Converts this SqlServerChangeTables to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AvroFileFormat + * Gets the default type url for SqlServerChangeTables * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a JsonFileFormat. */ - interface IJsonFileFormat { + /** Properties of a MysqlColumn. */ + interface IMysqlColumn { - /** JsonFileFormat schemaFileFormat */ - schemaFileFormat?: (google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|keyof typeof google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|null); + /** MysqlColumn column */ + column?: (string|null); - /** JsonFileFormat compression */ - compression?: (google.cloud.datastream.v1.JsonFileFormat.JsonCompression|keyof typeof google.cloud.datastream.v1.JsonFileFormat.JsonCompression|null); + /** MysqlColumn dataType */ + dataType?: (string|null); + + /** MysqlColumn length */ + length?: (number|null); + + /** MysqlColumn collation */ + collation?: (string|null); + + /** MysqlColumn primaryKey */ + primaryKey?: (boolean|null); + + /** MysqlColumn nullable */ + nullable?: (boolean|null); + + /** MysqlColumn ordinalPosition */ + ordinalPosition?: (number|null); + + /** MysqlColumn precision */ + precision?: (number|null); + + /** MysqlColumn scale */ + scale?: (number|null); } - /** Represents a JsonFileFormat. */ - class JsonFileFormat implements IJsonFileFormat { + /** Represents a MysqlColumn. */ + class MysqlColumn implements IMysqlColumn { /** - * Constructs a new JsonFileFormat. + * Constructs a new MysqlColumn. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IJsonFileFormat); + constructor(properties?: google.cloud.datastream.v1.IMysqlColumn); - /** JsonFileFormat schemaFileFormat. */ - public schemaFileFormat: (google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|keyof typeof google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat); + /** MysqlColumn column. */ + public column: string; - /** JsonFileFormat compression. */ - public compression: (google.cloud.datastream.v1.JsonFileFormat.JsonCompression|keyof typeof google.cloud.datastream.v1.JsonFileFormat.JsonCompression); + /** MysqlColumn dataType. */ + public dataType: string; + + /** MysqlColumn length. */ + public length: number; + + /** MysqlColumn collation. */ + public collation: string; + + /** MysqlColumn primaryKey. */ + public primaryKey: boolean; + + /** MysqlColumn nullable. */ + public nullable: boolean; + + /** MysqlColumn ordinalPosition. */ + public ordinalPosition: number; + + /** MysqlColumn precision. */ + public precision: number; + + /** MysqlColumn scale. */ + public scale: number; /** - * Creates a new JsonFileFormat instance using the specified properties. + * Creates a new MysqlColumn instance using the specified properties. * @param [properties] Properties to set - * @returns JsonFileFormat instance + * @returns MysqlColumn instance */ - public static create(properties?: google.cloud.datastream.v1.IJsonFileFormat): google.cloud.datastream.v1.JsonFileFormat; + public static create(properties?: google.cloud.datastream.v1.IMysqlColumn): google.cloud.datastream.v1.MysqlColumn; /** - * Encodes the specified JsonFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. - * @param message JsonFileFormat message or plain object to encode + * Encodes the specified MysqlColumn message. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. + * @param message MysqlColumn message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IJsonFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.IMysqlColumn, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified JsonFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. - * @param message JsonFileFormat message or plain object to encode + * Encodes the specified MysqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. + * @param message MysqlColumn message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IJsonFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlColumn, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a JsonFileFormat message from the specified reader or buffer. + * Decodes a MysqlColumn message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns JsonFileFormat + * @returns MysqlColumn * @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.datastream.v1.JsonFileFormat; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.MysqlColumn; /** - * Decodes a JsonFileFormat message from the specified reader or buffer, length delimited. + * Decodes a MysqlColumn message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns JsonFileFormat + * @returns MysqlColumn * @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.datastream.v1.JsonFileFormat; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.MysqlColumn; /** - * Verifies a JsonFileFormat message. + * Verifies a MysqlColumn 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 JsonFileFormat message from a plain object. Also converts values to their respective internal types. + * Creates a MysqlColumn message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns JsonFileFormat + * @returns MysqlColumn */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.JsonFileFormat; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlColumn; /** - * Creates a plain object from a JsonFileFormat message. Also converts values to other types if specified. - * @param message JsonFileFormat + * Creates a plain object from a MysqlColumn message. Also converts values to other types if specified. + * @param message MysqlColumn * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.JsonFileFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.MysqlColumn, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this JsonFileFormat to JSON. + * Converts this MysqlColumn to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for JsonFileFormat + * Gets the default type url for MysqlColumn * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace JsonFileFormat { - - /** SchemaFileFormat enum. */ - enum SchemaFileFormat { - SCHEMA_FILE_FORMAT_UNSPECIFIED = 0, - NO_SCHEMA_FILE = 1, - AVRO_SCHEMA_FILE = 2 - } - - /** JsonCompression enum. */ - enum JsonCompression { - JSON_COMPRESSION_UNSPECIFIED = 0, - NO_COMPRESSION = 1, - GZIP = 2 - } - } - - /** Properties of a GcsDestinationConfig. */ - interface IGcsDestinationConfig { - - /** GcsDestinationConfig path */ - path?: (string|null); - - /** GcsDestinationConfig fileRotationMb */ - fileRotationMb?: (number|null); - - /** GcsDestinationConfig fileRotationInterval */ - fileRotationInterval?: (google.protobuf.IDuration|null); + /** Properties of a MysqlTable. */ + interface IMysqlTable { - /** GcsDestinationConfig avroFileFormat */ - avroFileFormat?: (google.cloud.datastream.v1.IAvroFileFormat|null); + /** MysqlTable table */ + table?: (string|null); - /** GcsDestinationConfig jsonFileFormat */ - jsonFileFormat?: (google.cloud.datastream.v1.IJsonFileFormat|null); + /** MysqlTable mysqlColumns */ + mysqlColumns?: (google.cloud.datastream.v1.IMysqlColumn[]|null); } - /** Represents a GcsDestinationConfig. */ - class GcsDestinationConfig implements IGcsDestinationConfig { + /** Represents a MysqlTable. */ + class MysqlTable implements IMysqlTable { /** - * Constructs a new GcsDestinationConfig. + * Constructs a new MysqlTable. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IGcsDestinationConfig); - - /** GcsDestinationConfig path. */ - public path: string; - - /** GcsDestinationConfig fileRotationMb. */ - public fileRotationMb: number; - - /** GcsDestinationConfig fileRotationInterval. */ - public fileRotationInterval?: (google.protobuf.IDuration|null); - - /** GcsDestinationConfig avroFileFormat. */ - public avroFileFormat?: (google.cloud.datastream.v1.IAvroFileFormat|null); + constructor(properties?: google.cloud.datastream.v1.IMysqlTable); - /** GcsDestinationConfig jsonFileFormat. */ - public jsonFileFormat?: (google.cloud.datastream.v1.IJsonFileFormat|null); + /** MysqlTable table. */ + public table: string; - /** GcsDestinationConfig fileFormat. */ - public fileFormat?: ("avroFileFormat"|"jsonFileFormat"); + /** MysqlTable mysqlColumns. */ + public mysqlColumns: google.cloud.datastream.v1.IMysqlColumn[]; /** - * Creates a new GcsDestinationConfig instance using the specified properties. + * Creates a new MysqlTable instance using the specified properties. * @param [properties] Properties to set - * @returns GcsDestinationConfig instance + * @returns MysqlTable instance */ - public static create(properties?: google.cloud.datastream.v1.IGcsDestinationConfig): google.cloud.datastream.v1.GcsDestinationConfig; + public static create(properties?: google.cloud.datastream.v1.IMysqlTable): google.cloud.datastream.v1.MysqlTable; /** - * Encodes the specified GcsDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. - * @param message GcsDestinationConfig message or plain object to encode + * Encodes the specified MysqlTable message. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. + * @param message MysqlTable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IGcsDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.IMysqlTable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. - * @param message GcsDestinationConfig message or plain object to encode + * Encodes the specified MysqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. + * @param message MysqlTable message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IGcsDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlTable, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer. + * Decodes a MysqlTable message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsDestinationConfig + * @returns MysqlTable * @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.datastream.v1.GcsDestinationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.MysqlTable; /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer, length delimited. + * Decodes a MysqlTable message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsDestinationConfig + * @returns MysqlTable * @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.datastream.v1.GcsDestinationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.MysqlTable; /** - * Verifies a GcsDestinationConfig message. + * Verifies a MysqlTable 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 GcsDestinationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a MysqlTable message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsDestinationConfig + * @returns MysqlTable */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GcsDestinationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlTable; /** - * Creates a plain object from a GcsDestinationConfig message. Also converts values to other types if specified. - * @param message GcsDestinationConfig + * Creates a plain object from a MysqlTable message. Also converts values to other types if specified. + * @param message MysqlTable * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.GcsDestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.MysqlTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsDestinationConfig to JSON. + * Converts this MysqlTable to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GcsDestinationConfig + * Gets the default type url for MysqlTable * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BigQueryDestinationConfig. */ - interface IBigQueryDestinationConfig { - - /** BigQueryDestinationConfig singleTargetDataset */ - singleTargetDataset?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null); + /** Properties of a MysqlDatabase. */ + interface IMysqlDatabase { - /** BigQueryDestinationConfig sourceHierarchyDatasets */ - sourceHierarchyDatasets?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null); + /** MysqlDatabase database */ + database?: (string|null); - /** BigQueryDestinationConfig dataFreshness */ - dataFreshness?: (google.protobuf.IDuration|null); + /** MysqlDatabase mysqlTables */ + mysqlTables?: (google.cloud.datastream.v1.IMysqlTable[]|null); } - /** Represents a BigQueryDestinationConfig. */ - class BigQueryDestinationConfig implements IBigQueryDestinationConfig { + /** Represents a MysqlDatabase. */ + class MysqlDatabase implements IMysqlDatabase { /** - * Constructs a new BigQueryDestinationConfig. + * Constructs a new MysqlDatabase. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IBigQueryDestinationConfig); - - /** BigQueryDestinationConfig singleTargetDataset. */ - public singleTargetDataset?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null); - - /** BigQueryDestinationConfig sourceHierarchyDatasets. */ - public sourceHierarchyDatasets?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null); + constructor(properties?: google.cloud.datastream.v1.IMysqlDatabase); - /** BigQueryDestinationConfig dataFreshness. */ - public dataFreshness?: (google.protobuf.IDuration|null); + /** MysqlDatabase database. */ + public database: string; - /** BigQueryDestinationConfig datasetConfig. */ - public datasetConfig?: ("singleTargetDataset"|"sourceHierarchyDatasets"); + /** MysqlDatabase mysqlTables. */ + public mysqlTables: google.cloud.datastream.v1.IMysqlTable[]; /** - * Creates a new BigQueryDestinationConfig instance using the specified properties. + * Creates a new MysqlDatabase instance using the specified properties. * @param [properties] Properties to set - * @returns BigQueryDestinationConfig instance + * @returns MysqlDatabase instance */ - public static create(properties?: google.cloud.datastream.v1.IBigQueryDestinationConfig): google.cloud.datastream.v1.BigQueryDestinationConfig; + public static create(properties?: google.cloud.datastream.v1.IMysqlDatabase): google.cloud.datastream.v1.MysqlDatabase; /** - * Encodes the specified BigQueryDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. - * @param message BigQueryDestinationConfig message or plain object to encode + * Encodes the specified MysqlDatabase message. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. + * @param message MysqlDatabase message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IBigQueryDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.IMysqlDatabase, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQueryDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. - * @param message BigQueryDestinationConfig message or plain object to encode + * Encodes the specified MysqlDatabase message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. + * @param message MysqlDatabase message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IBigQueryDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlDatabase, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQueryDestinationConfig message from the specified reader or buffer. + * Decodes a MysqlDatabase message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQueryDestinationConfig + * @returns MysqlDatabase * @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.datastream.v1.BigQueryDestinationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.MysqlDatabase; /** - * Decodes a BigQueryDestinationConfig message from the specified reader or buffer, length delimited. + * Decodes a MysqlDatabase message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQueryDestinationConfig + * @returns MysqlDatabase * @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.datastream.v1.BigQueryDestinationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.MysqlDatabase; /** - * Verifies a BigQueryDestinationConfig message. + * Verifies a MysqlDatabase 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 BigQueryDestinationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a MysqlDatabase message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQueryDestinationConfig + * @returns MysqlDatabase */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlDatabase; /** - * Creates a plain object from a BigQueryDestinationConfig message. Also converts values to other types if specified. - * @param message BigQueryDestinationConfig + * Creates a plain object from a MysqlDatabase message. Also converts values to other types if specified. + * @param message MysqlDatabase * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.MysqlDatabase, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQueryDestinationConfig to JSON. + * Converts this MysqlDatabase to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BigQueryDestinationConfig + * Gets the default type url for MysqlDatabase * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace BigQueryDestinationConfig { + /** Properties of a MysqlRdbms. */ + interface IMysqlRdbms { - /** Properties of a SingleTargetDataset. */ - interface ISingleTargetDataset { + /** MysqlRdbms mysqlDatabases */ + mysqlDatabases?: (google.cloud.datastream.v1.IMysqlDatabase[]|null); + } - /** SingleTargetDataset datasetId */ - datasetId?: (string|null); - } + /** Represents a MysqlRdbms. */ + class MysqlRdbms implements IMysqlRdbms { - /** Represents a SingleTargetDataset. */ - class SingleTargetDataset implements ISingleTargetDataset { + /** + * Constructs a new MysqlRdbms. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IMysqlRdbms); - /** - * Constructs a new SingleTargetDataset. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset); + /** MysqlRdbms mysqlDatabases. */ + public mysqlDatabases: google.cloud.datastream.v1.IMysqlDatabase[]; - /** SingleTargetDataset datasetId. */ - public datasetId: string; + /** + * Creates a new MysqlRdbms instance using the specified properties. + * @param [properties] Properties to set + * @returns MysqlRdbms instance + */ + public static create(properties?: google.cloud.datastream.v1.IMysqlRdbms): google.cloud.datastream.v1.MysqlRdbms; - /** - * Creates a new SingleTargetDataset instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleTargetDataset instance - */ - public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset): google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; + /** + * Encodes the specified MysqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. + * @param message MysqlRdbms message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IMysqlRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified SingleTargetDataset message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. - * @param message SingleTargetDataset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified MysqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. + * @param message MysqlRdbms message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlRdbms, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified SingleTargetDataset message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. - * @param message SingleTargetDataset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a MysqlRdbms message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MysqlRdbms + * @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.datastream.v1.MysqlRdbms; - /** - * Decodes a SingleTargetDataset message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleTargetDataset - * @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.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; + /** + * Decodes a MysqlRdbms message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MysqlRdbms + * @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.datastream.v1.MysqlRdbms; - /** - * Decodes a SingleTargetDataset message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleTargetDataset - * @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.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; + /** + * Verifies a MysqlRdbms 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); - /** - * Verifies a SingleTargetDataset 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 MysqlRdbms message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MysqlRdbms + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlRdbms; - /** - * Creates a SingleTargetDataset message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleTargetDataset - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; + /** + * Creates a plain object from a MysqlRdbms message. Also converts values to other types if specified. + * @param message MysqlRdbms + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.MysqlRdbms, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a SingleTargetDataset message. Also converts values to other types if specified. - * @param message SingleTargetDataset - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this MysqlRdbms to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this SingleTargetDataset to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for MysqlRdbms + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for SingleTargetDataset - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a MysqlSourceConfig. */ + interface IMysqlSourceConfig { - /** Properties of a SourceHierarchyDatasets. */ - interface ISourceHierarchyDatasets { + /** MysqlSourceConfig includeObjects */ + includeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); - /** SourceHierarchyDatasets datasetTemplate */ - datasetTemplate?: (google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null); + /** MysqlSourceConfig excludeObjects */ + excludeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + + /** MysqlSourceConfig maxConcurrentCdcTasks */ + maxConcurrentCdcTasks?: (number|null); + + /** MysqlSourceConfig maxConcurrentBackfillTasks */ + maxConcurrentBackfillTasks?: (number|null); + + /** MysqlSourceConfig binaryLogPosition */ + binaryLogPosition?: (google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition|null); + + /** MysqlSourceConfig gtid */ + gtid?: (google.cloud.datastream.v1.MysqlSourceConfig.IGtid|null); + } + + /** Represents a MysqlSourceConfig. */ + class MysqlSourceConfig implements IMysqlSourceConfig { + + /** + * Constructs a new MysqlSourceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IMysqlSourceConfig); + + /** MysqlSourceConfig includeObjects. */ + public includeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + + /** MysqlSourceConfig excludeObjects. */ + public excludeObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + + /** MysqlSourceConfig maxConcurrentCdcTasks. */ + public maxConcurrentCdcTasks: number; + + /** MysqlSourceConfig maxConcurrentBackfillTasks. */ + public maxConcurrentBackfillTasks: number; + + /** MysqlSourceConfig binaryLogPosition. */ + public binaryLogPosition?: (google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition|null); + + /** MysqlSourceConfig gtid. */ + public gtid?: (google.cloud.datastream.v1.MysqlSourceConfig.IGtid|null); + + /** MysqlSourceConfig cdcMethod. */ + public cdcMethod?: ("binaryLogPosition"|"gtid"); + + /** + * Creates a new MysqlSourceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MysqlSourceConfig instance + */ + public static create(properties?: google.cloud.datastream.v1.IMysqlSourceConfig): google.cloud.datastream.v1.MysqlSourceConfig; + + /** + * Encodes the specified MysqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. + * @param message MysqlSourceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IMysqlSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MysqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. + * @param message MysqlSourceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlSourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MysqlSourceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MysqlSourceConfig + * @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.datastream.v1.MysqlSourceConfig; + + /** + * Decodes a MysqlSourceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MysqlSourceConfig + * @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.datastream.v1.MysqlSourceConfig; + + /** + * Verifies a MysqlSourceConfig 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 MysqlSourceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MysqlSourceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlSourceConfig; + + /** + * Creates a plain object from a MysqlSourceConfig message. Also converts values to other types if specified. + * @param message MysqlSourceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.MysqlSourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MysqlSourceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MysqlSourceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MysqlSourceConfig { + + /** Properties of a BinaryLogPosition. */ + interface IBinaryLogPosition { } - /** Represents a SourceHierarchyDatasets. */ - class SourceHierarchyDatasets implements ISourceHierarchyDatasets { + /** Represents a BinaryLogPosition. */ + class BinaryLogPosition implements IBinaryLogPosition { /** - * Constructs a new SourceHierarchyDatasets. + * Constructs a new BinaryLogPosition. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets); - - /** SourceHierarchyDatasets datasetTemplate. */ - public datasetTemplate?: (google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null); + constructor(properties?: google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition); /** - * Creates a new SourceHierarchyDatasets instance using the specified properties. + * Creates a new BinaryLogPosition instance using the specified properties. * @param [properties] Properties to set - * @returns SourceHierarchyDatasets instance + * @returns BinaryLogPosition instance */ - public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; + public static create(properties?: google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition): google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition; /** - * Encodes the specified SourceHierarchyDatasets message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. - * @param message SourceHierarchyDatasets message or plain object to encode + * Encodes the specified BinaryLogPosition message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.verify|verify} messages. + * @param message BinaryLogPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceHierarchyDatasets message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. - * @param message SourceHierarchyDatasets message or plain object to encode + * Encodes the specified BinaryLogPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.verify|verify} messages. + * @param message BinaryLogPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceHierarchyDatasets message from the specified reader or buffer. + * Decodes a BinaryLogPosition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceHierarchyDatasets + * @returns BinaryLogPosition * @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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition; /** - * Decodes a SourceHierarchyDatasets message from the specified reader or buffer, length delimited. + * Decodes a BinaryLogPosition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceHierarchyDatasets + * @returns BinaryLogPosition * @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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition; /** - * Verifies a SourceHierarchyDatasets message. + * Verifies a BinaryLogPosition 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 SourceHierarchyDatasets message from a plain object. Also converts values to their respective internal types. + * Creates a BinaryLogPosition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceHierarchyDatasets + * @returns BinaryLogPosition */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition; /** - * Creates a plain object from a SourceHierarchyDatasets message. Also converts values to other types if specified. - * @param message SourceHierarchyDatasets + * Creates a plain object from a BinaryLogPosition message. Also converts values to other types if specified. + * @param message BinaryLogPosition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceHierarchyDatasets to JSON. + * Converts this BinaryLogPosition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SourceHierarchyDatasets + * Gets the default type url for BinaryLogPosition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SourceHierarchyDatasets { - - /** Properties of a DatasetTemplate. */ - interface IDatasetTemplate { + /** Properties of a Gtid. */ + interface IGtid { + } - /** DatasetTemplate location */ - location?: (string|null); + /** Represents a Gtid. */ + class Gtid implements IGtid { - /** DatasetTemplate datasetIdPrefix */ - datasetIdPrefix?: (string|null); + /** + * Constructs a new Gtid. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.MysqlSourceConfig.IGtid); - /** DatasetTemplate kmsKeyName */ - kmsKeyName?: (string|null); - } + /** + * Creates a new Gtid instance using the specified properties. + * @param [properties] Properties to set + * @returns Gtid instance + */ + public static create(properties?: google.cloud.datastream.v1.MysqlSourceConfig.IGtid): google.cloud.datastream.v1.MysqlSourceConfig.Gtid; - /** Represents a DatasetTemplate. */ - class DatasetTemplate implements IDatasetTemplate { + /** + * Encodes the specified Gtid message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.Gtid.verify|verify} messages. + * @param message Gtid message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.MysqlSourceConfig.IGtid, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new DatasetTemplate. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate); + /** + * Encodes the specified Gtid message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.Gtid.verify|verify} messages. + * @param message Gtid message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.MysqlSourceConfig.IGtid, writer?: $protobuf.Writer): $protobuf.Writer; - /** DatasetTemplate location. */ - public location: string; + /** + * Decodes a Gtid message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Gtid + * @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.datastream.v1.MysqlSourceConfig.Gtid; - /** DatasetTemplate datasetIdPrefix. */ - public datasetIdPrefix: string; + /** + * Decodes a Gtid message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Gtid + * @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.datastream.v1.MysqlSourceConfig.Gtid; - /** DatasetTemplate kmsKeyName. */ - public kmsKeyName: string; + /** + * Verifies a Gtid 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 new DatasetTemplate instance using the specified properties. - * @param [properties] Properties to set - * @returns DatasetTemplate instance - */ - public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; + /** + * Creates a Gtid message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Gtid + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlSourceConfig.Gtid; - /** - * Encodes the specified DatasetTemplate message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. - * @param message DatasetTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a Gtid message. Also converts values to other types if specified. + * @param message Gtid + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.MysqlSourceConfig.Gtid, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified DatasetTemplate message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. - * @param message DatasetTemplate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Gtid to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a DatasetTemplate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatasetTemplate - * @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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; - - /** - * Decodes a DatasetTemplate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatasetTemplate - * @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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; - - /** - * Verifies a DatasetTemplate 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 DatasetTemplate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatasetTemplate - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; - - /** - * Creates a plain object from a DatasetTemplate message. Also converts values to other types if specified. - * @param message DatasetTemplate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatasetTemplate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatasetTemplate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for Gtid + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } - /** Properties of a DestinationConfig. */ - interface IDestinationConfig { + /** Properties of a SourceConfig. */ + interface ISourceConfig { - /** DestinationConfig destinationConnectionProfile */ - destinationConnectionProfile?: (string|null); + /** SourceConfig sourceConnectionProfile */ + sourceConnectionProfile?: (string|null); - /** DestinationConfig gcsDestinationConfig */ - gcsDestinationConfig?: (google.cloud.datastream.v1.IGcsDestinationConfig|null); + /** SourceConfig oracleSourceConfig */ + oracleSourceConfig?: (google.cloud.datastream.v1.IOracleSourceConfig|null); - /** DestinationConfig bigqueryDestinationConfig */ - bigqueryDestinationConfig?: (google.cloud.datastream.v1.IBigQueryDestinationConfig|null); + /** SourceConfig mysqlSourceConfig */ + mysqlSourceConfig?: (google.cloud.datastream.v1.IMysqlSourceConfig|null); + + /** SourceConfig postgresqlSourceConfig */ + postgresqlSourceConfig?: (google.cloud.datastream.v1.IPostgresqlSourceConfig|null); + + /** SourceConfig sqlServerSourceConfig */ + sqlServerSourceConfig?: (google.cloud.datastream.v1.ISqlServerSourceConfig|null); } - /** Represents a DestinationConfig. */ - class DestinationConfig implements IDestinationConfig { + /** Represents a SourceConfig. */ + class SourceConfig implements ISourceConfig { /** - * Constructs a new DestinationConfig. + * Constructs a new SourceConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IDestinationConfig); + constructor(properties?: google.cloud.datastream.v1.ISourceConfig); - /** DestinationConfig destinationConnectionProfile. */ - public destinationConnectionProfile: string; + /** SourceConfig sourceConnectionProfile. */ + public sourceConnectionProfile: string; - /** DestinationConfig gcsDestinationConfig. */ - public gcsDestinationConfig?: (google.cloud.datastream.v1.IGcsDestinationConfig|null); + /** SourceConfig oracleSourceConfig. */ + public oracleSourceConfig?: (google.cloud.datastream.v1.IOracleSourceConfig|null); - /** DestinationConfig bigqueryDestinationConfig. */ - public bigqueryDestinationConfig?: (google.cloud.datastream.v1.IBigQueryDestinationConfig|null); + /** SourceConfig mysqlSourceConfig. */ + public mysqlSourceConfig?: (google.cloud.datastream.v1.IMysqlSourceConfig|null); - /** DestinationConfig destinationStreamConfig. */ - public destinationStreamConfig?: ("gcsDestinationConfig"|"bigqueryDestinationConfig"); + /** SourceConfig postgresqlSourceConfig. */ + public postgresqlSourceConfig?: (google.cloud.datastream.v1.IPostgresqlSourceConfig|null); + + /** SourceConfig sqlServerSourceConfig. */ + public sqlServerSourceConfig?: (google.cloud.datastream.v1.ISqlServerSourceConfig|null); + + /** SourceConfig sourceStreamConfig. */ + public sourceStreamConfig?: ("oracleSourceConfig"|"mysqlSourceConfig"|"postgresqlSourceConfig"|"sqlServerSourceConfig"); /** - * Creates a new DestinationConfig instance using the specified properties. + * Creates a new SourceConfig instance using the specified properties. * @param [properties] Properties to set - * @returns DestinationConfig instance + * @returns SourceConfig instance */ - public static create(properties?: google.cloud.datastream.v1.IDestinationConfig): google.cloud.datastream.v1.DestinationConfig; + public static create(properties?: google.cloud.datastream.v1.ISourceConfig): google.cloud.datastream.v1.SourceConfig; /** - * Encodes the specified DestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. - * @param message DestinationConfig message or plain object to encode + * Encodes the specified SourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. + * @param message SourceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ISourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. - * @param message DestinationConfig message or plain object to encode + * Encodes the specified SourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. + * @param message SourceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ISourceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DestinationConfig message from the specified reader or buffer. + * Decodes a SourceConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DestinationConfig + * @returns SourceConfig * @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.datastream.v1.DestinationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.SourceConfig; /** - * Decodes a DestinationConfig message from the specified reader or buffer, length delimited. + * Decodes a SourceConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DestinationConfig + * @returns SourceConfig * @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.datastream.v1.DestinationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.SourceConfig; /** - * Verifies a DestinationConfig message. + * Verifies a SourceConfig 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 DestinationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SourceConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DestinationConfig + * @returns SourceConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.DestinationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceConfig; /** - * Creates a plain object from a DestinationConfig message. Also converts values to other types if specified. - * @param message DestinationConfig + * Creates a plain object from a SourceConfig message. Also converts values to other types if specified. + * @param message SourceConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.DestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.SourceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DestinationConfig to JSON. + * Converts this SourceConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DestinationConfig + * Gets the default type url for SourceConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Stream. */ - interface IStream { - - /** Stream name */ - name?: (string|null); - - /** Stream createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Stream updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Stream labels */ - labels?: ({ [k: string]: string }|null); - - /** Stream displayName */ - displayName?: (string|null); - - /** Stream sourceConfig */ - sourceConfig?: (google.cloud.datastream.v1.ISourceConfig|null); - - /** Stream destinationConfig */ - destinationConfig?: (google.cloud.datastream.v1.IDestinationConfig|null); - - /** Stream state */ - state?: (google.cloud.datastream.v1.Stream.State|keyof typeof google.cloud.datastream.v1.Stream.State|null); - - /** Stream backfillAll */ - backfillAll?: (google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null); - - /** Stream backfillNone */ - backfillNone?: (google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null); - - /** Stream errors */ - errors?: (google.cloud.datastream.v1.IError[]|null); - - /** Stream customerManagedEncryptionKey */ - customerManagedEncryptionKey?: (string|null); + /** Properties of an AvroFileFormat. */ + interface IAvroFileFormat { } - /** Represents a Stream. */ - class Stream implements IStream { + /** Represents an AvroFileFormat. */ + class AvroFileFormat implements IAvroFileFormat { /** - * Constructs a new Stream. + * Constructs a new AvroFileFormat. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IStream); - - /** Stream name. */ - public name: string; - - /** Stream createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Stream updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Stream labels. */ - public labels: { [k: string]: string }; - - /** Stream displayName. */ - public displayName: string; - - /** Stream sourceConfig. */ - public sourceConfig?: (google.cloud.datastream.v1.ISourceConfig|null); - - /** Stream destinationConfig. */ - public destinationConfig?: (google.cloud.datastream.v1.IDestinationConfig|null); - - /** Stream state. */ - public state: (google.cloud.datastream.v1.Stream.State|keyof typeof google.cloud.datastream.v1.Stream.State); - - /** Stream backfillAll. */ - public backfillAll?: (google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null); - - /** Stream backfillNone. */ - public backfillNone?: (google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null); - - /** Stream errors. */ - public errors: google.cloud.datastream.v1.IError[]; - - /** Stream customerManagedEncryptionKey. */ - public customerManagedEncryptionKey?: (string|null); - - /** Stream backfillStrategy. */ - public backfillStrategy?: ("backfillAll"|"backfillNone"); - - /** Stream _customerManagedEncryptionKey. */ - public _customerManagedEncryptionKey?: "customerManagedEncryptionKey"; + constructor(properties?: google.cloud.datastream.v1.IAvroFileFormat); /** - * Creates a new Stream instance using the specified properties. + * Creates a new AvroFileFormat instance using the specified properties. * @param [properties] Properties to set - * @returns Stream instance + * @returns AvroFileFormat instance */ - public static create(properties?: google.cloud.datastream.v1.IStream): google.cloud.datastream.v1.Stream; + public static create(properties?: google.cloud.datastream.v1.IAvroFileFormat): google.cloud.datastream.v1.AvroFileFormat; /** - * Encodes the specified Stream message. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. - * @param message Stream message or plain object to encode + * Encodes the specified AvroFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. + * @param message AvroFileFormat message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IStream, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.IAvroFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Stream message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. - * @param message Stream message or plain object to encode + * Encodes the specified AvroFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. + * @param message AvroFileFormat message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IStream, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.IAvroFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Stream message from the specified reader or buffer. + * Decodes an AvroFileFormat message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Stream + * @returns AvroFileFormat * @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.datastream.v1.Stream; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.AvroFileFormat; /** - * Decodes a Stream message from the specified reader or buffer, length delimited. + * Decodes an AvroFileFormat message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Stream + * @returns AvroFileFormat * @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.datastream.v1.Stream; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.AvroFileFormat; /** - * Verifies a Stream message. + * Verifies an AvroFileFormat 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 Stream message from a plain object. Also converts values to their respective internal types. + * Creates an AvroFileFormat message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Stream + * @returns AvroFileFormat */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Stream; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.AvroFileFormat; /** - * Creates a plain object from a Stream message. Also converts values to other types if specified. - * @param message Stream + * Creates a plain object from an AvroFileFormat message. Also converts values to other types if specified. + * @param message AvroFileFormat * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.Stream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.AvroFileFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Stream to JSON. + * Converts this AvroFileFormat to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Stream + * Gets the default type url for AvroFileFormat * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Stream { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - NOT_STARTED = 1, - RUNNING = 2, - PAUSED = 3, - MAINTENANCE = 4, - FAILED = 5, - FAILED_PERMANENTLY = 6, - STARTING = 7, - DRAINING = 8 - } - - /** Properties of a BackfillAllStrategy. */ - interface IBackfillAllStrategy { - - /** BackfillAllStrategy oracleExcludedObjects */ - oracleExcludedObjects?: (google.cloud.datastream.v1.IOracleRdbms|null); + /** Properties of a JsonFileFormat. */ + interface IJsonFileFormat { - /** BackfillAllStrategy mysqlExcludedObjects */ - mysqlExcludedObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + /** JsonFileFormat schemaFileFormat */ + schemaFileFormat?: (google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|keyof typeof google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|null); - /** BackfillAllStrategy postgresqlExcludedObjects */ - postgresqlExcludedObjects?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); - } + /** JsonFileFormat compression */ + compression?: (google.cloud.datastream.v1.JsonFileFormat.JsonCompression|keyof typeof google.cloud.datastream.v1.JsonFileFormat.JsonCompression|null); + } - /** Represents a BackfillAllStrategy. */ - class BackfillAllStrategy implements IBackfillAllStrategy { + /** Represents a JsonFileFormat. */ + class JsonFileFormat implements IJsonFileFormat { - /** - * Constructs a new BackfillAllStrategy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.Stream.IBackfillAllStrategy); + /** + * Constructs a new JsonFileFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IJsonFileFormat); - /** BackfillAllStrategy oracleExcludedObjects. */ - public oracleExcludedObjects?: (google.cloud.datastream.v1.IOracleRdbms|null); + /** JsonFileFormat schemaFileFormat. */ + public schemaFileFormat: (google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|keyof typeof google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat); - /** BackfillAllStrategy mysqlExcludedObjects. */ - public mysqlExcludedObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + /** JsonFileFormat compression. */ + public compression: (google.cloud.datastream.v1.JsonFileFormat.JsonCompression|keyof typeof google.cloud.datastream.v1.JsonFileFormat.JsonCompression); - /** BackfillAllStrategy postgresqlExcludedObjects. */ - public postgresqlExcludedObjects?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); + /** + * Creates a new JsonFileFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonFileFormat instance + */ + public static create(properties?: google.cloud.datastream.v1.IJsonFileFormat): google.cloud.datastream.v1.JsonFileFormat; - /** BackfillAllStrategy excludedObjects. */ - public excludedObjects?: ("oracleExcludedObjects"|"mysqlExcludedObjects"|"postgresqlExcludedObjects"); + /** + * Encodes the specified JsonFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. + * @param message JsonFileFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IJsonFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new BackfillAllStrategy instance using the specified properties. - * @param [properties] Properties to set - * @returns BackfillAllStrategy instance - */ - public static create(properties?: google.cloud.datastream.v1.Stream.IBackfillAllStrategy): google.cloud.datastream.v1.Stream.BackfillAllStrategy; + /** + * Encodes the specified JsonFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. + * @param message JsonFileFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IJsonFileFormat, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified BackfillAllStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. - * @param message BackfillAllStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.Stream.IBackfillAllStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a JsonFileFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonFileFormat + * @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.datastream.v1.JsonFileFormat; - /** - * Encodes the specified BackfillAllStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. - * @param message BackfillAllStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.Stream.IBackfillAllStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a JsonFileFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonFileFormat + * @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.datastream.v1.JsonFileFormat; - /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackfillAllStrategy - * @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.datastream.v1.Stream.BackfillAllStrategy; + /** + * Verifies a JsonFileFormat 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); - /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackfillAllStrategy - * @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.datastream.v1.Stream.BackfillAllStrategy; + /** + * Creates a JsonFileFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonFileFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.JsonFileFormat; - /** - * Verifies a BackfillAllStrategy 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 plain object from a JsonFileFormat message. Also converts values to other types if specified. + * @param message JsonFileFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.JsonFileFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a BackfillAllStrategy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackfillAllStrategy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Stream.BackfillAllStrategy; + /** + * Converts this JsonFileFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a BackfillAllStrategy message. Also converts values to other types if specified. - * @param message BackfillAllStrategy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.Stream.BackfillAllStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for JsonFileFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this BackfillAllStrategy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace JsonFileFormat { - /** - * Gets the default type url for BackfillAllStrategy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** SchemaFileFormat enum. */ + enum SchemaFileFormat { + SCHEMA_FILE_FORMAT_UNSPECIFIED = 0, + NO_SCHEMA_FILE = 1, + AVRO_SCHEMA_FILE = 2 } - /** Properties of a BackfillNoneStrategy. */ - interface IBackfillNoneStrategy { + /** JsonCompression enum. */ + enum JsonCompression { + JSON_COMPRESSION_UNSPECIFIED = 0, + NO_COMPRESSION = 1, + GZIP = 2 } + } - /** Represents a BackfillNoneStrategy. */ - class BackfillNoneStrategy implements IBackfillNoneStrategy { + /** Properties of a GcsDestinationConfig. */ + interface IGcsDestinationConfig { - /** - * Constructs a new BackfillNoneStrategy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy); + /** GcsDestinationConfig path */ + path?: (string|null); - /** - * Creates a new BackfillNoneStrategy instance using the specified properties. - * @param [properties] Properties to set - * @returns BackfillNoneStrategy instance - */ - public static create(properties?: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy): google.cloud.datastream.v1.Stream.BackfillNoneStrategy; + /** GcsDestinationConfig fileRotationMb */ + fileRotationMb?: (number|null); - /** - * Encodes the specified BackfillNoneStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. - * @param message BackfillNoneStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + /** GcsDestinationConfig fileRotationInterval */ + fileRotationInterval?: (google.protobuf.IDuration|null); - /** - * Encodes the specified BackfillNoneStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. - * @param message BackfillNoneStrategy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + /** GcsDestinationConfig avroFileFormat */ + avroFileFormat?: (google.cloud.datastream.v1.IAvroFileFormat|null); - /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackfillNoneStrategy - * @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.datastream.v1.Stream.BackfillNoneStrategy; + /** GcsDestinationConfig jsonFileFormat */ + jsonFileFormat?: (google.cloud.datastream.v1.IJsonFileFormat|null); + } - /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackfillNoneStrategy - * @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.datastream.v1.Stream.BackfillNoneStrategy; + /** Represents a GcsDestinationConfig. */ + class GcsDestinationConfig implements IGcsDestinationConfig { - /** - * Verifies a BackfillNoneStrategy 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); + /** + * Constructs a new GcsDestinationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IGcsDestinationConfig); - /** - * Creates a BackfillNoneStrategy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackfillNoneStrategy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Stream.BackfillNoneStrategy; + /** GcsDestinationConfig path. */ + public path: string; - /** - * Creates a plain object from a BackfillNoneStrategy message. Also converts values to other types if specified. - * @param message BackfillNoneStrategy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.Stream.BackfillNoneStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** GcsDestinationConfig fileRotationMb. */ + public fileRotationMb: number; - /** - * Converts this BackfillNoneStrategy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** GcsDestinationConfig fileRotationInterval. */ + public fileRotationInterval?: (google.protobuf.IDuration|null); - /** - * Gets the default type url for BackfillNoneStrategy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** GcsDestinationConfig avroFileFormat. */ + public avroFileFormat?: (google.cloud.datastream.v1.IAvroFileFormat|null); - /** Properties of a StreamObject. */ - interface IStreamObject { + /** GcsDestinationConfig jsonFileFormat. */ + public jsonFileFormat?: (google.cloud.datastream.v1.IJsonFileFormat|null); - /** StreamObject name */ - name?: (string|null); + /** GcsDestinationConfig fileFormat. */ + public fileFormat?: ("avroFileFormat"|"jsonFileFormat"); - /** StreamObject createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new GcsDestinationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsDestinationConfig instance + */ + public static create(properties?: google.cloud.datastream.v1.IGcsDestinationConfig): google.cloud.datastream.v1.GcsDestinationConfig; - /** StreamObject updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified GcsDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. + * @param message GcsDestinationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IGcsDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** StreamObject displayName */ - displayName?: (string|null); + /** + * Encodes the specified GcsDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. + * @param message GcsDestinationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IGcsDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** StreamObject errors */ - errors?: (google.cloud.datastream.v1.IError[]|null); + /** + * Decodes a GcsDestinationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsDestinationConfig + * @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.datastream.v1.GcsDestinationConfig; - /** StreamObject backfillJob */ - backfillJob?: (google.cloud.datastream.v1.IBackfillJob|null); + /** + * Decodes a GcsDestinationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsDestinationConfig + * @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.datastream.v1.GcsDestinationConfig; - /** StreamObject sourceObject */ - sourceObject?: (google.cloud.datastream.v1.ISourceObjectIdentifier|null); + /** + * Verifies a GcsDestinationConfig 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 GcsDestinationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsDestinationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.GcsDestinationConfig; + + /** + * Creates a plain object from a GcsDestinationConfig message. Also converts values to other types if specified. + * @param message GcsDestinationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.GcsDestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsDestinationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsDestinationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a StreamObject. */ - class StreamObject implements IStreamObject { + /** Properties of a BigQueryDestinationConfig. */ + interface IBigQueryDestinationConfig { + + /** BigQueryDestinationConfig singleTargetDataset */ + singleTargetDataset?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null); + + /** BigQueryDestinationConfig sourceHierarchyDatasets */ + sourceHierarchyDatasets?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null); + + /** BigQueryDestinationConfig dataFreshness */ + dataFreshness?: (google.protobuf.IDuration|null); + + /** BigQueryDestinationConfig merge */ + merge?: (google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge|null); + + /** BigQueryDestinationConfig appendOnly */ + appendOnly?: (google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly|null); + } + + /** Represents a BigQueryDestinationConfig. */ + class BigQueryDestinationConfig implements IBigQueryDestinationConfig { /** - * Constructs a new StreamObject. + * Constructs a new BigQueryDestinationConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IStreamObject); + constructor(properties?: google.cloud.datastream.v1.IBigQueryDestinationConfig); - /** StreamObject name. */ - public name: string; + /** BigQueryDestinationConfig singleTargetDataset. */ + public singleTargetDataset?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null); + + /** BigQueryDestinationConfig sourceHierarchyDatasets. */ + public sourceHierarchyDatasets?: (google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null); + + /** BigQueryDestinationConfig dataFreshness. */ + public dataFreshness?: (google.protobuf.IDuration|null); + + /** BigQueryDestinationConfig merge. */ + public merge?: (google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge|null); + + /** BigQueryDestinationConfig appendOnly. */ + public appendOnly?: (google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly|null); + + /** BigQueryDestinationConfig datasetConfig. */ + public datasetConfig?: ("singleTargetDataset"|"sourceHierarchyDatasets"); + + /** BigQueryDestinationConfig writeMode. */ + public writeMode?: ("merge"|"appendOnly"); + + /** + * Creates a new BigQueryDestinationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryDestinationConfig instance + */ + public static create(properties?: google.cloud.datastream.v1.IBigQueryDestinationConfig): google.cloud.datastream.v1.BigQueryDestinationConfig; + + /** + * Encodes the specified BigQueryDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. + * @param message BigQueryDestinationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IBigQueryDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. + * @param message BigQueryDestinationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IBigQueryDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryDestinationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryDestinationConfig + * @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.datastream.v1.BigQueryDestinationConfig; + + /** + * Decodes a BigQueryDestinationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryDestinationConfig + * @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.datastream.v1.BigQueryDestinationConfig; + + /** + * Verifies a BigQueryDestinationConfig 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 BigQueryDestinationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryDestinationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig; + + /** + * Creates a plain object from a BigQueryDestinationConfig message. Also converts values to other types if specified. + * @param message BigQueryDestinationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryDestinationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryDestinationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BigQueryDestinationConfig { + + /** Properties of a SingleTargetDataset. */ + interface ISingleTargetDataset { + + /** SingleTargetDataset datasetId */ + datasetId?: (string|null); + } + + /** Represents a SingleTargetDataset. */ + class SingleTargetDataset implements ISingleTargetDataset { + + /** + * Constructs a new SingleTargetDataset. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset); + + /** SingleTargetDataset datasetId. */ + public datasetId: string; + + /** + * Creates a new SingleTargetDataset instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleTargetDataset instance + */ + public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset): google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; + + /** + * Encodes the specified SingleTargetDataset message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. + * @param message SingleTargetDataset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SingleTargetDataset message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. + * @param message SingleTargetDataset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SingleTargetDataset message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleTargetDataset + * @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.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; + + /** + * Decodes a SingleTargetDataset message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleTargetDataset + * @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.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; + + /** + * Verifies a SingleTargetDataset 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 SingleTargetDataset message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleTargetDataset + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset; + + /** + * Creates a plain object from a SingleTargetDataset message. Also converts values to other types if specified. + * @param message SingleTargetDataset + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SingleTargetDataset to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleTargetDataset + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SourceHierarchyDatasets. */ + interface ISourceHierarchyDatasets { + + /** SourceHierarchyDatasets datasetTemplate */ + datasetTemplate?: (google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null); + } + + /** Represents a SourceHierarchyDatasets. */ + class SourceHierarchyDatasets implements ISourceHierarchyDatasets { + + /** + * Constructs a new SourceHierarchyDatasets. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets); + + /** SourceHierarchyDatasets datasetTemplate. */ + public datasetTemplate?: (google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null); + + /** + * Creates a new SourceHierarchyDatasets instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceHierarchyDatasets instance + */ + public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; + + /** + * Encodes the specified SourceHierarchyDatasets message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. + * @param message SourceHierarchyDatasets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceHierarchyDatasets message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. + * @param message SourceHierarchyDatasets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceHierarchyDatasets message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceHierarchyDatasets + * @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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; + + /** + * Decodes a SourceHierarchyDatasets message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceHierarchyDatasets + * @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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; + + /** + * Verifies a SourceHierarchyDatasets 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 SourceHierarchyDatasets message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceHierarchyDatasets + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets; + + /** + * Creates a plain object from a SourceHierarchyDatasets message. Also converts values to other types if specified. + * @param message SourceHierarchyDatasets + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceHierarchyDatasets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceHierarchyDatasets + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceHierarchyDatasets { + + /** Properties of a DatasetTemplate. */ + interface IDatasetTemplate { + + /** DatasetTemplate location */ + location?: (string|null); + + /** DatasetTemplate datasetIdPrefix */ + datasetIdPrefix?: (string|null); + + /** DatasetTemplate kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents a DatasetTemplate. */ + class DatasetTemplate implements IDatasetTemplate { + + /** + * Constructs a new DatasetTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate); + + /** DatasetTemplate location. */ + public location: string; + + /** DatasetTemplate datasetIdPrefix. */ + public datasetIdPrefix: string; + + /** DatasetTemplate kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a new DatasetTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns DatasetTemplate instance + */ + public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; + + /** + * Encodes the specified DatasetTemplate message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. + * @param message DatasetTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatasetTemplate message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. + * @param message DatasetTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatasetTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatasetTemplate + * @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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; + + /** + * Decodes a DatasetTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatasetTemplate + * @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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; + + /** + * Verifies a DatasetTemplate 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 DatasetTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatasetTemplate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate; + + /** + * Creates a plain object from a DatasetTemplate message. Also converts values to other types if specified. + * @param message DatasetTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatasetTemplate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatasetTemplate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AppendOnly. */ + interface IAppendOnly { + } + + /** Represents an AppendOnly. */ + class AppendOnly implements IAppendOnly { + + /** + * Constructs a new AppendOnly. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly); + + /** + * Creates a new AppendOnly instance using the specified properties. + * @param [properties] Properties to set + * @returns AppendOnly instance + */ + public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly): google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly; + + /** + * Encodes the specified AppendOnly message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.verify|verify} messages. + * @param message AppendOnly message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppendOnly message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.verify|verify} messages. + * @param message AppendOnly message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppendOnly message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppendOnly + * @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.datastream.v1.BigQueryDestinationConfig.AppendOnly; + + /** + * Decodes an AppendOnly message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppendOnly + * @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.datastream.v1.BigQueryDestinationConfig.AppendOnly; + + /** + * Verifies an AppendOnly 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 AppendOnly message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppendOnly + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly; + + /** + * Creates a plain object from an AppendOnly message. Also converts values to other types if specified. + * @param message AppendOnly + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppendOnly to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppendOnly + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Merge. */ + interface IMerge { + } + + /** Represents a Merge. */ + class Merge implements IMerge { + + /** + * Constructs a new Merge. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge); + + /** + * Creates a new Merge instance using the specified properties. + * @param [properties] Properties to set + * @returns Merge instance + */ + public static create(properties?: google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge): google.cloud.datastream.v1.BigQueryDestinationConfig.Merge; + + /** + * Encodes the specified Merge message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.verify|verify} messages. + * @param message Merge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Merge message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.verify|verify} messages. + * @param message Merge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Merge message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Merge + * @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.datastream.v1.BigQueryDestinationConfig.Merge; + + /** + * Decodes a Merge message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Merge + * @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.datastream.v1.BigQueryDestinationConfig.Merge; + + /** + * Verifies a Merge 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 Merge message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Merge + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BigQueryDestinationConfig.Merge; + + /** + * Creates a plain object from a Merge message. Also converts values to other types if specified. + * @param message Merge + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.BigQueryDestinationConfig.Merge, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Merge to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Merge + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DestinationConfig. */ + interface IDestinationConfig { + + /** DestinationConfig destinationConnectionProfile */ + destinationConnectionProfile?: (string|null); + + /** DestinationConfig gcsDestinationConfig */ + gcsDestinationConfig?: (google.cloud.datastream.v1.IGcsDestinationConfig|null); + + /** DestinationConfig bigqueryDestinationConfig */ + bigqueryDestinationConfig?: (google.cloud.datastream.v1.IBigQueryDestinationConfig|null); + } + + /** Represents a DestinationConfig. */ + class DestinationConfig implements IDestinationConfig { + + /** + * Constructs a new DestinationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IDestinationConfig); + + /** DestinationConfig destinationConnectionProfile. */ + public destinationConnectionProfile: string; + + /** DestinationConfig gcsDestinationConfig. */ + public gcsDestinationConfig?: (google.cloud.datastream.v1.IGcsDestinationConfig|null); + + /** DestinationConfig bigqueryDestinationConfig. */ + public bigqueryDestinationConfig?: (google.cloud.datastream.v1.IBigQueryDestinationConfig|null); + + /** DestinationConfig destinationStreamConfig. */ + public destinationStreamConfig?: ("gcsDestinationConfig"|"bigqueryDestinationConfig"); + + /** + * Creates a new DestinationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DestinationConfig instance + */ + public static create(properties?: google.cloud.datastream.v1.IDestinationConfig): google.cloud.datastream.v1.DestinationConfig; + + /** + * Encodes the specified DestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. + * @param message DestinationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. + * @param message DestinationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IDestinationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DestinationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DestinationConfig + * @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.datastream.v1.DestinationConfig; + + /** + * Decodes a DestinationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DestinationConfig + * @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.datastream.v1.DestinationConfig; + + /** + * Verifies a DestinationConfig 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 DestinationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DestinationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.DestinationConfig; + + /** + * Creates a plain object from a DestinationConfig message. Also converts values to other types if specified. + * @param message DestinationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.DestinationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DestinationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DestinationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Stream. */ + interface IStream { + + /** Stream name */ + name?: (string|null); + + /** Stream createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Stream updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Stream labels */ + labels?: ({ [k: string]: string }|null); + + /** Stream displayName */ + displayName?: (string|null); + + /** Stream sourceConfig */ + sourceConfig?: (google.cloud.datastream.v1.ISourceConfig|null); + + /** Stream destinationConfig */ + destinationConfig?: (google.cloud.datastream.v1.IDestinationConfig|null); + + /** Stream state */ + state?: (google.cloud.datastream.v1.Stream.State|keyof typeof google.cloud.datastream.v1.Stream.State|null); + + /** Stream backfillAll */ + backfillAll?: (google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null); + + /** Stream backfillNone */ + backfillNone?: (google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null); + + /** Stream errors */ + errors?: (google.cloud.datastream.v1.IError[]|null); + + /** Stream customerManagedEncryptionKey */ + customerManagedEncryptionKey?: (string|null); + + /** Stream lastRecoveryTime */ + lastRecoveryTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Stream. */ + class Stream implements IStream { + + /** + * Constructs a new Stream. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IStream); + + /** Stream name. */ + public name: string; + + /** Stream createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Stream updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Stream labels. */ + public labels: { [k: string]: string }; + + /** Stream displayName. */ + public displayName: string; + + /** Stream sourceConfig. */ + public sourceConfig?: (google.cloud.datastream.v1.ISourceConfig|null); + + /** Stream destinationConfig. */ + public destinationConfig?: (google.cloud.datastream.v1.IDestinationConfig|null); + + /** Stream state. */ + public state: (google.cloud.datastream.v1.Stream.State|keyof typeof google.cloud.datastream.v1.Stream.State); + + /** Stream backfillAll. */ + public backfillAll?: (google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null); + + /** Stream backfillNone. */ + public backfillNone?: (google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null); + + /** Stream errors. */ + public errors: google.cloud.datastream.v1.IError[]; + + /** Stream customerManagedEncryptionKey. */ + public customerManagedEncryptionKey?: (string|null); + + /** Stream lastRecoveryTime. */ + public lastRecoveryTime?: (google.protobuf.ITimestamp|null); + + /** Stream backfillStrategy. */ + public backfillStrategy?: ("backfillAll"|"backfillNone"); + + /** Stream _customerManagedEncryptionKey. */ + public _customerManagedEncryptionKey?: "customerManagedEncryptionKey"; + + /** + * Creates a new Stream instance using the specified properties. + * @param [properties] Properties to set + * @returns Stream instance + */ + public static create(properties?: google.cloud.datastream.v1.IStream): google.cloud.datastream.v1.Stream; + + /** + * Encodes the specified Stream message. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. + * @param message Stream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Stream message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. + * @param message Stream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Stream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Stream + * @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.datastream.v1.Stream; + + /** + * Decodes a Stream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Stream + * @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.datastream.v1.Stream; + + /** + * Verifies a Stream 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 Stream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Stream + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Stream; + + /** + * Creates a plain object from a Stream message. Also converts values to other types if specified. + * @param message Stream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.Stream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Stream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Stream + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Stream { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + NOT_STARTED = 1, + RUNNING = 2, + PAUSED = 3, + MAINTENANCE = 4, + FAILED = 5, + FAILED_PERMANENTLY = 6, + STARTING = 7, + DRAINING = 8 + } + + /** Properties of a BackfillAllStrategy. */ + interface IBackfillAllStrategy { + + /** BackfillAllStrategy oracleExcludedObjects */ + oracleExcludedObjects?: (google.cloud.datastream.v1.IOracleRdbms|null); + + /** BackfillAllStrategy mysqlExcludedObjects */ + mysqlExcludedObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + + /** BackfillAllStrategy postgresqlExcludedObjects */ + postgresqlExcludedObjects?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); + + /** BackfillAllStrategy sqlServerExcludedObjects */ + sqlServerExcludedObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); + } + + /** Represents a BackfillAllStrategy. */ + class BackfillAllStrategy implements IBackfillAllStrategy { + + /** + * Constructs a new BackfillAllStrategy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.Stream.IBackfillAllStrategy); + + /** BackfillAllStrategy oracleExcludedObjects. */ + public oracleExcludedObjects?: (google.cloud.datastream.v1.IOracleRdbms|null); + + /** BackfillAllStrategy mysqlExcludedObjects. */ + public mysqlExcludedObjects?: (google.cloud.datastream.v1.IMysqlRdbms|null); + + /** BackfillAllStrategy postgresqlExcludedObjects. */ + public postgresqlExcludedObjects?: (google.cloud.datastream.v1.IPostgresqlRdbms|null); + + /** BackfillAllStrategy sqlServerExcludedObjects. */ + public sqlServerExcludedObjects?: (google.cloud.datastream.v1.ISqlServerRdbms|null); + + /** BackfillAllStrategy excludedObjects. */ + public excludedObjects?: ("oracleExcludedObjects"|"mysqlExcludedObjects"|"postgresqlExcludedObjects"|"sqlServerExcludedObjects"); + + /** + * Creates a new BackfillAllStrategy instance using the specified properties. + * @param [properties] Properties to set + * @returns BackfillAllStrategy instance + */ + public static create(properties?: google.cloud.datastream.v1.Stream.IBackfillAllStrategy): google.cloud.datastream.v1.Stream.BackfillAllStrategy; + + /** + * Encodes the specified BackfillAllStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. + * @param message BackfillAllStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.Stream.IBackfillAllStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackfillAllStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. + * @param message BackfillAllStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.Stream.IBackfillAllStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackfillAllStrategy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackfillAllStrategy + * @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.datastream.v1.Stream.BackfillAllStrategy; + + /** + * Decodes a BackfillAllStrategy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackfillAllStrategy + * @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.datastream.v1.Stream.BackfillAllStrategy; + + /** + * Verifies a BackfillAllStrategy 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 BackfillAllStrategy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackfillAllStrategy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Stream.BackfillAllStrategy; + + /** + * Creates a plain object from a BackfillAllStrategy message. Also converts values to other types if specified. + * @param message BackfillAllStrategy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.Stream.BackfillAllStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackfillAllStrategy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackfillAllStrategy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackfillNoneStrategy. */ + interface IBackfillNoneStrategy { + } + + /** Represents a BackfillNoneStrategy. */ + class BackfillNoneStrategy implements IBackfillNoneStrategy { + + /** + * Constructs a new BackfillNoneStrategy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy); + + /** + * Creates a new BackfillNoneStrategy instance using the specified properties. + * @param [properties] Properties to set + * @returns BackfillNoneStrategy instance + */ + public static create(properties?: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy): google.cloud.datastream.v1.Stream.BackfillNoneStrategy; + + /** + * Encodes the specified BackfillNoneStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. + * @param message BackfillNoneStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackfillNoneStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. + * @param message BackfillNoneStrategy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.Stream.IBackfillNoneStrategy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackfillNoneStrategy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackfillNoneStrategy + * @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.datastream.v1.Stream.BackfillNoneStrategy; + + /** + * Decodes a BackfillNoneStrategy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackfillNoneStrategy + * @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.datastream.v1.Stream.BackfillNoneStrategy; + + /** + * Verifies a BackfillNoneStrategy 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 BackfillNoneStrategy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackfillNoneStrategy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Stream.BackfillNoneStrategy; + + /** + * Creates a plain object from a BackfillNoneStrategy message. Also converts values to other types if specified. + * @param message BackfillNoneStrategy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.Stream.BackfillNoneStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackfillNoneStrategy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackfillNoneStrategy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a StreamObject. */ + interface IStreamObject { + + /** StreamObject name */ + name?: (string|null); + + /** StreamObject createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** StreamObject updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** StreamObject displayName */ + displayName?: (string|null); + + /** StreamObject errors */ + errors?: (google.cloud.datastream.v1.IError[]|null); + + /** StreamObject backfillJob */ + backfillJob?: (google.cloud.datastream.v1.IBackfillJob|null); + + /** StreamObject sourceObject */ + sourceObject?: (google.cloud.datastream.v1.ISourceObjectIdentifier|null); + } + + /** Represents a StreamObject. */ + class StreamObject implements IStreamObject { + + /** + * Constructs a new StreamObject. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IStreamObject); + + /** StreamObject name. */ + public name: string; + + /** StreamObject createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** StreamObject updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** StreamObject displayName. */ + public displayName: string; + + /** StreamObject errors. */ + public errors: google.cloud.datastream.v1.IError[]; + + /** StreamObject backfillJob. */ + public backfillJob?: (google.cloud.datastream.v1.IBackfillJob|null); + + /** StreamObject sourceObject. */ + public sourceObject?: (google.cloud.datastream.v1.ISourceObjectIdentifier|null); + + /** + * Creates a new StreamObject instance using the specified properties. + * @param [properties] Properties to set + * @returns StreamObject instance + */ + public static create(properties?: google.cloud.datastream.v1.IStreamObject): google.cloud.datastream.v1.StreamObject; + + /** + * Encodes the specified StreamObject message. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. + * @param message StreamObject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IStreamObject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StreamObject message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. + * @param message StreamObject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IStreamObject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StreamObject message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StreamObject + * @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.datastream.v1.StreamObject; + + /** + * Decodes a StreamObject message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StreamObject + * @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.datastream.v1.StreamObject; + + /** + * Verifies a StreamObject 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 StreamObject message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StreamObject + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.StreamObject; + + /** + * Creates a plain object from a StreamObject message. Also converts values to other types if specified. + * @param message StreamObject + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.StreamObject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StreamObject to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StreamObject + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SourceObjectIdentifier. */ + interface ISourceObjectIdentifier { + + /** SourceObjectIdentifier oracleIdentifier */ + oracleIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null); + + /** SourceObjectIdentifier mysqlIdentifier */ + mysqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null); + + /** SourceObjectIdentifier postgresqlIdentifier */ + postgresqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null); + + /** SourceObjectIdentifier sqlServerIdentifier */ + sqlServerIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier|null); + } + + /** Represents a SourceObjectIdentifier. */ + class SourceObjectIdentifier implements ISourceObjectIdentifier { + + /** + * Constructs a new SourceObjectIdentifier. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.ISourceObjectIdentifier); + + /** SourceObjectIdentifier oracleIdentifier. */ + public oracleIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null); + + /** SourceObjectIdentifier mysqlIdentifier. */ + public mysqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null); + + /** SourceObjectIdentifier postgresqlIdentifier. */ + public postgresqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null); + + /** SourceObjectIdentifier sqlServerIdentifier. */ + public sqlServerIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier|null); + + /** SourceObjectIdentifier sourceIdentifier. */ + public sourceIdentifier?: ("oracleIdentifier"|"mysqlIdentifier"|"postgresqlIdentifier"|"sqlServerIdentifier"); + + /** + * Creates a new SourceObjectIdentifier instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceObjectIdentifier instance + */ + public static create(properties?: google.cloud.datastream.v1.ISourceObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier; + + /** + * Encodes the specified SourceObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. + * @param message SourceObjectIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.ISourceObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. + * @param message SourceObjectIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.ISourceObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceObjectIdentifier message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceObjectIdentifier + * @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.datastream.v1.SourceObjectIdentifier; + + /** + * Decodes a SourceObjectIdentifier message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceObjectIdentifier + * @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.datastream.v1.SourceObjectIdentifier; + + /** + * Verifies a SourceObjectIdentifier 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 SourceObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceObjectIdentifier + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier; + + /** + * Creates a plain object from a SourceObjectIdentifier message. Also converts values to other types if specified. + * @param message SourceObjectIdentifier + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceObjectIdentifier to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceObjectIdentifier + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceObjectIdentifier { + + /** Properties of an OracleObjectIdentifier. */ + interface IOracleObjectIdentifier { + + /** OracleObjectIdentifier schema */ + schema?: (string|null); + + /** OracleObjectIdentifier table */ + table?: (string|null); + } + + /** Represents an OracleObjectIdentifier. */ + class OracleObjectIdentifier implements IOracleObjectIdentifier { + + /** + * Constructs a new OracleObjectIdentifier. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier); + + /** OracleObjectIdentifier schema. */ + public schema: string; + + /** OracleObjectIdentifier table. */ + public table: string; + + /** + * Creates a new OracleObjectIdentifier instance using the specified properties. + * @param [properties] Properties to set + * @returns OracleObjectIdentifier instance + */ + public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; + + /** + * Encodes the specified OracleObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. + * @param message OracleObjectIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OracleObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. + * @param message OracleObjectIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OracleObjectIdentifier message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OracleObjectIdentifier + * @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.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; + + /** + * Decodes an OracleObjectIdentifier message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OracleObjectIdentifier + * @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.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; + + /** + * Verifies an OracleObjectIdentifier 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 OracleObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OracleObjectIdentifier + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; + + /** + * Creates a plain object from an OracleObjectIdentifier message. Also converts values to other types if specified. + * @param message OracleObjectIdentifier + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OracleObjectIdentifier to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OracleObjectIdentifier + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PostgresqlObjectIdentifier. */ + interface IPostgresqlObjectIdentifier { + + /** PostgresqlObjectIdentifier schema */ + schema?: (string|null); + + /** PostgresqlObjectIdentifier table */ + table?: (string|null); + } + + /** Represents a PostgresqlObjectIdentifier. */ + class PostgresqlObjectIdentifier implements IPostgresqlObjectIdentifier { + + /** + * Constructs a new PostgresqlObjectIdentifier. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier); + + /** PostgresqlObjectIdentifier schema. */ + public schema: string; + + /** PostgresqlObjectIdentifier table. */ + public table: string; + + /** + * Creates a new PostgresqlObjectIdentifier instance using the specified properties. + * @param [properties] Properties to set + * @returns PostgresqlObjectIdentifier instance + */ + public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; + + /** + * Encodes the specified PostgresqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. + * @param message PostgresqlObjectIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PostgresqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. + * @param message PostgresqlObjectIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PostgresqlObjectIdentifier + * @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.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; + + /** + * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PostgresqlObjectIdentifier + * @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.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; + + /** + * Verifies a PostgresqlObjectIdentifier 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 PostgresqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PostgresqlObjectIdentifier + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; + + /** + * Creates a plain object from a PostgresqlObjectIdentifier message. Also converts values to other types if specified. + * @param message PostgresqlObjectIdentifier + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PostgresqlObjectIdentifier to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PostgresqlObjectIdentifier + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MysqlObjectIdentifier. */ + interface IMysqlObjectIdentifier { + + /** MysqlObjectIdentifier database */ + database?: (string|null); + + /** MysqlObjectIdentifier table */ + table?: (string|null); + } + + /** Represents a MysqlObjectIdentifier. */ + class MysqlObjectIdentifier implements IMysqlObjectIdentifier { + + /** + * Constructs a new MysqlObjectIdentifier. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier); + + /** MysqlObjectIdentifier database. */ + public database: string; + + /** MysqlObjectIdentifier table. */ + public table: string; + + /** + * Creates a new MysqlObjectIdentifier instance using the specified properties. + * @param [properties] Properties to set + * @returns MysqlObjectIdentifier instance + */ + public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; + + /** + * Encodes the specified MysqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. + * @param message MysqlObjectIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MysqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. + * @param message MysqlObjectIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MysqlObjectIdentifier message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MysqlObjectIdentifier + * @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.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; + + /** + * Decodes a MysqlObjectIdentifier message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MysqlObjectIdentifier + * @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.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; + + /** + * Verifies a MysqlObjectIdentifier 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 MysqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MysqlObjectIdentifier + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; + + /** + * Creates a plain object from a MysqlObjectIdentifier message. Also converts values to other types if specified. + * @param message MysqlObjectIdentifier + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MysqlObjectIdentifier to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MysqlObjectIdentifier + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SqlServerObjectIdentifier. */ + interface ISqlServerObjectIdentifier { + + /** SqlServerObjectIdentifier schema */ + schema?: (string|null); + + /** SqlServerObjectIdentifier table */ + table?: (string|null); + } + + /** Represents a SqlServerObjectIdentifier. */ + class SqlServerObjectIdentifier implements ISqlServerObjectIdentifier { + + /** + * Constructs a new SqlServerObjectIdentifier. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier); + + /** SqlServerObjectIdentifier schema. */ + public schema: string; + + /** SqlServerObjectIdentifier table. */ + public table: string; + + /** + * Creates a new SqlServerObjectIdentifier instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlServerObjectIdentifier instance + */ + public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier; + + /** + * Encodes the specified SqlServerObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.verify|verify} messages. + * @param message SqlServerObjectIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlServerObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.verify|verify} messages. + * @param message SqlServerObjectIdentifier message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlServerObjectIdentifier message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlServerObjectIdentifier + * @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.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier; + + /** + * Decodes a SqlServerObjectIdentifier message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlServerObjectIdentifier + * @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.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier; + + /** + * Verifies a SqlServerObjectIdentifier 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 SqlServerObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlServerObjectIdentifier + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier; + + /** + * Creates a plain object from a SqlServerObjectIdentifier message. Also converts values to other types if specified. + * @param message SqlServerObjectIdentifier + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlServerObjectIdentifier to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlServerObjectIdentifier + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BackfillJob. */ + interface IBackfillJob { + + /** BackfillJob state */ + state?: (google.cloud.datastream.v1.BackfillJob.State|keyof typeof google.cloud.datastream.v1.BackfillJob.State|null); + + /** BackfillJob trigger */ + trigger?: (google.cloud.datastream.v1.BackfillJob.Trigger|keyof typeof google.cloud.datastream.v1.BackfillJob.Trigger|null); + + /** BackfillJob lastStartTime */ + lastStartTime?: (google.protobuf.ITimestamp|null); + + /** BackfillJob lastEndTime */ + lastEndTime?: (google.protobuf.ITimestamp|null); + + /** BackfillJob errors */ + errors?: (google.cloud.datastream.v1.IError[]|null); + } + + /** Represents a BackfillJob. */ + class BackfillJob implements IBackfillJob { + + /** + * Constructs a new BackfillJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IBackfillJob); + + /** BackfillJob state. */ + public state: (google.cloud.datastream.v1.BackfillJob.State|keyof typeof google.cloud.datastream.v1.BackfillJob.State); + + /** BackfillJob trigger. */ + public trigger: (google.cloud.datastream.v1.BackfillJob.Trigger|keyof typeof google.cloud.datastream.v1.BackfillJob.Trigger); + + /** BackfillJob lastStartTime. */ + public lastStartTime?: (google.protobuf.ITimestamp|null); + + /** BackfillJob lastEndTime. */ + public lastEndTime?: (google.protobuf.ITimestamp|null); + + /** BackfillJob errors. */ + public errors: google.cloud.datastream.v1.IError[]; + + /** + * Creates a new BackfillJob instance using the specified properties. + * @param [properties] Properties to set + * @returns BackfillJob instance + */ + public static create(properties?: google.cloud.datastream.v1.IBackfillJob): google.cloud.datastream.v1.BackfillJob; + + /** + * Encodes the specified BackfillJob message. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. + * @param message BackfillJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IBackfillJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackfillJob message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. + * @param message BackfillJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IBackfillJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackfillJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackfillJob + * @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.datastream.v1.BackfillJob; + + /** + * Decodes a BackfillJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackfillJob + * @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.datastream.v1.BackfillJob; + + /** + * Verifies a BackfillJob 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 BackfillJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackfillJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BackfillJob; + + /** + * Creates a plain object from a BackfillJob message. Also converts values to other types if specified. + * @param message BackfillJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.BackfillJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackfillJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackfillJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackfillJob { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + NOT_STARTED = 1, + PENDING = 2, + ACTIVE = 3, + STOPPED = 4, + FAILED = 5, + COMPLETED = 6, + UNSUPPORTED = 7 + } + + /** Trigger enum. */ + enum Trigger { + TRIGGER_UNSPECIFIED = 0, + AUTOMATIC = 1, + MANUAL = 2 + } + } + + /** Properties of an Error. */ + interface IError { + + /** Error reason */ + reason?: (string|null); + + /** Error errorUuid */ + errorUuid?: (string|null); + + /** Error message */ + message?: (string|null); + + /** Error errorTime */ + errorTime?: (google.protobuf.ITimestamp|null); + + /** Error details */ + details?: ({ [k: string]: string }|null); + } + + /** Represents an Error. */ + class Error implements IError { + + /** + * Constructs a new Error. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IError); + + /** Error reason. */ + public reason: string; + + /** Error errorUuid. */ + public errorUuid: string; + + /** Error message. */ + public message: string; + + /** Error errorTime. */ + public errorTime?: (google.protobuf.ITimestamp|null); + + /** Error details. */ + public details: { [k: string]: string }; + + /** + * Creates a new Error instance using the specified properties. + * @param [properties] Properties to set + * @returns Error instance + */ + public static create(properties?: google.cloud.datastream.v1.IError): google.cloud.datastream.v1.Error; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Error message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Error + * @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.datastream.v1.Error; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Error + * @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.datastream.v1.Error; + + /** + * Verifies an Error 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 Error message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Error + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Error; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @param message Error + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Error to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Error + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ValidationResult. */ + interface IValidationResult { + + /** ValidationResult validations */ + validations?: (google.cloud.datastream.v1.IValidation[]|null); + } + + /** Represents a ValidationResult. */ + class ValidationResult implements IValidationResult { + + /** + * Constructs a new ValidationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IValidationResult); + + /** ValidationResult validations. */ + public validations: google.cloud.datastream.v1.IValidation[]; + + /** + * Creates a new ValidationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidationResult instance + */ + public static create(properties?: google.cloud.datastream.v1.IValidationResult): google.cloud.datastream.v1.ValidationResult; + + /** + * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. + * @param message ValidationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. + * @param message ValidationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidationResult + * @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.datastream.v1.ValidationResult; + + /** + * Decodes a ValidationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidationResult + * @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.datastream.v1.ValidationResult; + + /** + * Verifies a ValidationResult 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 ValidationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidationResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ValidationResult; + + /** + * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. + * @param message ValidationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.ValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ValidationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Validation. */ + interface IValidation { + + /** Validation description */ + description?: (string|null); + + /** Validation state */ + state?: (google.cloud.datastream.v1.Validation.State|keyof typeof google.cloud.datastream.v1.Validation.State|null); + + /** Validation message */ + message?: (google.cloud.datastream.v1.IValidationMessage[]|null); + + /** Validation code */ + code?: (string|null); + } + + /** Represents a Validation. */ + class Validation implements IValidation { + + /** + * Constructs a new Validation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IValidation); + + /** Validation description. */ + public description: string; + + /** Validation state. */ + public state: (google.cloud.datastream.v1.Validation.State|keyof typeof google.cloud.datastream.v1.Validation.State); + + /** Validation message. */ + public message: google.cloud.datastream.v1.IValidationMessage[]; + + /** Validation code. */ + public code: string; + + /** + * Creates a new Validation instance using the specified properties. + * @param [properties] Properties to set + * @returns Validation instance + */ + public static create(properties?: google.cloud.datastream.v1.IValidation): google.cloud.datastream.v1.Validation; + + /** + * Encodes the specified Validation message. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. + * @param message Validation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. + * @param message Validation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Validation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Validation + * @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.datastream.v1.Validation; + + /** + * Decodes a Validation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Validation + * @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.datastream.v1.Validation; + + /** + * Verifies a Validation 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 Validation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Validation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Validation; + + /** + * Creates a plain object from a Validation message. Also converts values to other types if specified. + * @param message Validation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.Validation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Validation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Validation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Validation { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + NOT_EXECUTED = 1, + FAILED = 2, + PASSED = 3, + WARNING = 4 + } + } + + /** Properties of a ValidationMessage. */ + interface IValidationMessage { + + /** ValidationMessage message */ + message?: (string|null); + + /** ValidationMessage level */ + level?: (google.cloud.datastream.v1.ValidationMessage.Level|keyof typeof google.cloud.datastream.v1.ValidationMessage.Level|null); + + /** ValidationMessage metadata */ + metadata?: ({ [k: string]: string }|null); + + /** ValidationMessage code */ + code?: (string|null); + } - /** StreamObject createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** Represents a ValidationMessage. */ + class ValidationMessage implements IValidationMessage { - /** StreamObject updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new ValidationMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.IValidationMessage); - /** StreamObject displayName. */ - public displayName: string; + /** ValidationMessage message. */ + public message: string; - /** StreamObject errors. */ - public errors: google.cloud.datastream.v1.IError[]; + /** ValidationMessage level. */ + public level: (google.cloud.datastream.v1.ValidationMessage.Level|keyof typeof google.cloud.datastream.v1.ValidationMessage.Level); - /** StreamObject backfillJob. */ - public backfillJob?: (google.cloud.datastream.v1.IBackfillJob|null); + /** ValidationMessage metadata. */ + public metadata: { [k: string]: string }; - /** StreamObject sourceObject. */ - public sourceObject?: (google.cloud.datastream.v1.ISourceObjectIdentifier|null); + /** ValidationMessage code. */ + public code: string; /** - * Creates a new StreamObject instance using the specified properties. + * Creates a new ValidationMessage instance using the specified properties. * @param [properties] Properties to set - * @returns StreamObject instance + * @returns ValidationMessage instance */ - public static create(properties?: google.cloud.datastream.v1.IStreamObject): google.cloud.datastream.v1.StreamObject; + public static create(properties?: google.cloud.datastream.v1.IValidationMessage): google.cloud.datastream.v1.ValidationMessage; /** - * Encodes the specified StreamObject message. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. - * @param message StreamObject message or plain object to encode + * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. + * @param message ValidationMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IStreamObject, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StreamObject message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. - * @param message StreamObject message or plain object to encode + * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. + * @param message ValidationMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IStreamObject, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StreamObject message from the specified reader or buffer. + * Decodes a ValidationMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StreamObject + * @returns ValidationMessage * @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.datastream.v1.StreamObject; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.ValidationMessage; /** - * Decodes a StreamObject message from the specified reader or buffer, length delimited. + * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StreamObject + * @returns ValidationMessage * @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.datastream.v1.StreamObject; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.ValidationMessage; /** - * Verifies a StreamObject message. + * Verifies a ValidationMessage 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 StreamObject message from a plain object. Also converts values to their respective internal types. + * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StreamObject + * @returns ValidationMessage */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.StreamObject; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ValidationMessage; /** - * Creates a plain object from a StreamObject message. Also converts values to other types if specified. - * @param message StreamObject + * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. + * @param message ValidationMessage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.StreamObject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.ValidationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StreamObject to JSON. + * Converts this ValidationMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StreamObject + * Gets the default type url for ValidationMessage * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SourceObjectIdentifier. */ - interface ISourceObjectIdentifier { + namespace ValidationMessage { - /** SourceObjectIdentifier oracleIdentifier */ - oracleIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null); + /** Level enum. */ + enum Level { + LEVEL_UNSPECIFIED = 0, + WARNING = 1, + ERROR = 2 + } + } - /** SourceObjectIdentifier mysqlIdentifier */ - mysqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null); + /** Properties of a CdcStrategy. */ + interface ICdcStrategy { - /** SourceObjectIdentifier postgresqlIdentifier */ - postgresqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null); + /** CdcStrategy mostRecentStartPosition */ + mostRecentStartPosition?: (google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition|null); + + /** CdcStrategy nextAvailableStartPosition */ + nextAvailableStartPosition?: (google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition|null); + + /** CdcStrategy specificStartPosition */ + specificStartPosition?: (google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition|null); } - /** Represents a SourceObjectIdentifier. */ - class SourceObjectIdentifier implements ISourceObjectIdentifier { + /** Represents a CdcStrategy. */ + class CdcStrategy implements ICdcStrategy { /** - * Constructs a new SourceObjectIdentifier. + * Constructs a new CdcStrategy. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.ISourceObjectIdentifier); + constructor(properties?: google.cloud.datastream.v1.ICdcStrategy); - /** SourceObjectIdentifier oracleIdentifier. */ - public oracleIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null); + /** CdcStrategy mostRecentStartPosition. */ + public mostRecentStartPosition?: (google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition|null); - /** SourceObjectIdentifier mysqlIdentifier. */ - public mysqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null); + /** CdcStrategy nextAvailableStartPosition. */ + public nextAvailableStartPosition?: (google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition|null); - /** SourceObjectIdentifier postgresqlIdentifier. */ - public postgresqlIdentifier?: (google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null); + /** CdcStrategy specificStartPosition. */ + public specificStartPosition?: (google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition|null); - /** SourceObjectIdentifier sourceIdentifier. */ - public sourceIdentifier?: ("oracleIdentifier"|"mysqlIdentifier"|"postgresqlIdentifier"); + /** CdcStrategy startPosition. */ + public startPosition?: ("mostRecentStartPosition"|"nextAvailableStartPosition"|"specificStartPosition"); /** - * Creates a new SourceObjectIdentifier instance using the specified properties. + * Creates a new CdcStrategy instance using the specified properties. * @param [properties] Properties to set - * @returns SourceObjectIdentifier instance + * @returns CdcStrategy instance */ - public static create(properties?: google.cloud.datastream.v1.ISourceObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier; + public static create(properties?: google.cloud.datastream.v1.ICdcStrategy): google.cloud.datastream.v1.CdcStrategy; /** - * Encodes the specified SourceObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. - * @param message SourceObjectIdentifier message or plain object to encode + * Encodes the specified CdcStrategy message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.verify|verify} messages. + * @param message CdcStrategy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.ISourceObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ICdcStrategy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. - * @param message SourceObjectIdentifier message or plain object to encode + * Encodes the specified CdcStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.verify|verify} messages. + * @param message CdcStrategy message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.ISourceObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ICdcStrategy, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceObjectIdentifier message from the specified reader or buffer. + * Decodes a CdcStrategy message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceObjectIdentifier + * @returns CdcStrategy * @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.datastream.v1.SourceObjectIdentifier; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.CdcStrategy; /** - * Decodes a SourceObjectIdentifier message from the specified reader or buffer, length delimited. + * Decodes a CdcStrategy message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceObjectIdentifier + * @returns CdcStrategy * @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.datastream.v1.SourceObjectIdentifier; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.CdcStrategy; /** - * Verifies a SourceObjectIdentifier message. + * Verifies a CdcStrategy 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 SourceObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * Creates a CdcStrategy message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceObjectIdentifier + * @returns CdcStrategy */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CdcStrategy; /** - * Creates a plain object from a SourceObjectIdentifier message. Also converts values to other types if specified. - * @param message SourceObjectIdentifier + * Creates a plain object from a CdcStrategy message. Also converts values to other types if specified. + * @param message CdcStrategy * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.CdcStrategy, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceObjectIdentifier to JSON. + * Converts this CdcStrategy to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SourceObjectIdentifier + * Gets the default type url for CdcStrategy * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SourceObjectIdentifier { - - /** Properties of an OracleObjectIdentifier. */ - interface IOracleObjectIdentifier { - - /** OracleObjectIdentifier schema */ - schema?: (string|null); - - /** OracleObjectIdentifier table */ - table?: (string|null); - } - - /** Represents an OracleObjectIdentifier. */ - class OracleObjectIdentifier implements IOracleObjectIdentifier { - - /** - * Constructs a new OracleObjectIdentifier. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier); - - /** OracleObjectIdentifier schema. */ - public schema: string; - - /** OracleObjectIdentifier table. */ - public table: string; - - /** - * Creates a new OracleObjectIdentifier instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleObjectIdentifier instance - */ - public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; - - /** - * Encodes the specified OracleObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. - * @param message OracleObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. - * @param message OracleObjectIdentifier message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleObjectIdentifier message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleObjectIdentifier - * @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.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; - - /** - * Decodes an OracleObjectIdentifier message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleObjectIdentifier - * @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.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; - - /** - * Verifies an OracleObjectIdentifier 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 OracleObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleObjectIdentifier - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier; - - /** - * Creates a plain object from an OracleObjectIdentifier message. Also converts values to other types if specified. - * @param message OracleObjectIdentifier - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleObjectIdentifier to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace CdcStrategy { - /** - * Gets the default type url for OracleObjectIdentifier - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostgresqlObjectIdentifier. */ - interface IPostgresqlObjectIdentifier { - - /** PostgresqlObjectIdentifier schema */ - schema?: (string|null); - - /** PostgresqlObjectIdentifier table */ - table?: (string|null); + /** Properties of a MostRecentStartPosition. */ + interface IMostRecentStartPosition { } - /** Represents a PostgresqlObjectIdentifier. */ - class PostgresqlObjectIdentifier implements IPostgresqlObjectIdentifier { + /** Represents a MostRecentStartPosition. */ + class MostRecentStartPosition implements IMostRecentStartPosition { /** - * Constructs a new PostgresqlObjectIdentifier. + * Constructs a new MostRecentStartPosition. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier); - - /** PostgresqlObjectIdentifier schema. */ - public schema: string; - - /** PostgresqlObjectIdentifier table. */ - public table: string; + constructor(properties?: google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition); /** - * Creates a new PostgresqlObjectIdentifier instance using the specified properties. + * Creates a new MostRecentStartPosition instance using the specified properties. * @param [properties] Properties to set - * @returns PostgresqlObjectIdentifier instance + * @returns MostRecentStartPosition instance */ - public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; + public static create(properties?: google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition): google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition; - /** - * Encodes the specified PostgresqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. - * @param message PostgresqlObjectIdentifier message or plain object to encode + /** + * Encodes the specified MostRecentStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.verify|verify} messages. + * @param message MostRecentStartPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PostgresqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. - * @param message PostgresqlObjectIdentifier message or plain object to encode + * Encodes the specified MostRecentStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.verify|verify} messages. + * @param message MostRecentStartPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer. + * Decodes a MostRecentStartPosition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PostgresqlObjectIdentifier + * @returns MostRecentStartPosition * @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.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition; /** - * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer, length delimited. + * Decodes a MostRecentStartPosition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PostgresqlObjectIdentifier + * @returns MostRecentStartPosition * @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.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition; /** - * Verifies a PostgresqlObjectIdentifier message. + * Verifies a MostRecentStartPosition 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 PostgresqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * Creates a MostRecentStartPosition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PostgresqlObjectIdentifier + * @returns MostRecentStartPosition */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition; /** - * Creates a plain object from a PostgresqlObjectIdentifier message. Also converts values to other types if specified. - * @param message PostgresqlObjectIdentifier + * Creates a plain object from a MostRecentStartPosition message. Also converts values to other types if specified. + * @param message MostRecentStartPosition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PostgresqlObjectIdentifier to JSON. + * Converts this MostRecentStartPosition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PostgresqlObjectIdentifier + * Gets the default type url for MostRecentStartPosition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MysqlObjectIdentifier. */ - interface IMysqlObjectIdentifier { - - /** MysqlObjectIdentifier database */ - database?: (string|null); - - /** MysqlObjectIdentifier table */ - table?: (string|null); + /** Properties of a NextAvailableStartPosition. */ + interface INextAvailableStartPosition { } - /** Represents a MysqlObjectIdentifier. */ - class MysqlObjectIdentifier implements IMysqlObjectIdentifier { + /** Represents a NextAvailableStartPosition. */ + class NextAvailableStartPosition implements INextAvailableStartPosition { /** - * Constructs a new MysqlObjectIdentifier. + * Constructs a new NextAvailableStartPosition. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier); - - /** MysqlObjectIdentifier database. */ - public database: string; - - /** MysqlObjectIdentifier table. */ - public table: string; + constructor(properties?: google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition); /** - * Creates a new MysqlObjectIdentifier instance using the specified properties. + * Creates a new NextAvailableStartPosition instance using the specified properties. * @param [properties] Properties to set - * @returns MysqlObjectIdentifier instance + * @returns NextAvailableStartPosition instance */ - public static create(properties?: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier): google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; + public static create(properties?: google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition): google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition; /** - * Encodes the specified MysqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. - * @param message MysqlObjectIdentifier message or plain object to encode + * Encodes the specified NextAvailableStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.verify|verify} messages. + * @param message NextAvailableStartPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MysqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. - * @param message MysqlObjectIdentifier message or plain object to encode + * Encodes the specified NextAvailableStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.verify|verify} messages. + * @param message NextAvailableStartPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MysqlObjectIdentifier message from the specified reader or buffer. + * Decodes a NextAvailableStartPosition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MysqlObjectIdentifier + * @returns NextAvailableStartPosition * @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.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition; /** - * Decodes a MysqlObjectIdentifier message from the specified reader or buffer, length delimited. + * Decodes a NextAvailableStartPosition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MysqlObjectIdentifier + * @returns NextAvailableStartPosition * @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.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition; /** - * Verifies a MysqlObjectIdentifier message. + * Verifies a NextAvailableStartPosition 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 MysqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * Creates a NextAvailableStartPosition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MysqlObjectIdentifier + * @returns NextAvailableStartPosition */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition; /** - * Creates a plain object from a MysqlObjectIdentifier message. Also converts values to other types if specified. - * @param message MysqlObjectIdentifier + * Creates a plain object from a NextAvailableStartPosition message. Also converts values to other types if specified. + * @param message NextAvailableStartPosition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MysqlObjectIdentifier to JSON. + * Converts this NextAvailableStartPosition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MysqlObjectIdentifier + * Gets the default type url for NextAvailableStartPosition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** Properties of a BackfillJob. */ - interface IBackfillJob { - - /** BackfillJob state */ - state?: (google.cloud.datastream.v1.BackfillJob.State|keyof typeof google.cloud.datastream.v1.BackfillJob.State|null); - - /** BackfillJob trigger */ - trigger?: (google.cloud.datastream.v1.BackfillJob.Trigger|keyof typeof google.cloud.datastream.v1.BackfillJob.Trigger|null); - - /** BackfillJob lastStartTime */ - lastStartTime?: (google.protobuf.ITimestamp|null); - - /** BackfillJob lastEndTime */ - lastEndTime?: (google.protobuf.ITimestamp|null); - - /** BackfillJob errors */ - errors?: (google.cloud.datastream.v1.IError[]|null); - } - - /** Represents a BackfillJob. */ - class BackfillJob implements IBackfillJob { - - /** - * Constructs a new BackfillJob. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IBackfillJob); - - /** BackfillJob state. */ - public state: (google.cloud.datastream.v1.BackfillJob.State|keyof typeof google.cloud.datastream.v1.BackfillJob.State); - - /** BackfillJob trigger. */ - public trigger: (google.cloud.datastream.v1.BackfillJob.Trigger|keyof typeof google.cloud.datastream.v1.BackfillJob.Trigger); - - /** BackfillJob lastStartTime. */ - public lastStartTime?: (google.protobuf.ITimestamp|null); - - /** BackfillJob lastEndTime. */ - public lastEndTime?: (google.protobuf.ITimestamp|null); - - /** BackfillJob errors. */ - public errors: google.cloud.datastream.v1.IError[]; - - /** - * Creates a new BackfillJob instance using the specified properties. - * @param [properties] Properties to set - * @returns BackfillJob instance - */ - public static create(properties?: google.cloud.datastream.v1.IBackfillJob): google.cloud.datastream.v1.BackfillJob; - - /** - * Encodes the specified BackfillJob message. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. - * @param message BackfillJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IBackfillJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackfillJob message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. - * @param message BackfillJob message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IBackfillJob, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackfillJob message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackfillJob - * @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.datastream.v1.BackfillJob; - - /** - * Decodes a BackfillJob message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackfillJob - * @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.datastream.v1.BackfillJob; - - /** - * Verifies a BackfillJob 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 BackfillJob message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackfillJob - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.BackfillJob; - - /** - * Creates a plain object from a BackfillJob message. Also converts values to other types if specified. - * @param message BackfillJob - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.BackfillJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackfillJob to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for BackfillJob - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a SpecificStartPosition. */ + interface ISpecificStartPosition { - namespace BackfillJob { + /** SpecificStartPosition mysqlLogPosition */ + mysqlLogPosition?: (google.cloud.datastream.v1.IMysqlLogPosition|null); - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - NOT_STARTED = 1, - PENDING = 2, - ACTIVE = 3, - STOPPED = 4, - FAILED = 5, - COMPLETED = 6, - UNSUPPORTED = 7 - } + /** SpecificStartPosition oracleScnPosition */ + oracleScnPosition?: (google.cloud.datastream.v1.IOracleScnPosition|null); - /** Trigger enum. */ - enum Trigger { - TRIGGER_UNSPECIFIED = 0, - AUTOMATIC = 1, - MANUAL = 2 + /** SpecificStartPosition sqlServerLsnPosition */ + sqlServerLsnPosition?: (google.cloud.datastream.v1.ISqlServerLsnPosition|null); } - } - - /** Properties of an Error. */ - interface IError { - - /** Error reason */ - reason?: (string|null); - - /** Error errorUuid */ - errorUuid?: (string|null); - - /** Error message */ - message?: (string|null); - - /** Error errorTime */ - errorTime?: (google.protobuf.ITimestamp|null); - - /** Error details */ - details?: ({ [k: string]: string }|null); - } - - /** Represents an Error. */ - class Error implements IError { - - /** - * Constructs a new Error. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.datastream.v1.IError); - - /** Error reason. */ - public reason: string; - /** Error errorUuid. */ - public errorUuid: string; + /** Represents a SpecificStartPosition. */ + class SpecificStartPosition implements ISpecificStartPosition { - /** Error message. */ - public message: string; + /** + * Constructs a new SpecificStartPosition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition); - /** Error errorTime. */ - public errorTime?: (google.protobuf.ITimestamp|null); + /** SpecificStartPosition mysqlLogPosition. */ + public mysqlLogPosition?: (google.cloud.datastream.v1.IMysqlLogPosition|null); - /** Error details. */ - public details: { [k: string]: string }; + /** SpecificStartPosition oracleScnPosition. */ + public oracleScnPosition?: (google.cloud.datastream.v1.IOracleScnPosition|null); - /** - * Creates a new Error instance using the specified properties. - * @param [properties] Properties to set - * @returns Error instance - */ - public static create(properties?: google.cloud.datastream.v1.IError): google.cloud.datastream.v1.Error; + /** SpecificStartPosition sqlServerLsnPosition. */ + public sqlServerLsnPosition?: (google.cloud.datastream.v1.ISqlServerLsnPosition|null); - /** - * Encodes the specified Error message. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. - * @param message Error message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.datastream.v1.IError, writer?: $protobuf.Writer): $protobuf.Writer; + /** SpecificStartPosition position. */ + public position?: ("mysqlLogPosition"|"oracleScnPosition"|"sqlServerLsnPosition"); - /** - * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. - * @param message Error message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.datastream.v1.IError, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new SpecificStartPosition instance using the specified properties. + * @param [properties] Properties to set + * @returns SpecificStartPosition instance + */ + public static create(properties?: google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition): google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition; - /** - * Decodes an Error message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Error - * @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.datastream.v1.Error; + /** + * Encodes the specified SpecificStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.verify|verify} messages. + * @param message SpecificStartPosition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Error message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Error - * @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.datastream.v1.Error; + /** + * Encodes the specified SpecificStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.verify|verify} messages. + * @param message SpecificStartPosition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an Error 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); + /** + * Decodes a SpecificStartPosition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpecificStartPosition + * @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.datastream.v1.CdcStrategy.SpecificStartPosition; - /** - * Creates an Error message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Error - */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Error; + /** + * Decodes a SpecificStartPosition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpecificStartPosition + * @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.datastream.v1.CdcStrategy.SpecificStartPosition; - /** - * Creates a plain object from an Error message. Also converts values to other types if specified. - * @param message Error - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.datastream.v1.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a SpecificStartPosition 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); - /** - * Converts this Error to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a SpecificStartPosition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpecificStartPosition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition; - /** - * Gets the default type url for Error - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Creates a plain object from a SpecificStartPosition message. Also converts values to other types if specified. + * @param message SpecificStartPosition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SpecificStartPosition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SpecificStartPosition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of a ValidationResult. */ - interface IValidationResult { + /** Properties of a SqlServerLsnPosition. */ + interface ISqlServerLsnPosition { - /** ValidationResult validations */ - validations?: (google.cloud.datastream.v1.IValidation[]|null); + /** SqlServerLsnPosition lsn */ + lsn?: (string|null); } - /** Represents a ValidationResult. */ - class ValidationResult implements IValidationResult { + /** Represents a SqlServerLsnPosition. */ + class SqlServerLsnPosition implements ISqlServerLsnPosition { /** - * Constructs a new ValidationResult. + * Constructs a new SqlServerLsnPosition. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IValidationResult); + constructor(properties?: google.cloud.datastream.v1.ISqlServerLsnPosition); - /** ValidationResult validations. */ - public validations: google.cloud.datastream.v1.IValidation[]; + /** SqlServerLsnPosition lsn. */ + public lsn: string; /** - * Creates a new ValidationResult instance using the specified properties. + * Creates a new SqlServerLsnPosition instance using the specified properties. * @param [properties] Properties to set - * @returns ValidationResult instance + * @returns SqlServerLsnPosition instance */ - public static create(properties?: google.cloud.datastream.v1.IValidationResult): google.cloud.datastream.v1.ValidationResult; + public static create(properties?: google.cloud.datastream.v1.ISqlServerLsnPosition): google.cloud.datastream.v1.SqlServerLsnPosition; /** - * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. - * @param message ValidationResult message or plain object to encode + * Encodes the specified SqlServerLsnPosition message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerLsnPosition.verify|verify} messages. + * @param message SqlServerLsnPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.ISqlServerLsnPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. - * @param message ValidationResult message or plain object to encode + * Encodes the specified SqlServerLsnPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerLsnPosition.verify|verify} messages. + * @param message SqlServerLsnPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.ISqlServerLsnPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidationResult message from the specified reader or buffer. + * Decodes a SqlServerLsnPosition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidationResult + * @returns SqlServerLsnPosition * @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.datastream.v1.ValidationResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.SqlServerLsnPosition; /** - * Decodes a ValidationResult message from the specified reader or buffer, length delimited. + * Decodes a SqlServerLsnPosition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidationResult + * @returns SqlServerLsnPosition * @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.datastream.v1.ValidationResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.SqlServerLsnPosition; /** - * Verifies a ValidationResult message. + * Verifies a SqlServerLsnPosition 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 ValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerLsnPosition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidationResult + * @returns SqlServerLsnPosition */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ValidationResult; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.SqlServerLsnPosition; /** - * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. - * @param message ValidationResult + * Creates a plain object from a SqlServerLsnPosition message. Also converts values to other types if specified. + * @param message SqlServerLsnPosition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.ValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.SqlServerLsnPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidationResult to JSON. + * Converts this SqlServerLsnPosition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ValidationResult + * Gets the default type url for SqlServerLsnPosition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Validation. */ - interface IValidation { - - /** Validation description */ - description?: (string|null); - - /** Validation state */ - state?: (google.cloud.datastream.v1.Validation.State|keyof typeof google.cloud.datastream.v1.Validation.State|null); - - /** Validation message */ - message?: (google.cloud.datastream.v1.IValidationMessage[]|null); + /** Properties of an OracleScnPosition. */ + interface IOracleScnPosition { - /** Validation code */ - code?: (string|null); + /** OracleScnPosition scn */ + scn?: (number|Long|string|null); } - /** Represents a Validation. */ - class Validation implements IValidation { + /** Represents an OracleScnPosition. */ + class OracleScnPosition implements IOracleScnPosition { /** - * Constructs a new Validation. + * Constructs a new OracleScnPosition. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IValidation); - - /** Validation description. */ - public description: string; - - /** Validation state. */ - public state: (google.cloud.datastream.v1.Validation.State|keyof typeof google.cloud.datastream.v1.Validation.State); - - /** Validation message. */ - public message: google.cloud.datastream.v1.IValidationMessage[]; + constructor(properties?: google.cloud.datastream.v1.IOracleScnPosition); - /** Validation code. */ - public code: string; + /** OracleScnPosition scn. */ + public scn: (number|Long|string); /** - * Creates a new Validation instance using the specified properties. + * Creates a new OracleScnPosition instance using the specified properties. * @param [properties] Properties to set - * @returns Validation instance + * @returns OracleScnPosition instance */ - public static create(properties?: google.cloud.datastream.v1.IValidation): google.cloud.datastream.v1.Validation; + public static create(properties?: google.cloud.datastream.v1.IOracleScnPosition): google.cloud.datastream.v1.OracleScnPosition; /** - * Encodes the specified Validation message. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. - * @param message Validation message or plain object to encode + * Encodes the specified OracleScnPosition message. Does not implicitly {@link google.cloud.datastream.v1.OracleScnPosition.verify|verify} messages. + * @param message OracleScnPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.IOracleScnPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. - * @param message Validation message or plain object to encode + * Encodes the specified OracleScnPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleScnPosition.verify|verify} messages. + * @param message OracleScnPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IValidation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.IOracleScnPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Validation message from the specified reader or buffer. + * Decodes an OracleScnPosition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Validation + * @returns OracleScnPosition * @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.datastream.v1.Validation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.OracleScnPosition; /** - * Decodes a Validation message from the specified reader or buffer, length delimited. + * Decodes an OracleScnPosition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Validation + * @returns OracleScnPosition * @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.datastream.v1.Validation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.OracleScnPosition; /** - * Verifies a Validation message. + * Verifies an OracleScnPosition 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 Validation message from a plain object. Also converts values to their respective internal types. + * Creates an OracleScnPosition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Validation + * @returns OracleScnPosition */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.Validation; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.OracleScnPosition; /** - * Creates a plain object from a Validation message. Also converts values to other types if specified. - * @param message Validation + * Creates a plain object from an OracleScnPosition message. Also converts values to other types if specified. + * @param message OracleScnPosition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.Validation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.OracleScnPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Validation to JSON. + * Converts this OracleScnPosition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Validation + * Gets the default type url for OracleScnPosition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Validation { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - NOT_EXECUTED = 1, - FAILED = 2, - PASSED = 3 - } - } - - /** Properties of a ValidationMessage. */ - interface IValidationMessage { - - /** ValidationMessage message */ - message?: (string|null); - - /** ValidationMessage level */ - level?: (google.cloud.datastream.v1.ValidationMessage.Level|keyof typeof google.cloud.datastream.v1.ValidationMessage.Level|null); + /** Properties of a MysqlLogPosition. */ + interface IMysqlLogPosition { - /** ValidationMessage metadata */ - metadata?: ({ [k: string]: string }|null); + /** MysqlLogPosition logFile */ + logFile?: (string|null); - /** ValidationMessage code */ - code?: (string|null); + /** MysqlLogPosition logPosition */ + logPosition?: (number|null); } - /** Represents a ValidationMessage. */ - class ValidationMessage implements IValidationMessage { + /** Represents a MysqlLogPosition. */ + class MysqlLogPosition implements IMysqlLogPosition { /** - * Constructs a new ValidationMessage. + * Constructs a new MysqlLogPosition. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datastream.v1.IValidationMessage); - - /** ValidationMessage message. */ - public message: string; + constructor(properties?: google.cloud.datastream.v1.IMysqlLogPosition); - /** ValidationMessage level. */ - public level: (google.cloud.datastream.v1.ValidationMessage.Level|keyof typeof google.cloud.datastream.v1.ValidationMessage.Level); + /** MysqlLogPosition logFile. */ + public logFile: string; - /** ValidationMessage metadata. */ - public metadata: { [k: string]: string }; + /** MysqlLogPosition logPosition. */ + public logPosition?: (number|null); - /** ValidationMessage code. */ - public code: string; + /** MysqlLogPosition _logPosition. */ + public _logPosition?: "logPosition"; /** - * Creates a new ValidationMessage instance using the specified properties. + * Creates a new MysqlLogPosition instance using the specified properties. * @param [properties] Properties to set - * @returns ValidationMessage instance + * @returns MysqlLogPosition instance */ - public static create(properties?: google.cloud.datastream.v1.IValidationMessage): google.cloud.datastream.v1.ValidationMessage; + public static create(properties?: google.cloud.datastream.v1.IMysqlLogPosition): google.cloud.datastream.v1.MysqlLogPosition; /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. - * @param message ValidationMessage message or plain object to encode + * Encodes the specified MysqlLogPosition message. Does not implicitly {@link google.cloud.datastream.v1.MysqlLogPosition.verify|verify} messages. + * @param message MysqlLogPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datastream.v1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datastream.v1.IMysqlLogPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. - * @param message ValidationMessage message or plain object to encode + * Encodes the specified MysqlLogPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlLogPosition.verify|verify} messages. + * @param message MysqlLogPosition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datastream.v1.IValidationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datastream.v1.IMysqlLogPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ValidationMessage message from the specified reader or buffer. + * Decodes a MysqlLogPosition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ValidationMessage + * @returns MysqlLogPosition * @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.datastream.v1.ValidationMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datastream.v1.MysqlLogPosition; /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. + * Decodes a MysqlLogPosition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ValidationMessage + * @returns MysqlLogPosition * @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.datastream.v1.ValidationMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datastream.v1.MysqlLogPosition; /** - * Verifies a ValidationMessage message. + * Verifies a MysqlLogPosition 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 ValidationMessage message from a plain object. Also converts values to their respective internal types. + * Creates a MysqlLogPosition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ValidationMessage + * @returns MysqlLogPosition */ - public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.ValidationMessage; + public static fromObject(object: { [k: string]: any }): google.cloud.datastream.v1.MysqlLogPosition; /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. - * @param message ValidationMessage + * Creates a plain object from a MysqlLogPosition message. Also converts values to other types if specified. + * @param message MysqlLogPosition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datastream.v1.ValidationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datastream.v1.MysqlLogPosition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ValidationMessage to JSON. + * Converts this MysqlLogPosition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ValidationMessage + * Gets the default type url for MysqlLogPosition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - namespace ValidationMessage { - - /** Level enum. */ - enum Level { - LEVEL_UNSPECIFIED = 0, - WARNING = 1, - ERROR = 2 - } - } } /** Namespace v1alpha1. */ diff --git a/packages/google-cloud-datastream/protos/protos.js b/packages/google-cloud-datastream/protos/protos.js index f145df5a7df..86cd82c6721 100644 --- a/packages/google-cloud-datastream/protos/protos.js +++ b/packages/google-cloud-datastream/protos/protos.js @@ -461,6 +461,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.datastream.v1.Datastream|runStream}. + * @memberof google.cloud.datastream.v1.Datastream + * @typedef RunStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RunStream. + * @function runStream + * @memberof google.cloud.datastream.v1.Datastream + * @instance + * @param {google.cloud.datastream.v1.IRunStreamRequest} request RunStreamRequest message or plain object + * @param {google.cloud.datastream.v1.Datastream.RunStreamCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Datastream.prototype.runStream = function runStream(request, callback) { + return this.rpcCall(runStream, $root.google.cloud.datastream.v1.RunStreamRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunStream" }); + + /** + * Calls RunStream. + * @function runStream + * @memberof google.cloud.datastream.v1.Datastream + * @instance + * @param {google.cloud.datastream.v1.IRunStreamRequest} request RunStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.datastream.v1.Datastream|getStreamObject}. * @memberof google.cloud.datastream.v1.Datastream @@ -940,6 +973,7 @@ * @property {google.cloud.datastream.v1.IOracleRdbms|null} [oracleRdbms] DiscoverConnectionProfileRequest oracleRdbms * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [mysqlRdbms] DiscoverConnectionProfileRequest mysqlRdbms * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [postgresqlRdbms] DiscoverConnectionProfileRequest postgresqlRdbms + * @property {google.cloud.datastream.v1.ISqlServerRdbms|null} [sqlServerRdbms] DiscoverConnectionProfileRequest sqlServerRdbms */ /** @@ -1021,6 +1055,14 @@ */ DiscoverConnectionProfileRequest.prototype.postgresqlRdbms = null; + /** + * DiscoverConnectionProfileRequest sqlServerRdbms. + * @member {google.cloud.datastream.v1.ISqlServerRdbms|null|undefined} sqlServerRdbms + * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest + * @instance + */ + DiscoverConnectionProfileRequest.prototype.sqlServerRdbms = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -1048,12 +1090,12 @@ /** * DiscoverConnectionProfileRequest dataObject. - * @member {"oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"|undefined} dataObject + * @member {"oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"|"sqlServerRdbms"|undefined} dataObject * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileRequest * @instance */ Object.defineProperty(DiscoverConnectionProfileRequest.prototype, "dataObject", { - get: $util.oneOfGetter($oneOfFields = ["oracleRdbms", "mysqlRdbms", "postgresqlRdbms"]), + get: $util.oneOfGetter($oneOfFields = ["oracleRdbms", "mysqlRdbms", "postgresqlRdbms", "sqlServerRdbms"]), set: $util.oneOfSetter($oneOfFields) }); @@ -1093,6 +1135,8 @@ $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.mysqlRdbms, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); if (message.postgresqlRdbms != null && Object.hasOwnProperty.call(message, "postgresqlRdbms")) $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.postgresqlRdbms, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.sqlServerRdbms != null && Object.hasOwnProperty.call(message, "sqlServerRdbms")) + $root.google.cloud.datastream.v1.SqlServerRdbms.encode(message.sqlServerRdbms, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) $root.google.cloud.datastream.v1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); if (message.connectionProfileName != null && Object.hasOwnProperty.call(message, "connectionProfileName")) @@ -1163,6 +1207,10 @@ message.postgresqlRdbms = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); break; } + case 103: { + message.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1257,6 +1305,16 @@ return "postgresqlRdbms." + error; } } + if (message.sqlServerRdbms != null && message.hasOwnProperty("sqlServerRdbms")) { + if (properties.dataObject === 1) + return "dataObject: multiple values"; + properties.dataObject = 1; + { + var error = $root.google.cloud.datastream.v1.SqlServerRdbms.verify(message.sqlServerRdbms); + if (error) + return "sqlServerRdbms." + error; + } + } return null; }; @@ -1300,6 +1358,11 @@ throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileRequest.postgresqlRdbms: object expected"); message.postgresqlRdbms = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.postgresqlRdbms); } + if (object.sqlServerRdbms != null) { + if (typeof object.sqlServerRdbms !== "object") + throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileRequest.sqlServerRdbms: object expected"); + message.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.fromObject(object.sqlServerRdbms); + } return message; }; @@ -1345,6 +1408,11 @@ if (options.oneofs) object.dataObject = "postgresqlRdbms"; } + if (message.sqlServerRdbms != null && message.hasOwnProperty("sqlServerRdbms")) { + object.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.toObject(message.sqlServerRdbms, options); + if (options.oneofs) + object.dataObject = "sqlServerRdbms"; + } if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { object.connectionProfile = $root.google.cloud.datastream.v1.ConnectionProfile.toObject(message.connectionProfile, options); if (options.oneofs) @@ -1396,6 +1464,7 @@ * @property {google.cloud.datastream.v1.IOracleRdbms|null} [oracleRdbms] DiscoverConnectionProfileResponse oracleRdbms * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [mysqlRdbms] DiscoverConnectionProfileResponse mysqlRdbms * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [postgresqlRdbms] DiscoverConnectionProfileResponse postgresqlRdbms + * @property {google.cloud.datastream.v1.ISqlServerRdbms|null} [sqlServerRdbms] DiscoverConnectionProfileResponse sqlServerRdbms */ /** @@ -1437,17 +1506,25 @@ */ DiscoverConnectionProfileResponse.prototype.postgresqlRdbms = null; + /** + * DiscoverConnectionProfileResponse sqlServerRdbms. + * @member {google.cloud.datastream.v1.ISqlServerRdbms|null|undefined} sqlServerRdbms + * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse + * @instance + */ + DiscoverConnectionProfileResponse.prototype.sqlServerRdbms = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * DiscoverConnectionProfileResponse dataObject. - * @member {"oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"|undefined} dataObject + * @member {"oracleRdbms"|"mysqlRdbms"|"postgresqlRdbms"|"sqlServerRdbms"|undefined} dataObject * @memberof google.cloud.datastream.v1.DiscoverConnectionProfileResponse * @instance */ Object.defineProperty(DiscoverConnectionProfileResponse.prototype, "dataObject", { - get: $util.oneOfGetter($oneOfFields = ["oracleRdbms", "mysqlRdbms", "postgresqlRdbms"]), + get: $util.oneOfGetter($oneOfFields = ["oracleRdbms", "mysqlRdbms", "postgresqlRdbms", "sqlServerRdbms"]), set: $util.oneOfSetter($oneOfFields) }); @@ -1481,6 +1558,8 @@ $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.mysqlRdbms, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); if (message.postgresqlRdbms != null && Object.hasOwnProperty.call(message, "postgresqlRdbms")) $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.postgresqlRdbms, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.sqlServerRdbms != null && Object.hasOwnProperty.call(message, "sqlServerRdbms")) + $root.google.cloud.datastream.v1.SqlServerRdbms.encode(message.sqlServerRdbms, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); return writer; }; @@ -1527,6 +1606,10 @@ message.postgresqlRdbms = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); break; } + case 103: { + message.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1591,6 +1674,16 @@ return "postgresqlRdbms." + error; } } + if (message.sqlServerRdbms != null && message.hasOwnProperty("sqlServerRdbms")) { + if (properties.dataObject === 1) + return "dataObject: multiple values"; + properties.dataObject = 1; + { + var error = $root.google.cloud.datastream.v1.SqlServerRdbms.verify(message.sqlServerRdbms); + if (error) + return "sqlServerRdbms." + error; + } + } return null; }; @@ -1621,6 +1714,11 @@ throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileResponse.postgresqlRdbms: object expected"); message.postgresqlRdbms = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.postgresqlRdbms); } + if (object.sqlServerRdbms != null) { + if (typeof object.sqlServerRdbms !== "object") + throw TypeError(".google.cloud.datastream.v1.DiscoverConnectionProfileResponse.sqlServerRdbms: object expected"); + message.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.fromObject(object.sqlServerRdbms); + } return message; }; @@ -1652,6 +1750,11 @@ if (options.oneofs) object.dataObject = "postgresqlRdbms"; } + if (message.sqlServerRdbms != null && message.hasOwnProperty("sqlServerRdbms")) { + object.sqlServerRdbms = $root.google.cloud.datastream.v1.SqlServerRdbms.toObject(message.sqlServerRdbms, options); + if (options.oneofs) + object.dataObject = "sqlServerRdbms"; + } return object; }; @@ -5465,6 +5568,261 @@ return DeleteStreamRequest; })(); + v1.RunStreamRequest = (function() { + + /** + * Properties of a RunStreamRequest. + * @memberof google.cloud.datastream.v1 + * @interface IRunStreamRequest + * @property {string|null} [name] RunStreamRequest name + * @property {google.cloud.datastream.v1.ICdcStrategy|null} [cdcStrategy] RunStreamRequest cdcStrategy + * @property {boolean|null} [force] RunStreamRequest force + */ + + /** + * Constructs a new RunStreamRequest. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a RunStreamRequest. + * @implements IRunStreamRequest + * @constructor + * @param {google.cloud.datastream.v1.IRunStreamRequest=} [properties] Properties to set + */ + function RunStreamRequest(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]]; + } + + /** + * RunStreamRequest name. + * @member {string} name + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @instance + */ + RunStreamRequest.prototype.name = ""; + + /** + * RunStreamRequest cdcStrategy. + * @member {google.cloud.datastream.v1.ICdcStrategy|null|undefined} cdcStrategy + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @instance + */ + RunStreamRequest.prototype.cdcStrategy = null; + + /** + * RunStreamRequest force. + * @member {boolean} force + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @instance + */ + RunStreamRequest.prototype.force = false; + + /** + * Creates a new RunStreamRequest instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @static + * @param {google.cloud.datastream.v1.IRunStreamRequest=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.RunStreamRequest} RunStreamRequest instance + */ + RunStreamRequest.create = function create(properties) { + return new RunStreamRequest(properties); + }; + + /** + * Encodes the specified RunStreamRequest message. Does not implicitly {@link google.cloud.datastream.v1.RunStreamRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @static + * @param {google.cloud.datastream.v1.IRunStreamRequest} message RunStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunStreamRequest.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.cdcStrategy != null && Object.hasOwnProperty.call(message, "cdcStrategy")) + $root.google.cloud.datastream.v1.CdcStrategy.encode(message.cdcStrategy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + return writer; + }; + + /** + * Encodes the specified RunStreamRequest message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.RunStreamRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @static + * @param {google.cloud.datastream.v1.IRunStreamRequest} message RunStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunStreamRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.RunStreamRequest} RunStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunStreamRequest.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.datastream.v1.RunStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.cdcStrategy = $root.google.cloud.datastream.v1.CdcStrategy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunStreamRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.RunStreamRequest} RunStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunStreamRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunStreamRequest message. + * @function verify + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunStreamRequest.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.cdcStrategy != null && message.hasOwnProperty("cdcStrategy")) { + var error = $root.google.cloud.datastream.v1.CdcStrategy.verify(message.cdcStrategy); + if (error) + return "cdcStrategy." + error; + } + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a RunStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.RunStreamRequest} RunStreamRequest + */ + RunStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.RunStreamRequest) + return object; + var message = new $root.google.cloud.datastream.v1.RunStreamRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.cdcStrategy != null) { + if (typeof object.cdcStrategy !== "object") + throw TypeError(".google.cloud.datastream.v1.RunStreamRequest.cdcStrategy: object expected"); + message.cdcStrategy = $root.google.cloud.datastream.v1.CdcStrategy.fromObject(object.cdcStrategy); + } + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a RunStreamRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @static + * @param {google.cloud.datastream.v1.RunStreamRequest} message RunStreamRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunStreamRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.cdcStrategy = null; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.cdcStrategy != null && message.hasOwnProperty("cdcStrategy")) + object.cdcStrategy = $root.google.cloud.datastream.v1.CdcStrategy.toObject(message.cdcStrategy, options); + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this RunStreamRequest to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @instance + * @returns {Object.} JSON object + */ + RunStreamRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunStreamRequest + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.RunStreamRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.RunStreamRequest"; + }; + + return RunStreamRequest; + })(); + v1.GetStreamObjectRequest = (function() { /** @@ -10242,6 +10600,9 @@ * @property {string|null} [password] OracleProfile password * @property {string|null} [databaseService] OracleProfile databaseService * @property {Object.|null} [connectionAttributes] OracleProfile connectionAttributes + * @property {google.cloud.datastream.v1.IOracleSslConfig|null} [oracleSslConfig] OracleProfile oracleSslConfig + * @property {google.cloud.datastream.v1.IOracleAsmConfig|null} [oracleAsmConfig] OracleProfile oracleAsmConfig + * @property {string|null} [secretManagerStoredPassword] OracleProfile secretManagerStoredPassword */ /** @@ -10308,6 +10669,30 @@ */ OracleProfile.prototype.connectionAttributes = $util.emptyObject; + /** + * OracleProfile oracleSslConfig. + * @member {google.cloud.datastream.v1.IOracleSslConfig|null|undefined} oracleSslConfig + * @memberof google.cloud.datastream.v1.OracleProfile + * @instance + */ + OracleProfile.prototype.oracleSslConfig = null; + + /** + * OracleProfile oracleAsmConfig. + * @member {google.cloud.datastream.v1.IOracleAsmConfig|null|undefined} oracleAsmConfig + * @memberof google.cloud.datastream.v1.OracleProfile + * @instance + */ + OracleProfile.prototype.oracleAsmConfig = null; + + /** + * OracleProfile secretManagerStoredPassword. + * @member {string} secretManagerStoredPassword + * @memberof google.cloud.datastream.v1.OracleProfile + * @instance + */ + OracleProfile.prototype.secretManagerStoredPassword = ""; + /** * Creates a new OracleProfile instance using the specified properties. * @function create @@ -10345,6 +10730,12 @@ if (message.connectionAttributes != null && Object.hasOwnProperty.call(message, "connectionAttributes")) for (var keys = Object.keys(message.connectionAttributes), i = 0; i < keys.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.connectionAttributes[keys[i]]).ldelim(); + if (message.oracleSslConfig != null && Object.hasOwnProperty.call(message, "oracleSslConfig")) + $root.google.cloud.datastream.v1.OracleSslConfig.encode(message.oracleSslConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oracleAsmConfig != null && Object.hasOwnProperty.call(message, "oracleAsmConfig")) + $root.google.cloud.datastream.v1.OracleAsmConfig.encode(message.oracleAsmConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.secretManagerStoredPassword != null && Object.hasOwnProperty.call(message, "secretManagerStoredPassword")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.secretManagerStoredPassword); return writer; }; @@ -10422,13 +10813,25 @@ message.connectionAttributes[key] = value; break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + case 7: { + message.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.oracleAsmConfig = $root.google.cloud.datastream.v1.OracleAsmConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.secretManagerStoredPassword = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** * Decodes an OracleProfile message from the specified reader or buffer, length delimited. @@ -10480,6 +10883,19 @@ if (!$util.isString(message.connectionAttributes[key[i]])) return "connectionAttributes: string{k:string} expected"; } + if (message.oracleSslConfig != null && message.hasOwnProperty("oracleSslConfig")) { + var error = $root.google.cloud.datastream.v1.OracleSslConfig.verify(message.oracleSslConfig); + if (error) + return "oracleSslConfig." + error; + } + if (message.oracleAsmConfig != null && message.hasOwnProperty("oracleAsmConfig")) { + var error = $root.google.cloud.datastream.v1.OracleAsmConfig.verify(message.oracleAsmConfig); + if (error) + return "oracleAsmConfig." + error; + } + if (message.secretManagerStoredPassword != null && message.hasOwnProperty("secretManagerStoredPassword")) + if (!$util.isString(message.secretManagerStoredPassword)) + return "secretManagerStoredPassword: string expected"; return null; }; @@ -10512,6 +10928,18 @@ for (var keys = Object.keys(object.connectionAttributes), i = 0; i < keys.length; ++i) message.connectionAttributes[keys[i]] = String(object.connectionAttributes[keys[i]]); } + if (object.oracleSslConfig != null) { + if (typeof object.oracleSslConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleProfile.oracleSslConfig: object expected"); + message.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.fromObject(object.oracleSslConfig); + } + if (object.oracleAsmConfig != null) { + if (typeof object.oracleAsmConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleProfile.oracleAsmConfig: object expected"); + message.oracleAsmConfig = $root.google.cloud.datastream.v1.OracleAsmConfig.fromObject(object.oracleAsmConfig); + } + if (object.secretManagerStoredPassword != null) + message.secretManagerStoredPassword = String(object.secretManagerStoredPassword); return message; }; @@ -10536,6 +10964,9 @@ object.username = ""; object.password = ""; object.databaseService = ""; + object.oracleSslConfig = null; + object.oracleAsmConfig = null; + object.secretManagerStoredPassword = ""; } if (message.hostname != null && message.hasOwnProperty("hostname")) object.hostname = message.hostname; @@ -10553,6 +10984,12 @@ for (var j = 0; j < keys2.length; ++j) object.connectionAttributes[keys2[j]] = message.connectionAttributes[keys2[j]]; } + if (message.oracleSslConfig != null && message.hasOwnProperty("oracleSslConfig")) + object.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.toObject(message.oracleSslConfig, options); + if (message.oracleAsmConfig != null && message.hasOwnProperty("oracleAsmConfig")) + object.oracleAsmConfig = $root.google.cloud.datastream.v1.OracleAsmConfig.toObject(message.oracleAsmConfig, options); + if (message.secretManagerStoredPassword != null && message.hasOwnProperty("secretManagerStoredPassword")) + object.secretManagerStoredPassword = message.secretManagerStoredPassword; return object; }; @@ -10585,28 +11022,31 @@ return OracleProfile; })(); - v1.MysqlProfile = (function() { + v1.OracleAsmConfig = (function() { /** - * Properties of a MysqlProfile. + * Properties of an OracleAsmConfig. * @memberof google.cloud.datastream.v1 - * @interface IMysqlProfile - * @property {string|null} [hostname] MysqlProfile hostname - * @property {number|null} [port] MysqlProfile port - * @property {string|null} [username] MysqlProfile username - * @property {string|null} [password] MysqlProfile password - * @property {google.cloud.datastream.v1.IMysqlSslConfig|null} [sslConfig] MysqlProfile sslConfig + * @interface IOracleAsmConfig + * @property {string|null} [hostname] OracleAsmConfig hostname + * @property {number|null} [port] OracleAsmConfig port + * @property {string|null} [username] OracleAsmConfig username + * @property {string|null} [password] OracleAsmConfig password + * @property {string|null} [asmService] OracleAsmConfig asmService + * @property {Object.|null} [connectionAttributes] OracleAsmConfig connectionAttributes + * @property {google.cloud.datastream.v1.IOracleSslConfig|null} [oracleSslConfig] OracleAsmConfig oracleSslConfig */ /** - * Constructs a new MysqlProfile. + * Constructs a new OracleAsmConfig. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlProfile. - * @implements IMysqlProfile + * @classdesc Represents an OracleAsmConfig. + * @implements IOracleAsmConfig * @constructor - * @param {google.cloud.datastream.v1.IMysqlProfile=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IOracleAsmConfig=} [properties] Properties to set */ - function MysqlProfile(properties) { + function OracleAsmConfig(properties) { + this.connectionAttributes = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10614,67 +11054,83 @@ } /** - * MysqlProfile hostname. + * OracleAsmConfig hostname. * @member {string} hostname - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @instance */ - MysqlProfile.prototype.hostname = ""; + OracleAsmConfig.prototype.hostname = ""; /** - * MysqlProfile port. + * OracleAsmConfig port. * @member {number} port - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @instance */ - MysqlProfile.prototype.port = 0; + OracleAsmConfig.prototype.port = 0; /** - * MysqlProfile username. + * OracleAsmConfig username. * @member {string} username - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @instance */ - MysqlProfile.prototype.username = ""; + OracleAsmConfig.prototype.username = ""; /** - * MysqlProfile password. + * OracleAsmConfig password. * @member {string} password - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @instance */ - MysqlProfile.prototype.password = ""; + OracleAsmConfig.prototype.password = ""; /** - * MysqlProfile sslConfig. - * @member {google.cloud.datastream.v1.IMysqlSslConfig|null|undefined} sslConfig - * @memberof google.cloud.datastream.v1.MysqlProfile + * OracleAsmConfig asmService. + * @member {string} asmService + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @instance */ - MysqlProfile.prototype.sslConfig = null; + OracleAsmConfig.prototype.asmService = ""; /** - * Creates a new MysqlProfile instance using the specified properties. + * OracleAsmConfig connectionAttributes. + * @member {Object.} connectionAttributes + * @memberof google.cloud.datastream.v1.OracleAsmConfig + * @instance + */ + OracleAsmConfig.prototype.connectionAttributes = $util.emptyObject; + + /** + * OracleAsmConfig oracleSslConfig. + * @member {google.cloud.datastream.v1.IOracleSslConfig|null|undefined} oracleSslConfig + * @memberof google.cloud.datastream.v1.OracleAsmConfig + * @instance + */ + OracleAsmConfig.prototype.oracleSslConfig = null; + + /** + * Creates a new OracleAsmConfig instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @static - * @param {google.cloud.datastream.v1.IMysqlProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile instance + * @param {google.cloud.datastream.v1.IOracleAsmConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleAsmConfig} OracleAsmConfig instance */ - MysqlProfile.create = function create(properties) { - return new MysqlProfile(properties); + OracleAsmConfig.create = function create(properties) { + return new OracleAsmConfig(properties); }; /** - * Encodes the specified MysqlProfile message. Does not implicitly {@link google.cloud.datastream.v1.MysqlProfile.verify|verify} messages. + * Encodes the specified OracleAsmConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleAsmConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @static - * @param {google.cloud.datastream.v1.IMysqlProfile} message MysqlProfile message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleAsmConfig} message OracleAsmConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MysqlProfile.encode = function encode(message, writer) { + OracleAsmConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) @@ -10685,39 +11141,44 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); if (message.password != null && Object.hasOwnProperty.call(message, "password")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.sslConfig != null && Object.hasOwnProperty.call(message, "sslConfig")) - $root.google.cloud.datastream.v1.MysqlSslConfig.encode(message.sslConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.asmService != null && Object.hasOwnProperty.call(message, "asmService")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.asmService); + if (message.connectionAttributes != null && Object.hasOwnProperty.call(message, "connectionAttributes")) + for (var keys = Object.keys(message.connectionAttributes), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.connectionAttributes[keys[i]]).ldelim(); + if (message.oracleSslConfig != null && Object.hasOwnProperty.call(message, "oracleSslConfig")) + $root.google.cloud.datastream.v1.OracleSslConfig.encode(message.oracleSslConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified MysqlProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlProfile.verify|verify} messages. + * Encodes the specified OracleAsmConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleAsmConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @static - * @param {google.cloud.datastream.v1.IMysqlProfile} message MysqlProfile message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleAsmConfig} message OracleAsmConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MysqlProfile.encodeDelimited = function encodeDelimited(message, writer) { + OracleAsmConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MysqlProfile message from the specified reader or buffer. + * Decodes an OracleAsmConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile + * @returns {google.cloud.datastream.v1.OracleAsmConfig} OracleAsmConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlProfile.decode = function decode(reader, length) { + OracleAsmConfig.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.datastream.v1.MysqlProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleAsmConfig(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -10738,7 +11199,34 @@ break; } case 5: { - message.sslConfig = $root.google.cloud.datastream.v1.MysqlSslConfig.decode(reader, reader.uint32()); + message.asmService = reader.string(); + break; + } + case 6: { + if (message.connectionAttributes === $util.emptyObject) + message.connectionAttributes = {}; + 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.connectionAttributes[key] = value; + break; + } + case 7: { + message.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.decode(reader, reader.uint32()); break; } default: @@ -10750,30 +11238,30 @@ }; /** - * Decodes a MysqlProfile message from the specified reader or buffer, length delimited. + * Decodes an OracleAsmConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile + * @returns {google.cloud.datastream.v1.OracleAsmConfig} OracleAsmConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlProfile.decodeDelimited = function decodeDelimited(reader) { + OracleAsmConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MysqlProfile message. + * Verifies an OracleAsmConfig message. * @function verify - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MysqlProfile.verify = function verify(message) { + OracleAsmConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.hostname != null && message.hasOwnProperty("hostname")) @@ -10788,26 +11276,37 @@ if (message.password != null && message.hasOwnProperty("password")) if (!$util.isString(message.password)) return "password: string expected"; - if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) { - var error = $root.google.cloud.datastream.v1.MysqlSslConfig.verify(message.sslConfig); + if (message.asmService != null && message.hasOwnProperty("asmService")) + if (!$util.isString(message.asmService)) + return "asmService: string expected"; + if (message.connectionAttributes != null && message.hasOwnProperty("connectionAttributes")) { + if (!$util.isObject(message.connectionAttributes)) + return "connectionAttributes: object expected"; + var key = Object.keys(message.connectionAttributes); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.connectionAttributes[key[i]])) + return "connectionAttributes: string{k:string} expected"; + } + if (message.oracleSslConfig != null && message.hasOwnProperty("oracleSslConfig")) { + var error = $root.google.cloud.datastream.v1.OracleSslConfig.verify(message.oracleSslConfig); if (error) - return "sslConfig." + error; + return "oracleSslConfig." + error; } return null; }; /** - * Creates a MysqlProfile message from a plain object. Also converts values to their respective internal types. + * Creates an OracleAsmConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile + * @returns {google.cloud.datastream.v1.OracleAsmConfig} OracleAsmConfig */ - MysqlProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlProfile) + OracleAsmConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleAsmConfig) return object; - var message = new $root.google.cloud.datastream.v1.MysqlProfile(); + var message = new $root.google.cloud.datastream.v1.OracleAsmConfig(); if (object.hostname != null) message.hostname = String(object.hostname); if (object.port != null) @@ -10816,33 +11315,45 @@ message.username = String(object.username); if (object.password != null) message.password = String(object.password); - if (object.sslConfig != null) { - if (typeof object.sslConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlProfile.sslConfig: object expected"); - message.sslConfig = $root.google.cloud.datastream.v1.MysqlSslConfig.fromObject(object.sslConfig); + if (object.asmService != null) + message.asmService = String(object.asmService); + if (object.connectionAttributes) { + if (typeof object.connectionAttributes !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleAsmConfig.connectionAttributes: object expected"); + message.connectionAttributes = {}; + for (var keys = Object.keys(object.connectionAttributes), i = 0; i < keys.length; ++i) + message.connectionAttributes[keys[i]] = String(object.connectionAttributes[keys[i]]); + } + if (object.oracleSslConfig != null) { + if (typeof object.oracleSslConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleAsmConfig.oracleSslConfig: object expected"); + message.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.fromObject(object.oracleSslConfig); } return message; }; /** - * Creates a plain object from a MysqlProfile message. Also converts values to other types if specified. + * Creates a plain object from an OracleAsmConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @static - * @param {google.cloud.datastream.v1.MysqlProfile} message MysqlProfile + * @param {google.cloud.datastream.v1.OracleAsmConfig} message OracleAsmConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MysqlProfile.toObject = function toObject(message, options) { + OracleAsmConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.connectionAttributes = {}; if (options.defaults) { object.hostname = ""; object.port = 0; object.username = ""; object.password = ""; - object.sslConfig = null; + object.asmService = ""; + object.oracleSslConfig = null; } if (message.hostname != null && message.hasOwnProperty("hostname")) object.hostname = message.hostname; @@ -10852,62 +11363,70 @@ object.username = message.username; if (message.password != null && message.hasOwnProperty("password")) object.password = message.password; - if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) - object.sslConfig = $root.google.cloud.datastream.v1.MysqlSslConfig.toObject(message.sslConfig, options); + if (message.asmService != null && message.hasOwnProperty("asmService")) + object.asmService = message.asmService; + var keys2; + if (message.connectionAttributes && (keys2 = Object.keys(message.connectionAttributes)).length) { + object.connectionAttributes = {}; + for (var j = 0; j < keys2.length; ++j) + object.connectionAttributes[keys2[j]] = message.connectionAttributes[keys2[j]]; + } + if (message.oracleSslConfig != null && message.hasOwnProperty("oracleSslConfig")) + object.oracleSslConfig = $root.google.cloud.datastream.v1.OracleSslConfig.toObject(message.oracleSslConfig, options); return object; }; /** - * Converts this MysqlProfile to JSON. + * Converts this OracleAsmConfig to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @instance * @returns {Object.} JSON object */ - MysqlProfile.prototype.toJSON = function toJSON() { + OracleAsmConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MysqlProfile + * Gets the default type url for OracleAsmConfig * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlProfile + * @memberof google.cloud.datastream.v1.OracleAsmConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MysqlProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OracleAsmConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlProfile"; + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleAsmConfig"; }; - return MysqlProfile; + return OracleAsmConfig; })(); - v1.PostgresqlProfile = (function() { + v1.MysqlProfile = (function() { /** - * Properties of a PostgresqlProfile. + * Properties of a MysqlProfile. * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlProfile - * @property {string|null} [hostname] PostgresqlProfile hostname - * @property {number|null} [port] PostgresqlProfile port - * @property {string|null} [username] PostgresqlProfile username - * @property {string|null} [password] PostgresqlProfile password - * @property {string|null} [database] PostgresqlProfile database + * @interface IMysqlProfile + * @property {string|null} [hostname] MysqlProfile hostname + * @property {number|null} [port] MysqlProfile port + * @property {string|null} [username] MysqlProfile username + * @property {string|null} [password] MysqlProfile password + * @property {google.cloud.datastream.v1.IMysqlSslConfig|null} [sslConfig] MysqlProfile sslConfig */ /** - * Constructs a new PostgresqlProfile. + * Constructs a new MysqlProfile. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlProfile. - * @implements IPostgresqlProfile + * @classdesc Represents a MysqlProfile. + * @implements IMysqlProfile * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlProfile=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IMysqlProfile=} [properties] Properties to set */ - function PostgresqlProfile(properties) { + function MysqlProfile(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10915,67 +11434,67 @@ } /** - * PostgresqlProfile hostname. + * MysqlProfile hostname. * @member {string} hostname - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @instance */ - PostgresqlProfile.prototype.hostname = ""; + MysqlProfile.prototype.hostname = ""; /** - * PostgresqlProfile port. + * MysqlProfile port. * @member {number} port - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @instance */ - PostgresqlProfile.prototype.port = 0; + MysqlProfile.prototype.port = 0; /** - * PostgresqlProfile username. + * MysqlProfile username. * @member {string} username - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @instance */ - PostgresqlProfile.prototype.username = ""; + MysqlProfile.prototype.username = ""; /** - * PostgresqlProfile password. + * MysqlProfile password. * @member {string} password - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @instance */ - PostgresqlProfile.prototype.password = ""; + MysqlProfile.prototype.password = ""; /** - * PostgresqlProfile database. - * @member {string} database - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * MysqlProfile sslConfig. + * @member {google.cloud.datastream.v1.IMysqlSslConfig|null|undefined} sslConfig + * @memberof google.cloud.datastream.v1.MysqlProfile * @instance */ - PostgresqlProfile.prototype.database = ""; + MysqlProfile.prototype.sslConfig = null; /** - * Creates a new PostgresqlProfile instance using the specified properties. + * Creates a new MysqlProfile instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @static - * @param {google.cloud.datastream.v1.IPostgresqlProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile instance + * @param {google.cloud.datastream.v1.IMysqlProfile=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile instance */ - PostgresqlProfile.create = function create(properties) { - return new PostgresqlProfile(properties); + MysqlProfile.create = function create(properties) { + return new MysqlProfile(properties); }; /** - * Encodes the specified PostgresqlProfile message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlProfile.verify|verify} messages. + * Encodes the specified MysqlProfile message. Does not implicitly {@link google.cloud.datastream.v1.MysqlProfile.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @static - * @param {google.cloud.datastream.v1.IPostgresqlProfile} message PostgresqlProfile message or plain object to encode + * @param {google.cloud.datastream.v1.IMysqlProfile} message MysqlProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostgresqlProfile.encode = function encode(message, writer) { + MysqlProfile.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) @@ -10986,39 +11505,39 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); if (message.password != null && Object.hasOwnProperty.call(message, "password")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.database); + if (message.sslConfig != null && Object.hasOwnProperty.call(message, "sslConfig")) + $root.google.cloud.datastream.v1.MysqlSslConfig.encode(message.sslConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified PostgresqlProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlProfile.verify|verify} messages. + * Encodes the specified MysqlProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @static - * @param {google.cloud.datastream.v1.IPostgresqlProfile} message PostgresqlProfile message or plain object to encode + * @param {google.cloud.datastream.v1.IMysqlProfile} message MysqlProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostgresqlProfile.encodeDelimited = function encodeDelimited(message, writer) { + MysqlProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PostgresqlProfile message from the specified reader or buffer. + * Decodes a MysqlProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile + * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgresqlProfile.decode = function decode(reader, length) { + MysqlProfile.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.datastream.v1.PostgresqlProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlProfile(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -11039,7 +11558,7 @@ break; } case 5: { - message.database = reader.string(); + message.sslConfig = $root.google.cloud.datastream.v1.MysqlSslConfig.decode(reader, reader.uint32()); break; } default: @@ -11051,30 +11570,30 @@ }; /** - * Decodes a PostgresqlProfile message from the specified reader or buffer, length delimited. + * Decodes a MysqlProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile + * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgresqlProfile.decodeDelimited = function decodeDelimited(reader) { + MysqlProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PostgresqlProfile message. + * Verifies a MysqlProfile message. * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PostgresqlProfile.verify = function verify(message) { + MysqlProfile.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.hostname != null && message.hasOwnProperty("hostname")) @@ -11089,24 +11608,26 @@ if (message.password != null && message.hasOwnProperty("password")) if (!$util.isString(message.password)) return "password: string expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; + if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) { + var error = $root.google.cloud.datastream.v1.MysqlSslConfig.verify(message.sslConfig); + if (error) + return "sslConfig." + error; + } return null; }; /** - * Creates a PostgresqlProfile message from a plain object. Also converts values to their respective internal types. + * Creates a MysqlProfile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile + * @returns {google.cloud.datastream.v1.MysqlProfile} MysqlProfile */ - PostgresqlProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlProfile) + MysqlProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.MysqlProfile) return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlProfile(); + var message = new $root.google.cloud.datastream.v1.MysqlProfile(); if (object.hostname != null) message.hostname = String(object.hostname); if (object.port != null) @@ -11115,21 +11636,24 @@ message.username = String(object.username); if (object.password != null) message.password = String(object.password); - if (object.database != null) - message.database = String(object.database); + if (object.sslConfig != null) { + if (typeof object.sslConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.MysqlProfile.sslConfig: object expected"); + message.sslConfig = $root.google.cloud.datastream.v1.MysqlSslConfig.fromObject(object.sslConfig); + } return message; }; /** - * Creates a plain object from a PostgresqlProfile message. Also converts values to other types if specified. + * Creates a plain object from a MysqlProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @static - * @param {google.cloud.datastream.v1.PostgresqlProfile} message PostgresqlProfile + * @param {google.cloud.datastream.v1.MysqlProfile} message MysqlProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PostgresqlProfile.toObject = function toObject(message, options) { + MysqlProfile.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -11138,7 +11662,7 @@ object.port = 0; object.username = ""; object.password = ""; - object.database = ""; + object.sslConfig = null; } if (message.hostname != null && message.hasOwnProperty("hostname")) object.hostname = message.hostname; @@ -11148,59 +11672,62 @@ object.username = message.username; if (message.password != null && message.hasOwnProperty("password")) object.password = message.password; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; + if (message.sslConfig != null && message.hasOwnProperty("sslConfig")) + object.sslConfig = $root.google.cloud.datastream.v1.MysqlSslConfig.toObject(message.sslConfig, options); return object; }; /** - * Converts this PostgresqlProfile to JSON. + * Converts this MysqlProfile to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @instance * @returns {Object.} JSON object */ - PostgresqlProfile.prototype.toJSON = function toJSON() { + MysqlProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PostgresqlProfile + * Gets the default type url for MysqlProfile * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @memberof google.cloud.datastream.v1.MysqlProfile * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PostgresqlProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MysqlProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlProfile"; + return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlProfile"; }; - return PostgresqlProfile; + return MysqlProfile; })(); - v1.GcsProfile = (function() { + v1.PostgresqlProfile = (function() { /** - * Properties of a GcsProfile. + * Properties of a PostgresqlProfile. * @memberof google.cloud.datastream.v1 - * @interface IGcsProfile - * @property {string|null} [bucket] GcsProfile bucket - * @property {string|null} [rootPath] GcsProfile rootPath + * @interface IPostgresqlProfile + * @property {string|null} [hostname] PostgresqlProfile hostname + * @property {number|null} [port] PostgresqlProfile port + * @property {string|null} [username] PostgresqlProfile username + * @property {string|null} [password] PostgresqlProfile password + * @property {string|null} [database] PostgresqlProfile database */ /** - * Constructs a new GcsProfile. + * Constructs a new PostgresqlProfile. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a GcsProfile. - * @implements IGcsProfile + * @classdesc Represents a PostgresqlProfile. + * @implements IPostgresqlProfile * @constructor - * @param {google.cloud.datastream.v1.IGcsProfile=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IPostgresqlProfile=} [properties] Properties to set */ - function GcsProfile(properties) { + function PostgresqlProfile(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11208,89 +11735,131 @@ } /** - * GcsProfile bucket. - * @member {string} bucket - * @memberof google.cloud.datastream.v1.GcsProfile + * PostgresqlProfile hostname. + * @member {string} hostname + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @instance */ - GcsProfile.prototype.bucket = ""; + PostgresqlProfile.prototype.hostname = ""; /** - * GcsProfile rootPath. - * @member {string} rootPath - * @memberof google.cloud.datastream.v1.GcsProfile + * PostgresqlProfile port. + * @member {number} port + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @instance */ - GcsProfile.prototype.rootPath = ""; + PostgresqlProfile.prototype.port = 0; /** - * Creates a new GcsProfile instance using the specified properties. + * PostgresqlProfile username. + * @member {string} username + * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @instance + */ + PostgresqlProfile.prototype.username = ""; + + /** + * PostgresqlProfile password. + * @member {string} password + * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @instance + */ + PostgresqlProfile.prototype.password = ""; + + /** + * PostgresqlProfile database. + * @member {string} database + * @memberof google.cloud.datastream.v1.PostgresqlProfile + * @instance + */ + PostgresqlProfile.prototype.database = ""; + + /** + * Creates a new PostgresqlProfile instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.GcsProfile + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @static - * @param {google.cloud.datastream.v1.IGcsProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile instance + * @param {google.cloud.datastream.v1.IPostgresqlProfile=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile instance */ - GcsProfile.create = function create(properties) { - return new GcsProfile(properties); + PostgresqlProfile.create = function create(properties) { + return new PostgresqlProfile(properties); }; /** - * Encodes the specified GcsProfile message. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. + * Encodes the specified PostgresqlProfile message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlProfile.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.GcsProfile + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @static - * @param {google.cloud.datastream.v1.IGcsProfile} message GcsProfile message or plain object to encode + * @param {google.cloud.datastream.v1.IPostgresqlProfile} message PostgresqlProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsProfile.encode = function encode(message, writer) { + PostgresqlProfile.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - if (message.rootPath != null && Object.hasOwnProperty.call(message, "rootPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rootPath); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.database); return writer; }; /** - * Encodes the specified GcsProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. + * Encodes the specified PostgresqlProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.GcsProfile + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @static - * @param {google.cloud.datastream.v1.IGcsProfile} message GcsProfile message or plain object to encode + * @param {google.cloud.datastream.v1.IPostgresqlProfile} message PostgresqlProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsProfile.encodeDelimited = function encodeDelimited(message, writer) { + PostgresqlProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsProfile message from the specified reader or buffer. + * Decodes a PostgresqlProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.GcsProfile + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile + * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsProfile.decode = function decode(reader, length) { + PostgresqlProfile.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.datastream.v1.GcsProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlProfile(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.bucket = reader.string(); + message.hostname = reader.string(); break; } case 2: { - message.rootPath = reader.string(); + message.port = reader.int32(); + break; + } + case 3: { + message.username = reader.string(); + break; + } + case 4: { + message.password = reader.string(); + break; + } + case 5: { + message.database = reader.string(); break; } default: @@ -11302,130 +11871,159 @@ }; /** - * Decodes a GcsProfile message from the specified reader or buffer, length delimited. + * Decodes a PostgresqlProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.GcsProfile + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile + * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsProfile.decodeDelimited = function decodeDelimited(reader) { + PostgresqlProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsProfile message. + * Verifies a PostgresqlProfile message. * @function verify - * @memberof google.cloud.datastream.v1.GcsProfile + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsProfile.verify = function verify(message) { + PostgresqlProfile.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - if (message.rootPath != null && message.hasOwnProperty("rootPath")) - if (!$util.isString(message.rootPath)) - return "rootPath: string expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; return null; }; /** - * Creates a GcsProfile message from a plain object. Also converts values to their respective internal types. + * Creates a PostgresqlProfile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.GcsProfile + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile + * @returns {google.cloud.datastream.v1.PostgresqlProfile} PostgresqlProfile */ - GcsProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.GcsProfile) + PostgresqlProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PostgresqlProfile) return object; - var message = new $root.google.cloud.datastream.v1.GcsProfile(); - if (object.bucket != null) - message.bucket = String(object.bucket); - if (object.rootPath != null) - message.rootPath = String(object.rootPath); + var message = new $root.google.cloud.datastream.v1.PostgresqlProfile(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.port != null) + message.port = object.port | 0; + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.database != null) + message.database = String(object.database); return message; }; /** - * Creates a plain object from a GcsProfile message. Also converts values to other types if specified. + * Creates a plain object from a PostgresqlProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.GcsProfile + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @static - * @param {google.cloud.datastream.v1.GcsProfile} message GcsProfile + * @param {google.cloud.datastream.v1.PostgresqlProfile} message PostgresqlProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsProfile.toObject = function toObject(message, options) { + PostgresqlProfile.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.bucket = ""; - object.rootPath = ""; + object.hostname = ""; + object.port = 0; + object.username = ""; + object.password = ""; + object.database = ""; } - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - if (message.rootPath != null && message.hasOwnProperty("rootPath")) - object.rootPath = message.rootPath; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; return object; }; /** - * Converts this GcsProfile to JSON. + * Converts this PostgresqlProfile to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.GcsProfile + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @instance * @returns {Object.} JSON object */ - GcsProfile.prototype.toJSON = function toJSON() { + PostgresqlProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GcsProfile + * Gets the default type url for PostgresqlProfile * @function getTypeUrl - * @memberof google.cloud.datastream.v1.GcsProfile + * @memberof google.cloud.datastream.v1.PostgresqlProfile * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GcsProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PostgresqlProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.GcsProfile"; + return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlProfile"; }; - return GcsProfile; + return PostgresqlProfile; })(); - v1.BigQueryProfile = (function() { + v1.SqlServerProfile = (function() { /** - * Properties of a BigQueryProfile. + * Properties of a SqlServerProfile. * @memberof google.cloud.datastream.v1 - * @interface IBigQueryProfile + * @interface ISqlServerProfile + * @property {string|null} [hostname] SqlServerProfile hostname + * @property {number|null} [port] SqlServerProfile port + * @property {string|null} [username] SqlServerProfile username + * @property {string|null} [password] SqlServerProfile password + * @property {string|null} [database] SqlServerProfile database */ /** - * Constructs a new BigQueryProfile. + * Constructs a new SqlServerProfile. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a BigQueryProfile. - * @implements IBigQueryProfile + * @classdesc Represents a SqlServerProfile. + * @implements ISqlServerProfile * @constructor - * @param {google.cloud.datastream.v1.IBigQueryProfile=} [properties] Properties to set + * @param {google.cloud.datastream.v1.ISqlServerProfile=} [properties] Properties to set */ - function BigQueryProfile(properties) { + function SqlServerProfile(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11433,63 +12031,133 @@ } /** - * Creates a new BigQueryProfile instance using the specified properties. + * SqlServerProfile hostname. + * @member {string} hostname + * @memberof google.cloud.datastream.v1.SqlServerProfile + * @instance + */ + SqlServerProfile.prototype.hostname = ""; + + /** + * SqlServerProfile port. + * @member {number} port + * @memberof google.cloud.datastream.v1.SqlServerProfile + * @instance + */ + SqlServerProfile.prototype.port = 0; + + /** + * SqlServerProfile username. + * @member {string} username + * @memberof google.cloud.datastream.v1.SqlServerProfile + * @instance + */ + SqlServerProfile.prototype.username = ""; + + /** + * SqlServerProfile password. + * @member {string} password + * @memberof google.cloud.datastream.v1.SqlServerProfile + * @instance + */ + SqlServerProfile.prototype.password = ""; + + /** + * SqlServerProfile database. + * @member {string} database + * @memberof google.cloud.datastream.v1.SqlServerProfile + * @instance + */ + SqlServerProfile.prototype.database = ""; + + /** + * Creates a new SqlServerProfile instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.BigQueryProfile + * @memberof google.cloud.datastream.v1.SqlServerProfile * @static - * @param {google.cloud.datastream.v1.IBigQueryProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile instance + * @param {google.cloud.datastream.v1.ISqlServerProfile=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SqlServerProfile} SqlServerProfile instance */ - BigQueryProfile.create = function create(properties) { - return new BigQueryProfile(properties); + SqlServerProfile.create = function create(properties) { + return new SqlServerProfile(properties); }; /** - * Encodes the specified BigQueryProfile message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryProfile.verify|verify} messages. + * Encodes the specified SqlServerProfile message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerProfile.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.BigQueryProfile + * @memberof google.cloud.datastream.v1.SqlServerProfile * @static - * @param {google.cloud.datastream.v1.IBigQueryProfile} message BigQueryProfile message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerProfile} message SqlServerProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryProfile.encode = function encode(message, writer) { + SqlServerProfile.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.database); return writer; }; /** - * Encodes the specified BigQueryProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryProfile.verify|verify} messages. + * Encodes the specified SqlServerProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryProfile + * @memberof google.cloud.datastream.v1.SqlServerProfile * @static - * @param {google.cloud.datastream.v1.IBigQueryProfile} message BigQueryProfile message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerProfile} message SqlServerProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryProfile.encodeDelimited = function encodeDelimited(message, writer) { + SqlServerProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryProfile message from the specified reader or buffer. + * Decodes a SqlServerProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.BigQueryProfile + * @memberof google.cloud.datastream.v1.SqlServerProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile + * @returns {google.cloud.datastream.v1.SqlServerProfile} SqlServerProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryProfile.decode = function decode(reader, length) { + SqlServerProfile.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.datastream.v1.BigQueryProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerProfile(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.hostname = reader.string(); + break; + } + case 2: { + message.port = reader.int32(); + break; + } + case 3: { + message.username = reader.string(); + break; + } + case 4: { + message.password = reader.string(); + break; + } + case 5: { + message.database = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11499,108 +12167,156 @@ }; /** - * Decodes a BigQueryProfile message from the specified reader or buffer, length delimited. + * Decodes a SqlServerProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryProfile + * @memberof google.cloud.datastream.v1.SqlServerProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile + * @returns {google.cloud.datastream.v1.SqlServerProfile} SqlServerProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryProfile.decodeDelimited = function decodeDelimited(reader) { + SqlServerProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryProfile message. + * Verifies a SqlServerProfile message. * @function verify - * @memberof google.cloud.datastream.v1.BigQueryProfile + * @memberof google.cloud.datastream.v1.SqlServerProfile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryProfile.verify = function verify(message) { + SqlServerProfile.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; return null; }; /** - * Creates a BigQueryProfile message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerProfile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryProfile + * @memberof google.cloud.datastream.v1.SqlServerProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile + * @returns {google.cloud.datastream.v1.SqlServerProfile} SqlServerProfile */ - BigQueryProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryProfile) + SqlServerProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SqlServerProfile) return object; - return new $root.google.cloud.datastream.v1.BigQueryProfile(); + var message = new $root.google.cloud.datastream.v1.SqlServerProfile(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.port != null) + message.port = object.port | 0; + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.database != null) + message.database = String(object.database); + return message; }; /** - * Creates a plain object from a BigQueryProfile message. Also converts values to other types if specified. + * Creates a plain object from a SqlServerProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryProfile + * @memberof google.cloud.datastream.v1.SqlServerProfile * @static - * @param {google.cloud.datastream.v1.BigQueryProfile} message BigQueryProfile + * @param {google.cloud.datastream.v1.SqlServerProfile} message SqlServerProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryProfile.toObject = function toObject() { - return {}; + SqlServerProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hostname = ""; + object.port = 0; + object.username = ""; + object.password = ""; + object.database = ""; + } + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + return object; }; /** - * Converts this BigQueryProfile to JSON. + * Converts this SqlServerProfile to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryProfile + * @memberof google.cloud.datastream.v1.SqlServerProfile * @instance * @returns {Object.} JSON object */ - BigQueryProfile.prototype.toJSON = function toJSON() { + SqlServerProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryProfile + * Gets the default type url for SqlServerProfile * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryProfile + * @memberof google.cloud.datastream.v1.SqlServerProfile * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SqlServerProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryProfile"; + return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerProfile"; }; - return BigQueryProfile; + return SqlServerProfile; })(); - v1.StaticServiceIpConnectivity = (function() { + v1.GcsProfile = (function() { /** - * Properties of a StaticServiceIpConnectivity. + * Properties of a GcsProfile. * @memberof google.cloud.datastream.v1 - * @interface IStaticServiceIpConnectivity + * @interface IGcsProfile + * @property {string|null} [bucket] GcsProfile bucket + * @property {string|null} [rootPath] GcsProfile rootPath */ /** - * Constructs a new StaticServiceIpConnectivity. + * Constructs a new GcsProfile. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a StaticServiceIpConnectivity. - * @implements IStaticServiceIpConnectivity + * @classdesc Represents a GcsProfile. + * @implements IGcsProfile * @constructor - * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IGcsProfile=} [properties] Properties to set */ - function StaticServiceIpConnectivity(properties) { + function GcsProfile(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11608,63 +12324,91 @@ } /** - * Creates a new StaticServiceIpConnectivity instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity - * @static - * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity instance + * GcsProfile bucket. + * @member {string} bucket + * @memberof google.cloud.datastream.v1.GcsProfile + * @instance */ - StaticServiceIpConnectivity.create = function create(properties) { - return new StaticServiceIpConnectivity(properties); - }; + GcsProfile.prototype.bucket = ""; /** - * Encodes the specified StaticServiceIpConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.StaticServiceIpConnectivity.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity + * GcsProfile rootPath. + * @member {string} rootPath + * @memberof google.cloud.datastream.v1.GcsProfile + * @instance + */ + GcsProfile.prototype.rootPath = ""; + + /** + * Creates a new GcsProfile instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.GcsProfile * @static - * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity} message StaticServiceIpConnectivity message or plain object to encode + * @param {google.cloud.datastream.v1.IGcsProfile=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile instance + */ + GcsProfile.create = function create(properties) { + return new GcsProfile(properties); + }; + + /** + * Encodes the specified GcsProfile message. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.GcsProfile + * @static + * @param {google.cloud.datastream.v1.IGcsProfile} message GcsProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StaticServiceIpConnectivity.encode = function encode(message, writer) { + GcsProfile.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.rootPath != null && Object.hasOwnProperty.call(message, "rootPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rootPath); return writer; }; /** - * Encodes the specified StaticServiceIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StaticServiceIpConnectivity.verify|verify} messages. + * Encodes the specified GcsProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity + * @memberof google.cloud.datastream.v1.GcsProfile * @static - * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity} message StaticServiceIpConnectivity message or plain object to encode + * @param {google.cloud.datastream.v1.IGcsProfile} message GcsProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StaticServiceIpConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + GcsProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer. + * Decodes a GcsProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity + * @memberof google.cloud.datastream.v1.GcsProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity + * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StaticServiceIpConnectivity.decode = function decode(reader, length) { + GcsProfile.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.datastream.v1.StaticServiceIpConnectivity(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.GcsProfile(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.bucket = reader.string(); + break; + } + case 2: { + message.rootPath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11674,113 +12418,130 @@ }; /** - * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer, length delimited. + * Decodes a GcsProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity + * @memberof google.cloud.datastream.v1.GcsProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity + * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StaticServiceIpConnectivity.decodeDelimited = function decodeDelimited(reader) { + GcsProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StaticServiceIpConnectivity message. + * Verifies a GcsProfile message. * @function verify - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity + * @memberof google.cloud.datastream.v1.GcsProfile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StaticServiceIpConnectivity.verify = function verify(message) { + GcsProfile.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.rootPath != null && message.hasOwnProperty("rootPath")) + if (!$util.isString(message.rootPath)) + return "rootPath: string expected"; return null; }; /** - * Creates a StaticServiceIpConnectivity message from a plain object. Also converts values to their respective internal types. + * Creates a GcsProfile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity + * @memberof google.cloud.datastream.v1.GcsProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity + * @returns {google.cloud.datastream.v1.GcsProfile} GcsProfile */ - StaticServiceIpConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.StaticServiceIpConnectivity) + GcsProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.GcsProfile) return object; - return new $root.google.cloud.datastream.v1.StaticServiceIpConnectivity(); + var message = new $root.google.cloud.datastream.v1.GcsProfile(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.rootPath != null) + message.rootPath = String(object.rootPath); + return message; }; /** - * Creates a plain object from a StaticServiceIpConnectivity message. Also converts values to other types if specified. + * Creates a plain object from a GcsProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity + * @memberof google.cloud.datastream.v1.GcsProfile * @static - * @param {google.cloud.datastream.v1.StaticServiceIpConnectivity} message StaticServiceIpConnectivity + * @param {google.cloud.datastream.v1.GcsProfile} message GcsProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StaticServiceIpConnectivity.toObject = function toObject() { - return {}; + GcsProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucket = ""; + object.rootPath = ""; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.rootPath != null && message.hasOwnProperty("rootPath")) + object.rootPath = message.rootPath; + return object; }; /** - * Converts this StaticServiceIpConnectivity to JSON. + * Converts this GcsProfile to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity + * @memberof google.cloud.datastream.v1.GcsProfile * @instance * @returns {Object.} JSON object */ - StaticServiceIpConnectivity.prototype.toJSON = function toJSON() { + GcsProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StaticServiceIpConnectivity + * Gets the default type url for GcsProfile * @function getTypeUrl - * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity + * @memberof google.cloud.datastream.v1.GcsProfile * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StaticServiceIpConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcsProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.StaticServiceIpConnectivity"; + return typeUrlPrefix + "/google.cloud.datastream.v1.GcsProfile"; }; - return StaticServiceIpConnectivity; + return GcsProfile; })(); - v1.ForwardSshTunnelConnectivity = (function() { + v1.BigQueryProfile = (function() { /** - * Properties of a ForwardSshTunnelConnectivity. + * Properties of a BigQueryProfile. * @memberof google.cloud.datastream.v1 - * @interface IForwardSshTunnelConnectivity - * @property {string|null} [hostname] ForwardSshTunnelConnectivity hostname - * @property {string|null} [username] ForwardSshTunnelConnectivity username - * @property {number|null} [port] ForwardSshTunnelConnectivity port - * @property {string|null} [password] ForwardSshTunnelConnectivity password - * @property {string|null} [privateKey] ForwardSshTunnelConnectivity privateKey + * @interface IBigQueryProfile */ /** - * Constructs a new ForwardSshTunnelConnectivity. + * Constructs a new BigQueryProfile. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ForwardSshTunnelConnectivity. - * @implements IForwardSshTunnelConnectivity + * @classdesc Represents a BigQueryProfile. + * @implements IBigQueryProfile * @constructor - * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IBigQueryProfile=} [properties] Properties to set */ - function ForwardSshTunnelConnectivity(properties) { + function BigQueryProfile(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11788,147 +12549,63 @@ } /** - * ForwardSshTunnelConnectivity hostname. - * @member {string} hostname - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.hostname = ""; - - /** - * ForwardSshTunnelConnectivity username. - * @member {string} username - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.username = ""; - - /** - * ForwardSshTunnelConnectivity port. - * @member {number} port - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.port = 0; - - /** - * ForwardSshTunnelConnectivity password. - * @member {string|null|undefined} password - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.password = null; - - /** - * ForwardSshTunnelConnectivity privateKey. - * @member {string|null|undefined} privateKey - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - ForwardSshTunnelConnectivity.prototype.privateKey = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ForwardSshTunnelConnectivity authenticationMethod. - * @member {"password"|"privateKey"|undefined} authenticationMethod - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity - * @instance - */ - Object.defineProperty(ForwardSshTunnelConnectivity.prototype, "authenticationMethod", { - get: $util.oneOfGetter($oneOfFields = ["password", "privateKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ForwardSshTunnelConnectivity instance using the specified properties. + * Creates a new BigQueryProfile instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity + * @memberof google.cloud.datastream.v1.BigQueryProfile * @static - * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity instance + * @param {google.cloud.datastream.v1.IBigQueryProfile=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile instance */ - ForwardSshTunnelConnectivity.create = function create(properties) { - return new ForwardSshTunnelConnectivity(properties); + BigQueryProfile.create = function create(properties) { + return new BigQueryProfile(properties); }; /** - * Encodes the specified ForwardSshTunnelConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify|verify} messages. + * Encodes the specified BigQueryProfile message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryProfile.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity + * @memberof google.cloud.datastream.v1.BigQueryProfile * @static - * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity message or plain object to encode + * @param {google.cloud.datastream.v1.IBigQueryProfile} message BigQueryProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ForwardSshTunnelConnectivity.encode = function encode(message, writer) { + BigQueryProfile.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.port); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.password); - if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.privateKey); return writer; }; /** - * Encodes the specified ForwardSshTunnelConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify|verify} messages. + * Encodes the specified BigQueryProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity + * @memberof google.cloud.datastream.v1.BigQueryProfile * @static - * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity message or plain object to encode + * @param {google.cloud.datastream.v1.IBigQueryProfile} message BigQueryProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ForwardSshTunnelConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + BigQueryProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer. + * Decodes a BigQueryProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity + * @memberof google.cloud.datastream.v1.BigQueryProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity + * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ForwardSshTunnelConnectivity.decode = function decode(reader, length) { + BigQueryProfile.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.datastream.v1.ForwardSshTunnelConnectivity(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.BigQueryProfile(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.hostname = reader.string(); - break; - } - case 2: { - message.username = reader.string(); - break; - } - case 3: { - message.port = reader.int32(); - break; - } - case 100: { - message.password = reader.string(); - break; - } - case 101: { - message.privateKey = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -11938,167 +12615,108 @@ }; /** - * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer, length delimited. + * Decodes a BigQueryProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity + * @memberof google.cloud.datastream.v1.BigQueryProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity + * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ForwardSshTunnelConnectivity.decodeDelimited = function decodeDelimited(reader) { + BigQueryProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ForwardSshTunnelConnectivity message. + * Verifies a BigQueryProfile message. * @function verify - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity + * @memberof google.cloud.datastream.v1.BigQueryProfile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ForwardSshTunnelConnectivity.verify = function verify(message) { + BigQueryProfile.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.password != null && message.hasOwnProperty("password")) { - properties.authenticationMethod = 1; - if (!$util.isString(message.password)) - return "password: string expected"; - } - if (message.privateKey != null && message.hasOwnProperty("privateKey")) { - if (properties.authenticationMethod === 1) - return "authenticationMethod: multiple values"; - properties.authenticationMethod = 1; - if (!$util.isString(message.privateKey)) - return "privateKey: string expected"; - } return null; }; /** - * Creates a ForwardSshTunnelConnectivity message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryProfile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity + * @memberof google.cloud.datastream.v1.BigQueryProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity + * @returns {google.cloud.datastream.v1.BigQueryProfile} BigQueryProfile */ - ForwardSshTunnelConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity) + BigQueryProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.BigQueryProfile) return object; - var message = new $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.username != null) - message.username = String(object.username); - if (object.port != null) - message.port = object.port | 0; - if (object.password != null) - message.password = String(object.password); - if (object.privateKey != null) - message.privateKey = String(object.privateKey); - return message; + return new $root.google.cloud.datastream.v1.BigQueryProfile(); }; /** - * Creates a plain object from a ForwardSshTunnelConnectivity message. Also converts values to other types if specified. + * Creates a plain object from a BigQueryProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity + * @memberof google.cloud.datastream.v1.BigQueryProfile * @static - * @param {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity + * @param {google.cloud.datastream.v1.BigQueryProfile} message BigQueryProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ForwardSshTunnelConnectivity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hostname = ""; - object.username = ""; - object.port = 0; - } - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.password != null && message.hasOwnProperty("password")) { - object.password = message.password; - if (options.oneofs) - object.authenticationMethod = "password"; - } - if (message.privateKey != null && message.hasOwnProperty("privateKey")) { - object.privateKey = message.privateKey; - if (options.oneofs) - object.authenticationMethod = "privateKey"; - } - return object; + BigQueryProfile.toObject = function toObject() { + return {}; }; /** - * Converts this ForwardSshTunnelConnectivity to JSON. + * Converts this BigQueryProfile to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity + * @memberof google.cloud.datastream.v1.BigQueryProfile * @instance * @returns {Object.} JSON object */ - ForwardSshTunnelConnectivity.prototype.toJSON = function toJSON() { + BigQueryProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ForwardSshTunnelConnectivity + * Gets the default type url for BigQueryProfile * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity + * @memberof google.cloud.datastream.v1.BigQueryProfile * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ForwardSshTunnelConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigQueryProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.ForwardSshTunnelConnectivity"; + return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryProfile"; }; - return ForwardSshTunnelConnectivity; + return BigQueryProfile; })(); - v1.VpcPeeringConfig = (function() { + v1.StaticServiceIpConnectivity = (function() { /** - * Properties of a VpcPeeringConfig. + * Properties of a StaticServiceIpConnectivity. * @memberof google.cloud.datastream.v1 - * @interface IVpcPeeringConfig - * @property {string|null} [vpc] VpcPeeringConfig vpc - * @property {string|null} [subnet] VpcPeeringConfig subnet + * @interface IStaticServiceIpConnectivity */ /** - * Constructs a new VpcPeeringConfig. + * Constructs a new StaticServiceIpConnectivity. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a VpcPeeringConfig. - * @implements IVpcPeeringConfig + * @classdesc Represents a StaticServiceIpConnectivity. + * @implements IStaticServiceIpConnectivity * @constructor - * @param {google.cloud.datastream.v1.IVpcPeeringConfig=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity=} [properties] Properties to set */ - function VpcPeeringConfig(properties) { + function StaticServiceIpConnectivity(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12106,91 +12724,63 @@ } /** - * VpcPeeringConfig vpc. - * @member {string} vpc - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @instance - */ - VpcPeeringConfig.prototype.vpc = ""; - - /** - * VpcPeeringConfig subnet. - * @member {string} subnet - * @memberof google.cloud.datastream.v1.VpcPeeringConfig - * @instance - */ - VpcPeeringConfig.prototype.subnet = ""; - - /** - * Creates a new VpcPeeringConfig instance using the specified properties. + * Creates a new StaticServiceIpConnectivity instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity * @static - * @param {google.cloud.datastream.v1.IVpcPeeringConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig instance + * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity instance */ - VpcPeeringConfig.create = function create(properties) { - return new VpcPeeringConfig(properties); + StaticServiceIpConnectivity.create = function create(properties) { + return new StaticServiceIpConnectivity(properties); }; /** - * Encodes the specified VpcPeeringConfig message. Does not implicitly {@link google.cloud.datastream.v1.VpcPeeringConfig.verify|verify} messages. + * Encodes the specified StaticServiceIpConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.StaticServiceIpConnectivity.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity * @static - * @param {google.cloud.datastream.v1.IVpcPeeringConfig} message VpcPeeringConfig message or plain object to encode + * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity} message StaticServiceIpConnectivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VpcPeeringConfig.encode = function encode(message, writer) { + StaticServiceIpConnectivity.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vpc != null && Object.hasOwnProperty.call(message, "vpc")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.vpc); - if (message.subnet != null && Object.hasOwnProperty.call(message, "subnet")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnet); return writer; }; /** - * Encodes the specified VpcPeeringConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.VpcPeeringConfig.verify|verify} messages. + * Encodes the specified StaticServiceIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StaticServiceIpConnectivity.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity * @static - * @param {google.cloud.datastream.v1.IVpcPeeringConfig} message VpcPeeringConfig message or plain object to encode + * @param {google.cloud.datastream.v1.IStaticServiceIpConnectivity} message StaticServiceIpConnectivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VpcPeeringConfig.encodeDelimited = function encodeDelimited(message, writer) { + StaticServiceIpConnectivity.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VpcPeeringConfig message from the specified reader or buffer. + * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig + * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VpcPeeringConfig.decode = function decode(reader, length) { + StaticServiceIpConnectivity.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.datastream.v1.VpcPeeringConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.StaticServiceIpConnectivity(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.vpc = reader.string(); - break; - } - case 2: { - message.subnet = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -12200,139 +12790,113 @@ }; /** - * Decodes a VpcPeeringConfig message from the specified reader or buffer, length delimited. + * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig + * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VpcPeeringConfig.decodeDelimited = function decodeDelimited(reader) { + StaticServiceIpConnectivity.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VpcPeeringConfig message. + * Verifies a StaticServiceIpConnectivity message. * @function verify - * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VpcPeeringConfig.verify = function verify(message) { + StaticServiceIpConnectivity.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vpc != null && message.hasOwnProperty("vpc")) - if (!$util.isString(message.vpc)) - return "vpc: string expected"; - if (message.subnet != null && message.hasOwnProperty("subnet")) - if (!$util.isString(message.subnet)) - return "subnet: string expected"; return null; }; /** - * Creates a VpcPeeringConfig message from a plain object. Also converts values to their respective internal types. + * Creates a StaticServiceIpConnectivity message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig + * @returns {google.cloud.datastream.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity */ - VpcPeeringConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.VpcPeeringConfig) + StaticServiceIpConnectivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.StaticServiceIpConnectivity) return object; - var message = new $root.google.cloud.datastream.v1.VpcPeeringConfig(); - if (object.vpc != null) - message.vpc = String(object.vpc); - if (object.subnet != null) - message.subnet = String(object.subnet); - return message; + return new $root.google.cloud.datastream.v1.StaticServiceIpConnectivity(); }; /** - * Creates a plain object from a VpcPeeringConfig message. Also converts values to other types if specified. + * Creates a plain object from a StaticServiceIpConnectivity message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity * @static - * @param {google.cloud.datastream.v1.VpcPeeringConfig} message VpcPeeringConfig + * @param {google.cloud.datastream.v1.StaticServiceIpConnectivity} message StaticServiceIpConnectivity * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VpcPeeringConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.vpc = ""; - object.subnet = ""; - } - if (message.vpc != null && message.hasOwnProperty("vpc")) - object.vpc = message.vpc; - if (message.subnet != null && message.hasOwnProperty("subnet")) - object.subnet = message.subnet; - return object; + StaticServiceIpConnectivity.toObject = function toObject() { + return {}; }; /** - * Converts this VpcPeeringConfig to JSON. + * Converts this StaticServiceIpConnectivity to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity * @instance * @returns {Object.} JSON object */ - VpcPeeringConfig.prototype.toJSON = function toJSON() { + StaticServiceIpConnectivity.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VpcPeeringConfig + * Gets the default type url for StaticServiceIpConnectivity * @function getTypeUrl - * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @memberof google.cloud.datastream.v1.StaticServiceIpConnectivity * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VpcPeeringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StaticServiceIpConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.VpcPeeringConfig"; + return typeUrlPrefix + "/google.cloud.datastream.v1.StaticServiceIpConnectivity"; }; - return VpcPeeringConfig; + return StaticServiceIpConnectivity; })(); - v1.PrivateConnection = (function() { + v1.ForwardSshTunnelConnectivity = (function() { /** - * Properties of a PrivateConnection. + * Properties of a ForwardSshTunnelConnectivity. * @memberof google.cloud.datastream.v1 - * @interface IPrivateConnection - * @property {string|null} [name] PrivateConnection name - * @property {google.protobuf.ITimestamp|null} [createTime] PrivateConnection createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] PrivateConnection updateTime - * @property {Object.|null} [labels] PrivateConnection labels - * @property {string|null} [displayName] PrivateConnection displayName - * @property {google.cloud.datastream.v1.PrivateConnection.State|null} [state] PrivateConnection state - * @property {google.cloud.datastream.v1.IError|null} [error] PrivateConnection error - * @property {google.cloud.datastream.v1.IVpcPeeringConfig|null} [vpcPeeringConfig] PrivateConnection vpcPeeringConfig + * @interface IForwardSshTunnelConnectivity + * @property {string|null} [hostname] ForwardSshTunnelConnectivity hostname + * @property {string|null} [username] ForwardSshTunnelConnectivity username + * @property {number|null} [port] ForwardSshTunnelConnectivity port + * @property {string|null} [password] ForwardSshTunnelConnectivity password + * @property {string|null} [privateKey] ForwardSshTunnelConnectivity privateKey */ /** - * Constructs a new PrivateConnection. + * Constructs a new ForwardSshTunnelConnectivity. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PrivateConnection. - * @implements IPrivateConnection + * @classdesc Represents a ForwardSshTunnelConnectivity. + * @implements IForwardSshTunnelConnectivity * @constructor - * @param {google.cloud.datastream.v1.IPrivateConnection=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity=} [properties] Properties to set */ - function PrivateConnection(properties) { - this.labels = {}; + function ForwardSshTunnelConnectivity(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12340,193 +12904,145 @@ } /** - * PrivateConnection name. - * @member {string} name - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.name = ""; - - /** - * PrivateConnection createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.PrivateConnection + * ForwardSshTunnelConnectivity hostname. + * @member {string} hostname + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @instance */ - PrivateConnection.prototype.createTime = null; + ForwardSshTunnelConnectivity.prototype.hostname = ""; /** - * PrivateConnection updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1.PrivateConnection + * ForwardSshTunnelConnectivity username. + * @member {string} username + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @instance */ - PrivateConnection.prototype.updateTime = null; + ForwardSshTunnelConnectivity.prototype.username = ""; /** - * PrivateConnection labels. - * @member {Object.} labels - * @memberof google.cloud.datastream.v1.PrivateConnection + * ForwardSshTunnelConnectivity port. + * @member {number} port + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @instance */ - PrivateConnection.prototype.labels = $util.emptyObject; + ForwardSshTunnelConnectivity.prototype.port = 0; /** - * PrivateConnection displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1.PrivateConnection + * ForwardSshTunnelConnectivity password. + * @member {string|null|undefined} password + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @instance */ - PrivateConnection.prototype.displayName = ""; + ForwardSshTunnelConnectivity.prototype.password = null; /** - * PrivateConnection state. - * @member {google.cloud.datastream.v1.PrivateConnection.State} state - * @memberof google.cloud.datastream.v1.PrivateConnection + * ForwardSshTunnelConnectivity privateKey. + * @member {string|null|undefined} privateKey + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @instance */ - PrivateConnection.prototype.state = 0; + ForwardSshTunnelConnectivity.prototype.privateKey = null; - /** - * PrivateConnection error. - * @member {google.cloud.datastream.v1.IError|null|undefined} error - * @memberof google.cloud.datastream.v1.PrivateConnection - * @instance - */ - PrivateConnection.prototype.error = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * PrivateConnection vpcPeeringConfig. - * @member {google.cloud.datastream.v1.IVpcPeeringConfig|null|undefined} vpcPeeringConfig - * @memberof google.cloud.datastream.v1.PrivateConnection + * ForwardSshTunnelConnectivity authenticationMethod. + * @member {"password"|"privateKey"|undefined} authenticationMethod + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @instance */ - PrivateConnection.prototype.vpcPeeringConfig = null; + Object.defineProperty(ForwardSshTunnelConnectivity.prototype, "authenticationMethod", { + get: $util.oneOfGetter($oneOfFields = ["password", "privateKey"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new PrivateConnection instance using the specified properties. + * Creates a new ForwardSshTunnelConnectivity instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.PrivateConnection + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @static - * @param {google.cloud.datastream.v1.IPrivateConnection=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection instance + * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity instance */ - PrivateConnection.create = function create(properties) { - return new PrivateConnection(properties); + ForwardSshTunnelConnectivity.create = function create(properties) { + return new ForwardSshTunnelConnectivity(properties); }; /** - * Encodes the specified PrivateConnection message. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnection.verify|verify} messages. + * Encodes the specified ForwardSshTunnelConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.PrivateConnection + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @static - * @param {google.cloud.datastream.v1.IPrivateConnection} message PrivateConnection message or plain object to encode + * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivateConnection.encode = function encode(message, writer) { + ForwardSshTunnelConnectivity.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.cloud.datastream.v1.Error.encode(message.error, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.vpcPeeringConfig != null && Object.hasOwnProperty.call(message, "vpcPeeringConfig")) - $root.google.cloud.datastream.v1.VpcPeeringConfig.encode(message.vpcPeeringConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.port); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.password); + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.privateKey); return writer; }; /** - * Encodes the specified PrivateConnection message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnection.verify|verify} messages. + * Encodes the specified ForwardSshTunnelConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PrivateConnection + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @static - * @param {google.cloud.datastream.v1.IPrivateConnection} message PrivateConnection message or plain object to encode + * @param {google.cloud.datastream.v1.IForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivateConnection.encodeDelimited = function encodeDelimited(message, writer) { + ForwardSshTunnelConnectivity.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrivateConnection message from the specified reader or buffer. + * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.PrivateConnection + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection + * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateConnection.decode = function decode(reader, length) { + ForwardSshTunnelConnectivity.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.datastream.v1.PrivateConnection(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.hostname = reader.string(); break; } case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.username = reader.string(); break; } case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - 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 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.state = reader.int32(); + message.port = reader.int32(); break; } - case 7: { - message.error = $root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32()); + case 100: { + message.password = reader.string(); break; } - case 100: { - message.vpcPeeringConfig = $root.google.cloud.datastream.v1.VpcPeeringConfig.decode(reader, reader.uint32()); + case 101: { + message.privateKey = reader.string(); break; } default: @@ -12538,275 +13054,167 @@ }; /** - * Decodes a PrivateConnection message from the specified reader or buffer, length delimited. + * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PrivateConnection + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection + * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateConnection.decodeDelimited = function decodeDelimited(reader) { + ForwardSshTunnelConnectivity.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrivateConnection message. + * Verifies a ForwardSshTunnelConnectivity message. * @function verify - * @memberof google.cloud.datastream.v1.PrivateConnection + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrivateConnection.verify = function verify(message) { + ForwardSshTunnelConnectivity.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.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.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: 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: - case 5: - break; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.cloud.datastream.v1.Error.verify(message.error); - if (error) - return "error." + error; + var properties = {}; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.password != null && message.hasOwnProperty("password")) { + properties.authenticationMethod = 1; + if (!$util.isString(message.password)) + return "password: string expected"; } - if (message.vpcPeeringConfig != null && message.hasOwnProperty("vpcPeeringConfig")) { - var error = $root.google.cloud.datastream.v1.VpcPeeringConfig.verify(message.vpcPeeringConfig); - if (error) - return "vpcPeeringConfig." + error; + if (message.privateKey != null && message.hasOwnProperty("privateKey")) { + if (properties.authenticationMethod === 1) + return "authenticationMethod: multiple values"; + properties.authenticationMethod = 1; + if (!$util.isString(message.privateKey)) + return "privateKey: string expected"; } return null; }; /** - * Creates a PrivateConnection message from a plain object. Also converts values to their respective internal types. + * Creates a ForwardSshTunnelConnectivity message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.PrivateConnection + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection + * @returns {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity */ - PrivateConnection.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PrivateConnection) + ForwardSshTunnelConnectivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity) return object; - var message = new $root.google.cloud.datastream.v1.PrivateConnection(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.PrivateConnection.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.datastream.v1.PrivateConnection.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1.PrivateConnection.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]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - 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 "CREATING": - case 1: - message.state = 1; - break; - case "CREATED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; - case "FAILED_TO_DELETE": - case 5: - message.state = 5; - break; - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.datastream.v1.PrivateConnection.error: object expected"); - message.error = $root.google.cloud.datastream.v1.Error.fromObject(object.error); - } - if (object.vpcPeeringConfig != null) { - if (typeof object.vpcPeeringConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.PrivateConnection.vpcPeeringConfig: object expected"); - message.vpcPeeringConfig = $root.google.cloud.datastream.v1.VpcPeeringConfig.fromObject(object.vpcPeeringConfig); - } + var message = new $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.username != null) + message.username = String(object.username); + if (object.port != null) + message.port = object.port | 0; + if (object.password != null) + message.password = String(object.password); + if (object.privateKey != null) + message.privateKey = String(object.privateKey); return message; }; /** - * Creates a plain object from a PrivateConnection message. Also converts values to other types if specified. + * Creates a plain object from a ForwardSshTunnelConnectivity message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.PrivateConnection + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @static - * @param {google.cloud.datastream.v1.PrivateConnection} message PrivateConnection + * @param {google.cloud.datastream.v1.ForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrivateConnection.toObject = function toObject(message, options) { + ForwardSshTunnelConnectivity.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.error = null; - object.vpcPeeringConfig = null; + object.hostname = ""; + object.username = ""; + object.port = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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); - 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.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.password != null && message.hasOwnProperty("password")) { + object.password = message.password; + if (options.oneofs) + object.authenticationMethod = "password"; + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) { + object.privateKey = message.privateKey; + if (options.oneofs) + object.authenticationMethod = "privateKey"; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datastream.v1.PrivateConnection.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.PrivateConnection.State[message.state] : message.state; - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.cloud.datastream.v1.Error.toObject(message.error, options); - if (message.vpcPeeringConfig != null && message.hasOwnProperty("vpcPeeringConfig")) - object.vpcPeeringConfig = $root.google.cloud.datastream.v1.VpcPeeringConfig.toObject(message.vpcPeeringConfig, options); return object; }; /** - * Converts this PrivateConnection to JSON. + * Converts this ForwardSshTunnelConnectivity to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.PrivateConnection + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @instance * @returns {Object.} JSON object */ - PrivateConnection.prototype.toJSON = function toJSON() { + ForwardSshTunnelConnectivity.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PrivateConnection + * Gets the default type url for ForwardSshTunnelConnectivity * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PrivateConnection + * @memberof google.cloud.datastream.v1.ForwardSshTunnelConnectivity * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrivateConnection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ForwardSshTunnelConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.PrivateConnection"; + return typeUrlPrefix + "/google.cloud.datastream.v1.ForwardSshTunnelConnectivity"; }; - /** - * State enum. - * @name google.cloud.datastream.v1.PrivateConnection.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} CREATED=2 CREATED value - * @property {number} FAILED=3 FAILED value - * @property {number} DELETING=4 DELETING value - * @property {number} FAILED_TO_DELETE=5 FAILED_TO_DELETE value - */ - PrivateConnection.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "CREATED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "DELETING"] = 4; - values[valuesById[5] = "FAILED_TO_DELETE"] = 5; - return values; - })(); - - return PrivateConnection; + return ForwardSshTunnelConnectivity; })(); - v1.PrivateConnectivity = (function() { + v1.VpcPeeringConfig = (function() { /** - * Properties of a PrivateConnectivity. + * Properties of a VpcPeeringConfig. * @memberof google.cloud.datastream.v1 - * @interface IPrivateConnectivity - * @property {string|null} [privateConnection] PrivateConnectivity privateConnection + * @interface IVpcPeeringConfig + * @property {string|null} [vpc] VpcPeeringConfig vpc + * @property {string|null} [subnet] VpcPeeringConfig subnet */ /** - * Constructs a new PrivateConnectivity. + * Constructs a new VpcPeeringConfig. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PrivateConnectivity. - * @implements IPrivateConnectivity + * @classdesc Represents a VpcPeeringConfig. + * @implements IVpcPeeringConfig * @constructor - * @param {google.cloud.datastream.v1.IPrivateConnectivity=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IVpcPeeringConfig=} [properties] Properties to set */ - function PrivateConnectivity(properties) { + function VpcPeeringConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12814,75 +13222,89 @@ } /** - * PrivateConnectivity privateConnection. - * @member {string} privateConnection - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * VpcPeeringConfig vpc. + * @member {string} vpc + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @instance */ - PrivateConnectivity.prototype.privateConnection = ""; + VpcPeeringConfig.prototype.vpc = ""; /** - * Creates a new PrivateConnectivity instance using the specified properties. + * VpcPeeringConfig subnet. + * @member {string} subnet + * @memberof google.cloud.datastream.v1.VpcPeeringConfig + * @instance + */ + VpcPeeringConfig.prototype.subnet = ""; + + /** + * Creates a new VpcPeeringConfig instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @static - * @param {google.cloud.datastream.v1.IPrivateConnectivity=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity instance + * @param {google.cloud.datastream.v1.IVpcPeeringConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig instance */ - PrivateConnectivity.create = function create(properties) { - return new PrivateConnectivity(properties); + VpcPeeringConfig.create = function create(properties) { + return new VpcPeeringConfig(properties); }; /** - * Encodes the specified PrivateConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnectivity.verify|verify} messages. + * Encodes the specified VpcPeeringConfig message. Does not implicitly {@link google.cloud.datastream.v1.VpcPeeringConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @static - * @param {google.cloud.datastream.v1.IPrivateConnectivity} message PrivateConnectivity message or plain object to encode + * @param {google.cloud.datastream.v1.IVpcPeeringConfig} message VpcPeeringConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivateConnectivity.encode = function encode(message, writer) { + VpcPeeringConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.privateConnection != null && Object.hasOwnProperty.call(message, "privateConnection")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.privateConnection); + if (message.vpc != null && Object.hasOwnProperty.call(message, "vpc")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.vpc); + if (message.subnet != null && Object.hasOwnProperty.call(message, "subnet")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnet); return writer; }; /** - * Encodes the specified PrivateConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnectivity.verify|verify} messages. + * Encodes the specified VpcPeeringConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.VpcPeeringConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @static - * @param {google.cloud.datastream.v1.IPrivateConnectivity} message PrivateConnectivity message or plain object to encode + * @param {google.cloud.datastream.v1.IVpcPeeringConfig} message VpcPeeringConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrivateConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + VpcPeeringConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrivateConnectivity message from the specified reader or buffer. + * Decodes a VpcPeeringConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity + * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateConnectivity.decode = function decode(reader, length) { + VpcPeeringConfig.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.datastream.v1.PrivateConnectivity(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.VpcPeeringConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.privateConnection = reader.string(); + message.vpc = reader.string(); + break; + } + case 2: { + message.subnet = reader.string(); break; } default: @@ -12894,128 +13316,138 @@ }; /** - * Decodes a PrivateConnectivity message from the specified reader or buffer, length delimited. + * Decodes a VpcPeeringConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity + * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrivateConnectivity.decodeDelimited = function decodeDelimited(reader) { + VpcPeeringConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrivateConnectivity message. + * Verifies a VpcPeeringConfig message. * @function verify - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrivateConnectivity.verify = function verify(message) { + VpcPeeringConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) - if (!$util.isString(message.privateConnection)) - return "privateConnection: string expected"; + if (message.vpc != null && message.hasOwnProperty("vpc")) + if (!$util.isString(message.vpc)) + return "vpc: string expected"; + if (message.subnet != null && message.hasOwnProperty("subnet")) + if (!$util.isString(message.subnet)) + return "subnet: string expected"; return null; }; /** - * Creates a PrivateConnectivity message from a plain object. Also converts values to their respective internal types. + * Creates a VpcPeeringConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity + * @returns {google.cloud.datastream.v1.VpcPeeringConfig} VpcPeeringConfig */ - PrivateConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PrivateConnectivity) + VpcPeeringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.VpcPeeringConfig) return object; - var message = new $root.google.cloud.datastream.v1.PrivateConnectivity(); - if (object.privateConnection != null) - message.privateConnection = String(object.privateConnection); + var message = new $root.google.cloud.datastream.v1.VpcPeeringConfig(); + if (object.vpc != null) + message.vpc = String(object.vpc); + if (object.subnet != null) + message.subnet = String(object.subnet); return message; }; /** - * Creates a plain object from a PrivateConnectivity message. Also converts values to other types if specified. + * Creates a plain object from a VpcPeeringConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @static - * @param {google.cloud.datastream.v1.PrivateConnectivity} message PrivateConnectivity + * @param {google.cloud.datastream.v1.VpcPeeringConfig} message VpcPeeringConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrivateConnectivity.toObject = function toObject(message, options) { + VpcPeeringConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.privateConnection = ""; - if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) - object.privateConnection = message.privateConnection; + if (options.defaults) { + object.vpc = ""; + object.subnet = ""; + } + if (message.vpc != null && message.hasOwnProperty("vpc")) + object.vpc = message.vpc; + if (message.subnet != null && message.hasOwnProperty("subnet")) + object.subnet = message.subnet; return object; }; /** - * Converts this PrivateConnectivity to JSON. + * Converts this VpcPeeringConfig to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @instance * @returns {Object.} JSON object */ - PrivateConnectivity.prototype.toJSON = function toJSON() { + VpcPeeringConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PrivateConnectivity + * Gets the default type url for VpcPeeringConfig * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @memberof google.cloud.datastream.v1.VpcPeeringConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrivateConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VpcPeeringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.PrivateConnectivity"; + return typeUrlPrefix + "/google.cloud.datastream.v1.VpcPeeringConfig"; }; - return PrivateConnectivity; + return VpcPeeringConfig; })(); - v1.Route = (function() { + v1.PrivateConnection = (function() { /** - * Properties of a Route. + * Properties of a PrivateConnection. * @memberof google.cloud.datastream.v1 - * @interface IRoute - * @property {string|null} [name] Route name - * @property {google.protobuf.ITimestamp|null} [createTime] Route createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Route updateTime - * @property {Object.|null} [labels] Route labels - * @property {string|null} [displayName] Route displayName - * @property {string|null} [destinationAddress] Route destinationAddress - * @property {number|null} [destinationPort] Route destinationPort + * @interface IPrivateConnection + * @property {string|null} [name] PrivateConnection name + * @property {google.protobuf.ITimestamp|null} [createTime] PrivateConnection createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PrivateConnection updateTime + * @property {Object.|null} [labels] PrivateConnection labels + * @property {string|null} [displayName] PrivateConnection displayName + * @property {google.cloud.datastream.v1.PrivateConnection.State|null} [state] PrivateConnection state + * @property {google.cloud.datastream.v1.IError|null} [error] PrivateConnection error + * @property {google.cloud.datastream.v1.IVpcPeeringConfig|null} [vpcPeeringConfig] PrivateConnection vpcPeeringConfig */ /** - * Constructs a new Route. + * Constructs a new PrivateConnection. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a Route. - * @implements IRoute + * @classdesc Represents a PrivateConnection. + * @implements IPrivateConnection * @constructor - * @param {google.cloud.datastream.v1.IRoute=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IPrivateConnection=} [properties] Properties to set */ - function Route(properties) { + function PrivateConnection(properties) { this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -13024,83 +13456,91 @@ } /** - * Route name. + * PrivateConnection name. * @member {string} name - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @instance */ - Route.prototype.name = ""; + PrivateConnection.prototype.name = ""; /** - * Route createTime. + * PrivateConnection createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @instance */ - Route.prototype.createTime = null; + PrivateConnection.prototype.createTime = null; /** - * Route updateTime. + * PrivateConnection updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @instance */ - Route.prototype.updateTime = null; + PrivateConnection.prototype.updateTime = null; /** - * Route labels. + * PrivateConnection labels. * @member {Object.} labels - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @instance */ - Route.prototype.labels = $util.emptyObject; + PrivateConnection.prototype.labels = $util.emptyObject; /** - * Route displayName. + * PrivateConnection displayName. * @member {string} displayName - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @instance */ - Route.prototype.displayName = ""; + PrivateConnection.prototype.displayName = ""; /** - * Route destinationAddress. - * @member {string} destinationAddress - * @memberof google.cloud.datastream.v1.Route + * PrivateConnection state. + * @member {google.cloud.datastream.v1.PrivateConnection.State} state + * @memberof google.cloud.datastream.v1.PrivateConnection * @instance */ - Route.prototype.destinationAddress = ""; + PrivateConnection.prototype.state = 0; /** - * Route destinationPort. - * @member {number} destinationPort - * @memberof google.cloud.datastream.v1.Route + * PrivateConnection error. + * @member {google.cloud.datastream.v1.IError|null|undefined} error + * @memberof google.cloud.datastream.v1.PrivateConnection * @instance */ - Route.prototype.destinationPort = 0; + PrivateConnection.prototype.error = null; /** - * Creates a new Route instance using the specified properties. + * PrivateConnection vpcPeeringConfig. + * @member {google.cloud.datastream.v1.IVpcPeeringConfig|null|undefined} vpcPeeringConfig + * @memberof google.cloud.datastream.v1.PrivateConnection + * @instance + */ + PrivateConnection.prototype.vpcPeeringConfig = null; + + /** + * Creates a new PrivateConnection instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @static - * @param {google.cloud.datastream.v1.IRoute=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Route} Route instance + * @param {google.cloud.datastream.v1.IPrivateConnection=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection instance */ - Route.create = function create(properties) { - return new Route(properties); + PrivateConnection.create = function create(properties) { + return new PrivateConnection(properties); }; /** - * Encodes the specified Route message. Does not implicitly {@link google.cloud.datastream.v1.Route.verify|verify} messages. + * Encodes the specified PrivateConnection message. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnection.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @static - * @param {google.cloud.datastream.v1.IRoute} message Route message or plain object to encode + * @param {google.cloud.datastream.v1.IPrivateConnection} message PrivateConnection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Route.encode = function encode(message, writer) { + PrivateConnection.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -13114,41 +13554,43 @@ writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.destinationAddress != null && Object.hasOwnProperty.call(message, "destinationAddress")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.destinationAddress); - if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.destinationPort); - return writer; - }; - - /** - * Encodes the specified Route message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Route.verify|verify} messages. + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.cloud.datastream.v1.Error.encode(message.error, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.vpcPeeringConfig != null && Object.hasOwnProperty.call(message, "vpcPeeringConfig")) + $root.google.cloud.datastream.v1.VpcPeeringConfig.encode(message.vpcPeeringConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PrivateConnection message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnection.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @static - * @param {google.cloud.datastream.v1.IRoute} message Route message or plain object to encode + * @param {google.cloud.datastream.v1.IPrivateConnection} message PrivateConnection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Route.encodeDelimited = function encodeDelimited(message, writer) { + PrivateConnection.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Route message from the specified reader or buffer. + * Decodes a PrivateConnection message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Route} Route + * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Route.decode = function decode(reader, length) { + PrivateConnection.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.datastream.v1.Route(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PrivateConnection(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -13192,11 +13634,15 @@ break; } case 6: { - message.destinationAddress = reader.string(); + message.state = reader.int32(); break; } case 7: { - message.destinationPort = reader.int32(); + message.error = $root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32()); + break; + } + case 100: { + message.vpcPeeringConfig = $root.google.cloud.datastream.v1.VpcPeeringConfig.decode(reader, reader.uint32()); break; } default: @@ -13208,30 +13654,30 @@ }; /** - * Decodes a Route message from the specified reader or buffer, length delimited. + * Decodes a PrivateConnection message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Route} Route + * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Route.decodeDelimited = function decodeDelimited(reader) { + PrivateConnection.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Route message. + * Verifies a PrivateConnection message. * @function verify - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Route.verify = function verify(message) { + PrivateConnection.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -13258,65 +13704,119 @@ if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.destinationAddress != null && message.hasOwnProperty("destinationAddress")) - if (!$util.isString(message.destinationAddress)) - return "destinationAddress: string expected"; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - if (!$util.isInteger(message.destinationPort)) - return "destinationPort: integer 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: + case 5: + break; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.cloud.datastream.v1.Error.verify(message.error); + if (error) + return "error." + error; + } + if (message.vpcPeeringConfig != null && message.hasOwnProperty("vpcPeeringConfig")) { + var error = $root.google.cloud.datastream.v1.VpcPeeringConfig.verify(message.vpcPeeringConfig); + if (error) + return "vpcPeeringConfig." + error; + } return null; }; /** - * Creates a Route message from a plain object. Also converts values to their respective internal types. + * Creates a PrivateConnection message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Route} Route + * @returns {google.cloud.datastream.v1.PrivateConnection} PrivateConnection */ - Route.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Route) + PrivateConnection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PrivateConnection) return object; - var message = new $root.google.cloud.datastream.v1.Route(); + var message = new $root.google.cloud.datastream.v1.PrivateConnection(); if (object.name != null) message.name = String(object.name); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.Route.createTime: object expected"); + throw TypeError(".google.cloud.datastream.v1.PrivateConnection.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.datastream.v1.Route.updateTime: object expected"); + throw TypeError(".google.cloud.datastream.v1.PrivateConnection.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } if (object.labels) { if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1.Route.labels: object expected"); + throw TypeError(".google.cloud.datastream.v1.PrivateConnection.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]]); } if (object.displayName != null) message.displayName = String(object.displayName); - if (object.destinationAddress != null) - message.destinationAddress = String(object.destinationAddress); - if (object.destinationPort != null) - message.destinationPort = object.destinationPort | 0; + 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 "CREATING": + case 1: + message.state = 1; + break; + case "CREATED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "FAILED_TO_DELETE": + case 5: + message.state = 5; + break; + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.datastream.v1.PrivateConnection.error: object expected"); + message.error = $root.google.cloud.datastream.v1.Error.fromObject(object.error); + } + if (object.vpcPeeringConfig != null) { + if (typeof object.vpcPeeringConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.PrivateConnection.vpcPeeringConfig: object expected"); + message.vpcPeeringConfig = $root.google.cloud.datastream.v1.VpcPeeringConfig.fromObject(object.vpcPeeringConfig); + } return message; }; /** - * Creates a plain object from a Route message. Also converts values to other types if specified. + * Creates a plain object from a PrivateConnection message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @static - * @param {google.cloud.datastream.v1.Route} message Route + * @param {google.cloud.datastream.v1.PrivateConnection} message PrivateConnection * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Route.toObject = function toObject(message, options) { + PrivateConnection.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -13327,8 +13827,9 @@ object.createTime = null; object.updateTime = null; object.displayName = ""; - object.destinationAddress = ""; - object.destinationPort = 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.error = null; + object.vpcPeeringConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -13344,65 +13845,84 @@ } if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.destinationAddress != null && message.hasOwnProperty("destinationAddress")) - object.destinationAddress = message.destinationAddress; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - object.destinationPort = message.destinationPort; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.datastream.v1.PrivateConnection.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.PrivateConnection.State[message.state] : message.state; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.cloud.datastream.v1.Error.toObject(message.error, options); + if (message.vpcPeeringConfig != null && message.hasOwnProperty("vpcPeeringConfig")) + object.vpcPeeringConfig = $root.google.cloud.datastream.v1.VpcPeeringConfig.toObject(message.vpcPeeringConfig, options); return object; }; /** - * Converts this Route to JSON. + * Converts this PrivateConnection to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @instance * @returns {Object.} JSON object */ - Route.prototype.toJSON = function toJSON() { + PrivateConnection.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Route + * Gets the default type url for PrivateConnection * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Route + * @memberof google.cloud.datastream.v1.PrivateConnection * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Route.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PrivateConnection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.Route"; + return typeUrlPrefix + "/google.cloud.datastream.v1.PrivateConnection"; }; - return Route; + /** + * State enum. + * @name google.cloud.datastream.v1.PrivateConnection.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} CREATED=2 CREATED value + * @property {number} FAILED=3 FAILED value + * @property {number} DELETING=4 DELETING value + * @property {number} FAILED_TO_DELETE=5 FAILED_TO_DELETE value + */ + PrivateConnection.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "CREATED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "FAILED_TO_DELETE"] = 5; + return values; + })(); + + return PrivateConnection; })(); - v1.MysqlSslConfig = (function() { + v1.PrivateConnectivity = (function() { /** - * Properties of a MysqlSslConfig. + * Properties of a PrivateConnectivity. * @memberof google.cloud.datastream.v1 - * @interface IMysqlSslConfig - * @property {string|null} [clientKey] MysqlSslConfig clientKey - * @property {boolean|null} [clientKeySet] MysqlSslConfig clientKeySet - * @property {string|null} [clientCertificate] MysqlSslConfig clientCertificate - * @property {boolean|null} [clientCertificateSet] MysqlSslConfig clientCertificateSet - * @property {string|null} [caCertificate] MysqlSslConfig caCertificate - * @property {boolean|null} [caCertificateSet] MysqlSslConfig caCertificateSet + * @interface IPrivateConnectivity + * @property {string|null} [privateConnection] PrivateConnectivity privateConnection */ /** - * Constructs a new MysqlSslConfig. + * Constructs a new PrivateConnectivity. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlSslConfig. - * @implements IMysqlSslConfig + * @classdesc Represents a PrivateConnectivity. + * @implements IPrivateConnectivity * @constructor - * @param {google.cloud.datastream.v1.IMysqlSslConfig=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IPrivateConnectivity=} [properties] Properties to set */ - function MysqlSslConfig(properties) { + function PrivateConnectivity(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13410,145 +13930,75 @@ } /** - * MysqlSslConfig clientKey. - * @member {string} clientKey - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.clientKey = ""; - - /** - * MysqlSslConfig clientKeySet. - * @member {boolean} clientKeySet - * @memberof google.cloud.datastream.v1.MysqlSslConfig + * PrivateConnectivity privateConnection. + * @member {string} privateConnection + * @memberof google.cloud.datastream.v1.PrivateConnectivity * @instance */ - MysqlSslConfig.prototype.clientKeySet = false; + PrivateConnectivity.prototype.privateConnection = ""; /** - * MysqlSslConfig clientCertificate. - * @member {string} clientCertificate - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance + * Creates a new PrivateConnectivity instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.PrivateConnectivity + * @static + * @param {google.cloud.datastream.v1.IPrivateConnectivity=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity instance */ - MysqlSslConfig.prototype.clientCertificate = ""; + PrivateConnectivity.create = function create(properties) { + return new PrivateConnectivity(properties); + }; /** - * MysqlSslConfig clientCertificateSet. - * @member {boolean} clientCertificateSet - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.clientCertificateSet = false; - - /** - * MysqlSslConfig caCertificate. - * @member {string} caCertificate - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.caCertificate = ""; - - /** - * MysqlSslConfig caCertificateSet. - * @member {boolean} caCertificateSet - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @instance - */ - MysqlSslConfig.prototype.caCertificateSet = false; - - /** - * Creates a new MysqlSslConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlSslConfig - * @static - * @param {google.cloud.datastream.v1.IMysqlSslConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig instance - */ - MysqlSslConfig.create = function create(properties) { - return new MysqlSslConfig(properties); - }; - - /** - * Encodes the specified MysqlSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSslConfig.verify|verify} messages. + * Encodes the specified PrivateConnectivity message. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnectivity.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.MysqlSslConfig + * @memberof google.cloud.datastream.v1.PrivateConnectivity * @static - * @param {google.cloud.datastream.v1.IMysqlSslConfig} message MysqlSslConfig message or plain object to encode + * @param {google.cloud.datastream.v1.IPrivateConnectivity} message PrivateConnectivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MysqlSslConfig.encode = function encode(message, writer) { + PrivateConnectivity.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientKey); - if (message.clientKeySet != null && Object.hasOwnProperty.call(message, "clientKeySet")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clientKeySet); - if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientCertificate); - if (message.clientCertificateSet != null && Object.hasOwnProperty.call(message, "clientCertificateSet")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.clientCertificateSet); - if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.caCertificate); - if (message.caCertificateSet != null && Object.hasOwnProperty.call(message, "caCertificateSet")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.caCertificateSet); + if (message.privateConnection != null && Object.hasOwnProperty.call(message, "privateConnection")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.privateConnection); return writer; }; /** - * Encodes the specified MysqlSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSslConfig.verify|verify} messages. + * Encodes the specified PrivateConnectivity message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PrivateConnectivity.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSslConfig + * @memberof google.cloud.datastream.v1.PrivateConnectivity * @static - * @param {google.cloud.datastream.v1.IMysqlSslConfig} message MysqlSslConfig message or plain object to encode + * @param {google.cloud.datastream.v1.IPrivateConnectivity} message PrivateConnectivity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MysqlSslConfig.encodeDelimited = function encodeDelimited(message, writer) { + PrivateConnectivity.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MysqlSslConfig message from the specified reader or buffer. + * Decodes a PrivateConnectivity message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.MysqlSslConfig + * @memberof google.cloud.datastream.v1.PrivateConnectivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig + * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlSslConfig.decode = function decode(reader, length) { + PrivateConnectivity.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.datastream.v1.MysqlSslConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PrivateConnectivity(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.clientKey = reader.string(); - break; - } - case 2: { - message.clientKeySet = reader.bool(); - break; - } - case 3: { - message.clientCertificate = reader.string(); - break; - } - case 4: { - message.clientCertificateSet = reader.bool(); - break; - } - case 5: { - message.caCertificate = reader.string(); - break; - } - case 6: { - message.caCertificateSet = reader.bool(); + message.privateConnection = reader.string(); break; } default: @@ -13560,175 +14010,128 @@ }; /** - * Decodes a MysqlSslConfig message from the specified reader or buffer, length delimited. + * Decodes a PrivateConnectivity message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSslConfig + * @memberof google.cloud.datastream.v1.PrivateConnectivity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig + * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlSslConfig.decodeDelimited = function decodeDelimited(reader) { + PrivateConnectivity.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MysqlSslConfig message. + * Verifies a PrivateConnectivity message. * @function verify - * @memberof google.cloud.datastream.v1.MysqlSslConfig + * @memberof google.cloud.datastream.v1.PrivateConnectivity * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MysqlSslConfig.verify = function verify(message) { + PrivateConnectivity.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - if (!$util.isString(message.clientKey)) - return "clientKey: string expected"; - if (message.clientKeySet != null && message.hasOwnProperty("clientKeySet")) - if (typeof message.clientKeySet !== "boolean") - return "clientKeySet: boolean expected"; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - if (!$util.isString(message.clientCertificate)) - return "clientCertificate: string expected"; - if (message.clientCertificateSet != null && message.hasOwnProperty("clientCertificateSet")) - if (typeof message.clientCertificateSet !== "boolean") - return "clientCertificateSet: boolean expected"; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - if (!$util.isString(message.caCertificate)) - return "caCertificate: string expected"; - if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) - if (typeof message.caCertificateSet !== "boolean") - return "caCertificateSet: boolean expected"; + if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) + if (!$util.isString(message.privateConnection)) + return "privateConnection: string expected"; return null; }; /** - * Creates a MysqlSslConfig message from a plain object. Also converts values to their respective internal types. + * Creates a PrivateConnectivity message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlSslConfig + * @memberof google.cloud.datastream.v1.PrivateConnectivity * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig + * @returns {google.cloud.datastream.v1.PrivateConnectivity} PrivateConnectivity */ - MysqlSslConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlSslConfig) + PrivateConnectivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PrivateConnectivity) return object; - var message = new $root.google.cloud.datastream.v1.MysqlSslConfig(); - if (object.clientKey != null) - message.clientKey = String(object.clientKey); - if (object.clientKeySet != null) - message.clientKeySet = Boolean(object.clientKeySet); - if (object.clientCertificate != null) - message.clientCertificate = String(object.clientCertificate); - if (object.clientCertificateSet != null) - message.clientCertificateSet = Boolean(object.clientCertificateSet); - if (object.caCertificate != null) - message.caCertificate = String(object.caCertificate); - if (object.caCertificateSet != null) - message.caCertificateSet = Boolean(object.caCertificateSet); + var message = new $root.google.cloud.datastream.v1.PrivateConnectivity(); + if (object.privateConnection != null) + message.privateConnection = String(object.privateConnection); return message; }; /** - * Creates a plain object from a MysqlSslConfig message. Also converts values to other types if specified. + * Creates a plain object from a PrivateConnectivity message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.MysqlSslConfig + * @memberof google.cloud.datastream.v1.PrivateConnectivity * @static - * @param {google.cloud.datastream.v1.MysqlSslConfig} message MysqlSslConfig + * @param {google.cloud.datastream.v1.PrivateConnectivity} message PrivateConnectivity * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MysqlSslConfig.toObject = function toObject(message, options) { + PrivateConnectivity.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.clientKey = ""; - object.clientKeySet = false; - object.clientCertificate = ""; - object.clientCertificateSet = false; - object.caCertificate = ""; - object.caCertificateSet = false; - } - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - object.clientKey = message.clientKey; - if (message.clientKeySet != null && message.hasOwnProperty("clientKeySet")) - object.clientKeySet = message.clientKeySet; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - object.clientCertificate = message.clientCertificate; - if (message.clientCertificateSet != null && message.hasOwnProperty("clientCertificateSet")) - object.clientCertificateSet = message.clientCertificateSet; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - object.caCertificate = message.caCertificate; - if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) - object.caCertificateSet = message.caCertificateSet; + if (options.defaults) + object.privateConnection = ""; + if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) + object.privateConnection = message.privateConnection; return object; }; /** - * Converts this MysqlSslConfig to JSON. + * Converts this PrivateConnectivity to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlSslConfig + * @memberof google.cloud.datastream.v1.PrivateConnectivity * @instance * @returns {Object.} JSON object */ - MysqlSslConfig.prototype.toJSON = function toJSON() { + PrivateConnectivity.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MysqlSslConfig + * Gets the default type url for PrivateConnectivity * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlSslConfig + * @memberof google.cloud.datastream.v1.PrivateConnectivity * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MysqlSslConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PrivateConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlSslConfig"; + return typeUrlPrefix + "/google.cloud.datastream.v1.PrivateConnectivity"; }; - return MysqlSslConfig; + return PrivateConnectivity; })(); - v1.ConnectionProfile = (function() { + v1.Route = (function() { /** - * Properties of a ConnectionProfile. + * Properties of a Route. * @memberof google.cloud.datastream.v1 - * @interface IConnectionProfile - * @property {string|null} [name] ConnectionProfile name - * @property {google.protobuf.ITimestamp|null} [createTime] ConnectionProfile createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectionProfile updateTime - * @property {Object.|null} [labels] ConnectionProfile labels - * @property {string|null} [displayName] ConnectionProfile displayName - * @property {google.cloud.datastream.v1.IOracleProfile|null} [oracleProfile] ConnectionProfile oracleProfile - * @property {google.cloud.datastream.v1.IGcsProfile|null} [gcsProfile] ConnectionProfile gcsProfile - * @property {google.cloud.datastream.v1.IMysqlProfile|null} [mysqlProfile] ConnectionProfile mysqlProfile - * @property {google.cloud.datastream.v1.IBigQueryProfile|null} [bigqueryProfile] ConnectionProfile bigqueryProfile - * @property {google.cloud.datastream.v1.IPostgresqlProfile|null} [postgresqlProfile] ConnectionProfile postgresqlProfile - * @property {google.cloud.datastream.v1.IStaticServiceIpConnectivity|null} [staticServiceIpConnectivity] ConnectionProfile staticServiceIpConnectivity - * @property {google.cloud.datastream.v1.IForwardSshTunnelConnectivity|null} [forwardSshConnectivity] ConnectionProfile forwardSshConnectivity - * @property {google.cloud.datastream.v1.IPrivateConnectivity|null} [privateConnectivity] ConnectionProfile privateConnectivity + * @interface IRoute + * @property {string|null} [name] Route name + * @property {google.protobuf.ITimestamp|null} [createTime] Route createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Route updateTime + * @property {Object.|null} [labels] Route labels + * @property {string|null} [displayName] Route displayName + * @property {string|null} [destinationAddress] Route destinationAddress + * @property {number|null} [destinationPort] Route destinationPort */ /** - * Constructs a new ConnectionProfile. + * Constructs a new Route. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ConnectionProfile. - * @implements IConnectionProfile + * @classdesc Represents a Route. + * @implements IRoute * @constructor - * @param {google.cloud.datastream.v1.IConnectionProfile=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IRoute=} [properties] Properties to set */ - function ConnectionProfile(properties) { + function Route(properties) { this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -13737,156 +14140,83 @@ } /** - * ConnectionProfile name. + * Route name. * @member {string} name - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @instance */ - ConnectionProfile.prototype.name = ""; + Route.prototype.name = ""; /** - * ConnectionProfile createTime. + * Route createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @instance */ - ConnectionProfile.prototype.createTime = null; + Route.prototype.createTime = null; /** - * ConnectionProfile updateTime. + * Route updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @instance */ - ConnectionProfile.prototype.updateTime = null; + Route.prototype.updateTime = null; /** - * ConnectionProfile labels. + * Route labels. * @member {Object.} labels - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @instance */ - ConnectionProfile.prototype.labels = $util.emptyObject; + Route.prototype.labels = $util.emptyObject; /** - * ConnectionProfile displayName. + * Route displayName. * @member {string} displayName - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.displayName = ""; - - /** - * ConnectionProfile oracleProfile. - * @member {google.cloud.datastream.v1.IOracleProfile|null|undefined} oracleProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.oracleProfile = null; - - /** - * ConnectionProfile gcsProfile. - * @member {google.cloud.datastream.v1.IGcsProfile|null|undefined} gcsProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.gcsProfile = null; - - /** - * ConnectionProfile mysqlProfile. - * @member {google.cloud.datastream.v1.IMysqlProfile|null|undefined} mysqlProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.mysqlProfile = null; - - /** - * ConnectionProfile bigqueryProfile. - * @member {google.cloud.datastream.v1.IBigQueryProfile|null|undefined} bigqueryProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.bigqueryProfile = null; - - /** - * ConnectionProfile postgresqlProfile. - * @member {google.cloud.datastream.v1.IPostgresqlProfile|null|undefined} postgresqlProfile - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.postgresqlProfile = null; - - /** - * ConnectionProfile staticServiceIpConnectivity. - * @member {google.cloud.datastream.v1.IStaticServiceIpConnectivity|null|undefined} staticServiceIpConnectivity - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.staticServiceIpConnectivity = null; - - /** - * ConnectionProfile forwardSshConnectivity. - * @member {google.cloud.datastream.v1.IForwardSshTunnelConnectivity|null|undefined} forwardSshConnectivity - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.forwardSshConnectivity = null; - - /** - * ConnectionProfile privateConnectivity. - * @member {google.cloud.datastream.v1.IPrivateConnectivity|null|undefined} privateConnectivity - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @instance */ - ConnectionProfile.prototype.privateConnectivity = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Route.prototype.displayName = ""; /** - * ConnectionProfile profile. - * @member {"oracleProfile"|"gcsProfile"|"mysqlProfile"|"bigqueryProfile"|"postgresqlProfile"|undefined} profile - * @memberof google.cloud.datastream.v1.ConnectionProfile + * Route destinationAddress. + * @member {string} destinationAddress + * @memberof google.cloud.datastream.v1.Route * @instance */ - Object.defineProperty(ConnectionProfile.prototype, "profile", { - get: $util.oneOfGetter($oneOfFields = ["oracleProfile", "gcsProfile", "mysqlProfile", "bigqueryProfile", "postgresqlProfile"]), - set: $util.oneOfSetter($oneOfFields) - }); + Route.prototype.destinationAddress = ""; /** - * ConnectionProfile connectivity. - * @member {"staticServiceIpConnectivity"|"forwardSshConnectivity"|"privateConnectivity"|undefined} connectivity - * @memberof google.cloud.datastream.v1.ConnectionProfile + * Route destinationPort. + * @member {number} destinationPort + * @memberof google.cloud.datastream.v1.Route * @instance */ - Object.defineProperty(ConnectionProfile.prototype, "connectivity", { - get: $util.oneOfGetter($oneOfFields = ["staticServiceIpConnectivity", "forwardSshConnectivity", "privateConnectivity"]), - set: $util.oneOfSetter($oneOfFields) - }); + Route.prototype.destinationPort = 0; /** - * Creates a new ConnectionProfile instance using the specified properties. + * Creates a new Route instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @static - * @param {google.cloud.datastream.v1.IConnectionProfile=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile instance + * @param {google.cloud.datastream.v1.IRoute=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.Route} Route instance */ - ConnectionProfile.create = function create(properties) { - return new ConnectionProfile(properties); + Route.create = function create(properties) { + return new Route(properties); }; /** - * Encodes the specified ConnectionProfile message. Does not implicitly {@link google.cloud.datastream.v1.ConnectionProfile.verify|verify} messages. + * Encodes the specified Route message. Does not implicitly {@link google.cloud.datastream.v1.Route.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @static - * @param {google.cloud.datastream.v1.IConnectionProfile} message ConnectionProfile message or plain object to encode + * @param {google.cloud.datastream.v1.IRoute} message Route message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConnectionProfile.encode = function encode(message, writer) { + Route.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -13900,53 +14230,41 @@ writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.oracleProfile != null && Object.hasOwnProperty.call(message, "oracleProfile")) - $root.google.cloud.datastream.v1.OracleProfile.encode(message.oracleProfile, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.gcsProfile != null && Object.hasOwnProperty.call(message, "gcsProfile")) - $root.google.cloud.datastream.v1.GcsProfile.encode(message.gcsProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.mysqlProfile != null && Object.hasOwnProperty.call(message, "mysqlProfile")) - $root.google.cloud.datastream.v1.MysqlProfile.encode(message.mysqlProfile, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.bigqueryProfile != null && Object.hasOwnProperty.call(message, "bigqueryProfile")) - $root.google.cloud.datastream.v1.BigQueryProfile.encode(message.bigqueryProfile, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.postgresqlProfile != null && Object.hasOwnProperty.call(message, "postgresqlProfile")) - $root.google.cloud.datastream.v1.PostgresqlProfile.encode(message.postgresqlProfile, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - if (message.staticServiceIpConnectivity != null && Object.hasOwnProperty.call(message, "staticServiceIpConnectivity")) - $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.encode(message.staticServiceIpConnectivity, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); - if (message.forwardSshConnectivity != null && Object.hasOwnProperty.call(message, "forwardSshConnectivity")) - $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.encode(message.forwardSshConnectivity, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.privateConnectivity != null && Object.hasOwnProperty.call(message, "privateConnectivity")) - $root.google.cloud.datastream.v1.PrivateConnectivity.encode(message.privateConnectivity, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); + if (message.destinationAddress != null && Object.hasOwnProperty.call(message, "destinationAddress")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.destinationAddress); + if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.destinationPort); return writer; }; /** - * Encodes the specified ConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ConnectionProfile.verify|verify} messages. + * Encodes the specified Route message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Route.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @static - * @param {google.cloud.datastream.v1.IConnectionProfile} message ConnectionProfile message or plain object to encode + * @param {google.cloud.datastream.v1.IRoute} message Route message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + Route.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConnectionProfile message from the specified reader or buffer. + * Decodes a Route message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile + * @returns {google.cloud.datastream.v1.Route} Route * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConnectionProfile.decode = function decode(reader, length) { + Route.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.datastream.v1.ConnectionProfile(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.Route(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -13989,36 +14307,12 @@ message.displayName = reader.string(); break; } - case 100: { - message.oracleProfile = $root.google.cloud.datastream.v1.OracleProfile.decode(reader, reader.uint32()); - break; - } - case 101: { - message.gcsProfile = $root.google.cloud.datastream.v1.GcsProfile.decode(reader, reader.uint32()); - break; - } - case 102: { - message.mysqlProfile = $root.google.cloud.datastream.v1.MysqlProfile.decode(reader, reader.uint32()); - break; - } - case 103: { - message.bigqueryProfile = $root.google.cloud.datastream.v1.BigQueryProfile.decode(reader, reader.uint32()); - break; - } - case 104: { - message.postgresqlProfile = $root.google.cloud.datastream.v1.PostgresqlProfile.decode(reader, reader.uint32()); - break; - } - case 200: { - message.staticServiceIpConnectivity = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.decode(reader, reader.uint32()); - break; - } - case 201: { - message.forwardSshConnectivity = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.decode(reader, reader.uint32()); + case 6: { + message.destinationAddress = reader.string(); break; } - case 202: { - message.privateConnectivity = $root.google.cloud.datastream.v1.PrivateConnectivity.decode(reader, reader.uint32()); + case 7: { + message.destinationPort = reader.int32(); break; } default: @@ -14030,33 +14324,32 @@ }; /** - * Decodes a ConnectionProfile message from the specified reader or buffer, length delimited. + * Decodes a Route message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile + * @returns {google.cloud.datastream.v1.Route} Route * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + Route.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConnectionProfile message. + * Verifies a Route message. * @function verify - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConnectionProfile.verify = function verify(message) { + Route.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"; @@ -14081,171 +14374,65 @@ if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.oracleProfile != null && message.hasOwnProperty("oracleProfile")) { - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.OracleProfile.verify(message.oracleProfile); - if (error) - return "oracleProfile." + error; - } + if (message.destinationAddress != null && message.hasOwnProperty("destinationAddress")) + if (!$util.isString(message.destinationAddress)) + return "destinationAddress: string expected"; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + if (!$util.isInteger(message.destinationPort)) + return "destinationPort: integer expected"; + return null; + }; + + /** + * Creates a Route message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.Route + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.Route} Route + */ + Route.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.Route) + return object; + var message = new $root.google.cloud.datastream.v1.Route(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.datastream.v1.Route.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (message.gcsProfile != null && message.hasOwnProperty("gcsProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.GcsProfile.verify(message.gcsProfile); - if (error) - return "gcsProfile." + error; - } - } - if (message.mysqlProfile != null && message.hasOwnProperty("mysqlProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlProfile.verify(message.mysqlProfile); - if (error) - return "mysqlProfile." + error; - } - } - if (message.bigqueryProfile != null && message.hasOwnProperty("bigqueryProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.BigQueryProfile.verify(message.bigqueryProfile); - if (error) - return "bigqueryProfile." + error; - } - } - if (message.postgresqlProfile != null && message.hasOwnProperty("postgresqlProfile")) { - if (properties.profile === 1) - return "profile: multiple values"; - properties.profile = 1; - { - var error = $root.google.cloud.datastream.v1.PostgresqlProfile.verify(message.postgresqlProfile); - if (error) - return "postgresqlProfile." + error; - } - } - if (message.staticServiceIpConnectivity != null && message.hasOwnProperty("staticServiceIpConnectivity")) { - properties.connectivity = 1; - { - var error = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.verify(message.staticServiceIpConnectivity); - if (error) - return "staticServiceIpConnectivity." + error; - } - } - if (message.forwardSshConnectivity != null && message.hasOwnProperty("forwardSshConnectivity")) { - if (properties.connectivity === 1) - return "connectivity: multiple values"; - properties.connectivity = 1; - { - var error = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify(message.forwardSshConnectivity); - if (error) - return "forwardSshConnectivity." + error; - } - } - if (message.privateConnectivity != null && message.hasOwnProperty("privateConnectivity")) { - if (properties.connectivity === 1) - return "connectivity: multiple values"; - properties.connectivity = 1; - { - var error = $root.google.cloud.datastream.v1.PrivateConnectivity.verify(message.privateConnectivity); - if (error) - return "privateConnectivity." + error; - } - } - return null; - }; - - /** - * Creates a ConnectionProfile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.ConnectionProfile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile - */ - ConnectionProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ConnectionProfile) - return object; - var message = new $root.google.cloud.datastream.v1.ConnectionProfile(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.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.datastream.v1.ConnectionProfile.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.datastream.v1.Route.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } if (object.labels) { if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.labels: object expected"); + throw TypeError(".google.cloud.datastream.v1.Route.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]]); } if (object.displayName != null) message.displayName = String(object.displayName); - if (object.oracleProfile != null) { - if (typeof object.oracleProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.oracleProfile: object expected"); - message.oracleProfile = $root.google.cloud.datastream.v1.OracleProfile.fromObject(object.oracleProfile); - } - if (object.gcsProfile != null) { - if (typeof object.gcsProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.gcsProfile: object expected"); - message.gcsProfile = $root.google.cloud.datastream.v1.GcsProfile.fromObject(object.gcsProfile); - } - if (object.mysqlProfile != null) { - if (typeof object.mysqlProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.mysqlProfile: object expected"); - message.mysqlProfile = $root.google.cloud.datastream.v1.MysqlProfile.fromObject(object.mysqlProfile); - } - if (object.bigqueryProfile != null) { - if (typeof object.bigqueryProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.bigqueryProfile: object expected"); - message.bigqueryProfile = $root.google.cloud.datastream.v1.BigQueryProfile.fromObject(object.bigqueryProfile); - } - if (object.postgresqlProfile != null) { - if (typeof object.postgresqlProfile !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.postgresqlProfile: object expected"); - message.postgresqlProfile = $root.google.cloud.datastream.v1.PostgresqlProfile.fromObject(object.postgresqlProfile); - } - if (object.staticServiceIpConnectivity != null) { - if (typeof object.staticServiceIpConnectivity !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.staticServiceIpConnectivity: object expected"); - message.staticServiceIpConnectivity = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.fromObject(object.staticServiceIpConnectivity); - } - if (object.forwardSshConnectivity != null) { - if (typeof object.forwardSshConnectivity !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.forwardSshConnectivity: object expected"); - message.forwardSshConnectivity = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.fromObject(object.forwardSshConnectivity); - } - if (object.privateConnectivity != null) { - if (typeof object.privateConnectivity !== "object") - throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.privateConnectivity: object expected"); - message.privateConnectivity = $root.google.cloud.datastream.v1.PrivateConnectivity.fromObject(object.privateConnectivity); - } + if (object.destinationAddress != null) + message.destinationAddress = String(object.destinationAddress); + if (object.destinationPort != null) + message.destinationPort = object.destinationPort | 0; return message; }; /** - * Creates a plain object from a ConnectionProfile message. Also converts values to other types if specified. + * Creates a plain object from a Route message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @static - * @param {google.cloud.datastream.v1.ConnectionProfile} message ConnectionProfile + * @param {google.cloud.datastream.v1.Route} message Route * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConnectionProfile.toObject = function toObject(message, options) { + Route.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -14256,6 +14443,8 @@ object.createTime = null; object.updateTime = null; object.displayName = ""; + object.destinationAddress = ""; + object.destinationPort = 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -14271,104 +14460,65 @@ } if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.oracleProfile != null && message.hasOwnProperty("oracleProfile")) { - object.oracleProfile = $root.google.cloud.datastream.v1.OracleProfile.toObject(message.oracleProfile, options); - if (options.oneofs) - object.profile = "oracleProfile"; - } - if (message.gcsProfile != null && message.hasOwnProperty("gcsProfile")) { - object.gcsProfile = $root.google.cloud.datastream.v1.GcsProfile.toObject(message.gcsProfile, options); - if (options.oneofs) - object.profile = "gcsProfile"; - } - if (message.mysqlProfile != null && message.hasOwnProperty("mysqlProfile")) { - object.mysqlProfile = $root.google.cloud.datastream.v1.MysqlProfile.toObject(message.mysqlProfile, options); - if (options.oneofs) - object.profile = "mysqlProfile"; - } - if (message.bigqueryProfile != null && message.hasOwnProperty("bigqueryProfile")) { - object.bigqueryProfile = $root.google.cloud.datastream.v1.BigQueryProfile.toObject(message.bigqueryProfile, options); - if (options.oneofs) - object.profile = "bigqueryProfile"; - } - if (message.postgresqlProfile != null && message.hasOwnProperty("postgresqlProfile")) { - object.postgresqlProfile = $root.google.cloud.datastream.v1.PostgresqlProfile.toObject(message.postgresqlProfile, options); - if (options.oneofs) - object.profile = "postgresqlProfile"; - } - if (message.staticServiceIpConnectivity != null && message.hasOwnProperty("staticServiceIpConnectivity")) { - object.staticServiceIpConnectivity = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.toObject(message.staticServiceIpConnectivity, options); - if (options.oneofs) - object.connectivity = "staticServiceIpConnectivity"; - } - if (message.forwardSshConnectivity != null && message.hasOwnProperty("forwardSshConnectivity")) { - object.forwardSshConnectivity = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.toObject(message.forwardSshConnectivity, options); - if (options.oneofs) - object.connectivity = "forwardSshConnectivity"; - } - if (message.privateConnectivity != null && message.hasOwnProperty("privateConnectivity")) { - object.privateConnectivity = $root.google.cloud.datastream.v1.PrivateConnectivity.toObject(message.privateConnectivity, options); - if (options.oneofs) - object.connectivity = "privateConnectivity"; - } + if (message.destinationAddress != null && message.hasOwnProperty("destinationAddress")) + object.destinationAddress = message.destinationAddress; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + object.destinationPort = message.destinationPort; return object; }; /** - * Converts this ConnectionProfile to JSON. + * Converts this Route to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @instance * @returns {Object.} JSON object */ - ConnectionProfile.prototype.toJSON = function toJSON() { + Route.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConnectionProfile + * Gets the default type url for Route * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ConnectionProfile + * @memberof google.cloud.datastream.v1.Route * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Route.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.ConnectionProfile"; + return typeUrlPrefix + "/google.cloud.datastream.v1.Route"; }; - return ConnectionProfile; + return Route; })(); - v1.OracleColumn = (function() { + v1.MysqlSslConfig = (function() { /** - * Properties of an OracleColumn. + * Properties of a MysqlSslConfig. * @memberof google.cloud.datastream.v1 - * @interface IOracleColumn - * @property {string|null} [column] OracleColumn column - * @property {string|null} [dataType] OracleColumn dataType - * @property {number|null} [length] OracleColumn length - * @property {number|null} [precision] OracleColumn precision - * @property {number|null} [scale] OracleColumn scale - * @property {string|null} [encoding] OracleColumn encoding - * @property {boolean|null} [primaryKey] OracleColumn primaryKey - * @property {boolean|null} [nullable] OracleColumn nullable - * @property {number|null} [ordinalPosition] OracleColumn ordinalPosition + * @interface IMysqlSslConfig + * @property {string|null} [clientKey] MysqlSslConfig clientKey + * @property {boolean|null} [clientKeySet] MysqlSslConfig clientKeySet + * @property {string|null} [clientCertificate] MysqlSslConfig clientCertificate + * @property {boolean|null} [clientCertificateSet] MysqlSslConfig clientCertificateSet + * @property {string|null} [caCertificate] MysqlSslConfig caCertificate + * @property {boolean|null} [caCertificateSet] MysqlSslConfig caCertificateSet */ /** - * Constructs a new OracleColumn. + * Constructs a new MysqlSslConfig. * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleColumn. - * @implements IOracleColumn + * @classdesc Represents a MysqlSslConfig. + * @implements IMysqlSslConfig * @constructor - * @param {google.cloud.datastream.v1.IOracleColumn=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IMysqlSslConfig=} [properties] Properties to set */ - function OracleColumn(properties) { + function MysqlSslConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14376,187 +14526,145 @@ } /** - * OracleColumn column. - * @member {string} column - * @memberof google.cloud.datastream.v1.OracleColumn + * MysqlSslConfig clientKey. + * @member {string} clientKey + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @instance */ - OracleColumn.prototype.column = ""; + MysqlSslConfig.prototype.clientKey = ""; /** - * OracleColumn dataType. - * @member {string} dataType - * @memberof google.cloud.datastream.v1.OracleColumn + * MysqlSslConfig clientKeySet. + * @member {boolean} clientKeySet + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @instance */ - OracleColumn.prototype.dataType = ""; + MysqlSslConfig.prototype.clientKeySet = false; /** - * OracleColumn length. - * @member {number} length - * @memberof google.cloud.datastream.v1.OracleColumn + * MysqlSslConfig clientCertificate. + * @member {string} clientCertificate + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @instance */ - OracleColumn.prototype.length = 0; + MysqlSslConfig.prototype.clientCertificate = ""; /** - * OracleColumn precision. - * @member {number} precision - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.precision = 0; - - /** - * OracleColumn scale. - * @member {number} scale - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.scale = 0; - - /** - * OracleColumn encoding. - * @member {string} encoding - * @memberof google.cloud.datastream.v1.OracleColumn - * @instance - */ - OracleColumn.prototype.encoding = ""; - - /** - * OracleColumn primaryKey. - * @member {boolean} primaryKey - * @memberof google.cloud.datastream.v1.OracleColumn + * MysqlSslConfig clientCertificateSet. + * @member {boolean} clientCertificateSet + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @instance */ - OracleColumn.prototype.primaryKey = false; + MysqlSslConfig.prototype.clientCertificateSet = false; /** - * OracleColumn nullable. - * @member {boolean} nullable - * @memberof google.cloud.datastream.v1.OracleColumn + * MysqlSslConfig caCertificate. + * @member {string} caCertificate + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @instance */ - OracleColumn.prototype.nullable = false; + MysqlSslConfig.prototype.caCertificate = ""; /** - * OracleColumn ordinalPosition. - * @member {number} ordinalPosition - * @memberof google.cloud.datastream.v1.OracleColumn + * MysqlSslConfig caCertificateSet. + * @member {boolean} caCertificateSet + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @instance */ - OracleColumn.prototype.ordinalPosition = 0; + MysqlSslConfig.prototype.caCertificateSet = false; /** - * Creates a new OracleColumn instance using the specified properties. + * Creates a new MysqlSslConfig instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.OracleColumn + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @static - * @param {google.cloud.datastream.v1.IOracleColumn=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn instance + * @param {google.cloud.datastream.v1.IMysqlSslConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig instance */ - OracleColumn.create = function create(properties) { - return new OracleColumn(properties); + MysqlSslConfig.create = function create(properties) { + return new MysqlSslConfig(properties); }; /** - * Encodes the specified OracleColumn message. Does not implicitly {@link google.cloud.datastream.v1.OracleColumn.verify|verify} messages. + * Encodes the specified MysqlSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSslConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.OracleColumn + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @static - * @param {google.cloud.datastream.v1.IOracleColumn} message OracleColumn message or plain object to encode + * @param {google.cloud.datastream.v1.IMysqlSslConfig} message MysqlSslConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleColumn.encode = function encode(message, writer) { + MysqlSslConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); - if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.precision); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scale); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.encoding); - if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.primaryKey); - if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.nullable); - if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ordinalPosition); + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientKey); + if (message.clientKeySet != null && Object.hasOwnProperty.call(message, "clientKeySet")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clientKeySet); + if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientCertificate); + if (message.clientCertificateSet != null && Object.hasOwnProperty.call(message, "clientCertificateSet")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.clientCertificateSet); + if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.caCertificate); + if (message.caCertificateSet != null && Object.hasOwnProperty.call(message, "caCertificateSet")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.caCertificateSet); return writer; }; /** - * Encodes the specified OracleColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleColumn.verify|verify} messages. + * Encodes the specified MysqlSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSslConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleColumn + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @static - * @param {google.cloud.datastream.v1.IOracleColumn} message OracleColumn message or plain object to encode + * @param {google.cloud.datastream.v1.IMysqlSslConfig} message MysqlSslConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleColumn.encodeDelimited = function encodeDelimited(message, writer) { + MysqlSslConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OracleColumn message from the specified reader or buffer. + * Decodes a MysqlSslConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.OracleColumn + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn + * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleColumn.decode = function decode(reader, length) { + MysqlSslConfig.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.datastream.v1.OracleColumn(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlSslConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.column = reader.string(); + message.clientKey = reader.string(); break; } case 2: { - message.dataType = reader.string(); + message.clientKeySet = reader.bool(); break; } case 3: { - message.length = reader.int32(); + message.clientCertificate = reader.string(); break; } case 4: { - message.precision = reader.int32(); + message.clientCertificateSet = reader.bool(); break; } case 5: { - message.scale = reader.int32(); + message.caCertificate = reader.string(); break; } case 6: { - message.encoding = reader.string(); - break; - } - case 7: { - message.primaryKey = reader.bool(); - break; - } - case 8: { - message.nullable = reader.bool(); - break; - } - case 9: { - message.ordinalPosition = reader.int32(); + message.caCertificateSet = reader.bool(); break; } default: @@ -14568,189 +14676,164 @@ }; /** - * Decodes an OracleColumn message from the specified reader or buffer, length delimited. + * Decodes a MysqlSslConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleColumn + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn + * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleColumn.decodeDelimited = function decodeDelimited(reader) { + MysqlSslConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OracleColumn message. + * Verifies a MysqlSslConfig message. * @function verify - * @memberof google.cloud.datastream.v1.OracleColumn + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OracleColumn.verify = function verify(message) { + MysqlSslConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) - if (!$util.isString(message.dataType)) - return "dataType: string expected"; - if (message.length != null && message.hasOwnProperty("length")) - if (!$util.isInteger(message.length)) - return "length: integer expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (!$util.isInteger(message.precision)) - return "precision: integer expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (!$util.isInteger(message.scale)) - return "scale: integer expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - if (typeof message.primaryKey !== "boolean") - return "primaryKey: boolean expected"; - if (message.nullable != null && message.hasOwnProperty("nullable")) - if (typeof message.nullable !== "boolean") - return "nullable: boolean expected"; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - if (!$util.isInteger(message.ordinalPosition)) - return "ordinalPosition: integer expected"; + if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (!$util.isString(message.clientKey)) + return "clientKey: string expected"; + if (message.clientKeySet != null && message.hasOwnProperty("clientKeySet")) + if (typeof message.clientKeySet !== "boolean") + return "clientKeySet: boolean expected"; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + if (!$util.isString(message.clientCertificate)) + return "clientCertificate: string expected"; + if (message.clientCertificateSet != null && message.hasOwnProperty("clientCertificateSet")) + if (typeof message.clientCertificateSet !== "boolean") + return "clientCertificateSet: boolean expected"; + if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) + if (!$util.isString(message.caCertificate)) + return "caCertificate: string expected"; + if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) + if (typeof message.caCertificateSet !== "boolean") + return "caCertificateSet: boolean expected"; return null; }; /** - * Creates an OracleColumn message from a plain object. Also converts values to their respective internal types. + * Creates a MysqlSslConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.OracleColumn + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn + * @returns {google.cloud.datastream.v1.MysqlSslConfig} MysqlSslConfig */ - OracleColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleColumn) + MysqlSslConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.MysqlSslConfig) return object; - var message = new $root.google.cloud.datastream.v1.OracleColumn(); - if (object.column != null) - message.column = String(object.column); - if (object.dataType != null) - message.dataType = String(object.dataType); - if (object.length != null) - message.length = object.length | 0; - if (object.precision != null) - message.precision = object.precision | 0; - if (object.scale != null) - message.scale = object.scale | 0; - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.primaryKey != null) - message.primaryKey = Boolean(object.primaryKey); - if (object.nullable != null) - message.nullable = Boolean(object.nullable); - if (object.ordinalPosition != null) - message.ordinalPosition = object.ordinalPosition | 0; + var message = new $root.google.cloud.datastream.v1.MysqlSslConfig(); + if (object.clientKey != null) + message.clientKey = String(object.clientKey); + if (object.clientKeySet != null) + message.clientKeySet = Boolean(object.clientKeySet); + if (object.clientCertificate != null) + message.clientCertificate = String(object.clientCertificate); + if (object.clientCertificateSet != null) + message.clientCertificateSet = Boolean(object.clientCertificateSet); + if (object.caCertificate != null) + message.caCertificate = String(object.caCertificate); + if (object.caCertificateSet != null) + message.caCertificateSet = Boolean(object.caCertificateSet); return message; }; /** - * Creates a plain object from an OracleColumn message. Also converts values to other types if specified. + * Creates a plain object from a MysqlSslConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.OracleColumn + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @static - * @param {google.cloud.datastream.v1.OracleColumn} message OracleColumn + * @param {google.cloud.datastream.v1.MysqlSslConfig} message MysqlSslConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OracleColumn.toObject = function toObject(message, options) { + MysqlSslConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.column = ""; - object.dataType = ""; - object.length = 0; - object.precision = 0; - object.scale = 0; - object.encoding = ""; - object.primaryKey = false; - object.nullable = false; - object.ordinalPosition = 0; + object.clientKey = ""; + object.clientKeySet = false; + object.clientCertificate = ""; + object.clientCertificateSet = false; + object.caCertificate = ""; + object.caCertificateSet = false; } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = message.dataType; - if (message.length != null && message.hasOwnProperty("length")) - object.length = message.length; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = message.precision; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = message.scale; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - object.primaryKey = message.primaryKey; - if (message.nullable != null && message.hasOwnProperty("nullable")) - object.nullable = message.nullable; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - object.ordinalPosition = message.ordinalPosition; + if (message.clientKey != null && message.hasOwnProperty("clientKey")) + object.clientKey = message.clientKey; + if (message.clientKeySet != null && message.hasOwnProperty("clientKeySet")) + object.clientKeySet = message.clientKeySet; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + object.clientCertificate = message.clientCertificate; + if (message.clientCertificateSet != null && message.hasOwnProperty("clientCertificateSet")) + object.clientCertificateSet = message.clientCertificateSet; + if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) + object.caCertificate = message.caCertificate; + if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) + object.caCertificateSet = message.caCertificateSet; return object; }; /** - * Converts this OracleColumn to JSON. + * Converts this MysqlSslConfig to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.OracleColumn + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @instance * @returns {Object.} JSON object */ - OracleColumn.prototype.toJSON = function toJSON() { + MysqlSslConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OracleColumn + * Gets the default type url for MysqlSslConfig * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleColumn + * @memberof google.cloud.datastream.v1.MysqlSslConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OracleColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MysqlSslConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleColumn"; + return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlSslConfig"; }; - return OracleColumn; + return MysqlSslConfig; })(); - v1.OracleTable = (function() { + v1.OracleSslConfig = (function() { /** - * Properties of an OracleTable. + * Properties of an OracleSslConfig. * @memberof google.cloud.datastream.v1 - * @interface IOracleTable - * @property {string|null} [table] OracleTable table - * @property {Array.|null} [oracleColumns] OracleTable oracleColumns + * @interface IOracleSslConfig + * @property {string|null} [caCertificate] OracleSslConfig caCertificate + * @property {boolean|null} [caCertificateSet] OracleSslConfig caCertificateSet */ /** - * Constructs a new OracleTable. + * Constructs a new OracleSslConfig. * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleTable. - * @implements IOracleTable + * @classdesc Represents an OracleSslConfig. + * @implements IOracleSslConfig * @constructor - * @param {google.cloud.datastream.v1.IOracleTable=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IOracleSslConfig=} [properties] Properties to set */ - function OracleTable(properties) { - this.oracleColumns = []; + function OracleSslConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14758,92 +14841,89 @@ } /** - * OracleTable table. - * @member {string} table - * @memberof google.cloud.datastream.v1.OracleTable + * OracleSslConfig caCertificate. + * @member {string} caCertificate + * @memberof google.cloud.datastream.v1.OracleSslConfig * @instance */ - OracleTable.prototype.table = ""; + OracleSslConfig.prototype.caCertificate = ""; /** - * OracleTable oracleColumns. - * @member {Array.} oracleColumns - * @memberof google.cloud.datastream.v1.OracleTable + * OracleSslConfig caCertificateSet. + * @member {boolean} caCertificateSet + * @memberof google.cloud.datastream.v1.OracleSslConfig * @instance */ - OracleTable.prototype.oracleColumns = $util.emptyArray; + OracleSslConfig.prototype.caCertificateSet = false; /** - * Creates a new OracleTable instance using the specified properties. + * Creates a new OracleSslConfig instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.OracleTable + * @memberof google.cloud.datastream.v1.OracleSslConfig * @static - * @param {google.cloud.datastream.v1.IOracleTable=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleTable} OracleTable instance + * @param {google.cloud.datastream.v1.IOracleSslConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleSslConfig} OracleSslConfig instance */ - OracleTable.create = function create(properties) { - return new OracleTable(properties); + OracleSslConfig.create = function create(properties) { + return new OracleSslConfig(properties); }; /** - * Encodes the specified OracleTable message. Does not implicitly {@link google.cloud.datastream.v1.OracleTable.verify|verify} messages. + * Encodes the specified OracleSslConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleSslConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.OracleTable + * @memberof google.cloud.datastream.v1.OracleSslConfig * @static - * @param {google.cloud.datastream.v1.IOracleTable} message OracleTable message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleSslConfig} message OracleSslConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleTable.encode = function encode(message, writer) { + OracleSslConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.oracleColumns != null && message.oracleColumns.length) - for (var i = 0; i < message.oracleColumns.length; ++i) - $root.google.cloud.datastream.v1.OracleColumn.encode(message.oracleColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caCertificate); + if (message.caCertificateSet != null && Object.hasOwnProperty.call(message, "caCertificateSet")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caCertificateSet); return writer; }; /** - * Encodes the specified OracleTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleTable.verify|verify} messages. + * Encodes the specified OracleSslConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSslConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleTable + * @memberof google.cloud.datastream.v1.OracleSslConfig * @static - * @param {google.cloud.datastream.v1.IOracleTable} message OracleTable message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleSslConfig} message OracleSslConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleTable.encodeDelimited = function encodeDelimited(message, writer) { + OracleSslConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OracleTable message from the specified reader or buffer. + * Decodes an OracleSslConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.OracleTable + * @memberof google.cloud.datastream.v1.OracleSslConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleTable} OracleTable + * @returns {google.cloud.datastream.v1.OracleSslConfig} OracleSslConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleTable.decode = function decode(reader, length) { + OracleSslConfig.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.datastream.v1.OracleTable(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSslConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.table = reader.string(); + message.caCertificate = reader.string(); break; } case 2: { - if (!(message.oracleColumns && message.oracleColumns.length)) - message.oracleColumns = []; - message.oracleColumns.push($root.google.cloud.datastream.v1.OracleColumn.decode(reader, reader.uint32())); + message.caCertificateSet = reader.bool(); break; } default: @@ -14855,150 +14935,145 @@ }; /** - * Decodes an OracleTable message from the specified reader or buffer, length delimited. + * Decodes an OracleSslConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleTable + * @memberof google.cloud.datastream.v1.OracleSslConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleTable} OracleTable + * @returns {google.cloud.datastream.v1.OracleSslConfig} OracleSslConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleTable.decodeDelimited = function decodeDelimited(reader) { + OracleSslConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OracleTable message. + * Verifies an OracleSslConfig message. * @function verify - * @memberof google.cloud.datastream.v1.OracleTable + * @memberof google.cloud.datastream.v1.OracleSslConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OracleTable.verify = function verify(message) { + OracleSslConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.oracleColumns != null && message.hasOwnProperty("oracleColumns")) { - if (!Array.isArray(message.oracleColumns)) - return "oracleColumns: array expected"; - for (var i = 0; i < message.oracleColumns.length; ++i) { - var error = $root.google.cloud.datastream.v1.OracleColumn.verify(message.oracleColumns[i]); - if (error) - return "oracleColumns." + error; - } - } + if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) + if (!$util.isString(message.caCertificate)) + return "caCertificate: string expected"; + if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) + if (typeof message.caCertificateSet !== "boolean") + return "caCertificateSet: boolean expected"; return null; }; /** - * Creates an OracleTable message from a plain object. Also converts values to their respective internal types. + * Creates an OracleSslConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.OracleTable + * @memberof google.cloud.datastream.v1.OracleSslConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleTable} OracleTable + * @returns {google.cloud.datastream.v1.OracleSslConfig} OracleSslConfig */ - OracleTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleTable) + OracleSslConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleSslConfig) return object; - var message = new $root.google.cloud.datastream.v1.OracleTable(); - if (object.table != null) - message.table = String(object.table); - if (object.oracleColumns) { - if (!Array.isArray(object.oracleColumns)) - throw TypeError(".google.cloud.datastream.v1.OracleTable.oracleColumns: array expected"); - message.oracleColumns = []; - for (var i = 0; i < object.oracleColumns.length; ++i) { - if (typeof object.oracleColumns[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleTable.oracleColumns: object expected"); - message.oracleColumns[i] = $root.google.cloud.datastream.v1.OracleColumn.fromObject(object.oracleColumns[i]); - } - } + var message = new $root.google.cloud.datastream.v1.OracleSslConfig(); + if (object.caCertificate != null) + message.caCertificate = String(object.caCertificate); + if (object.caCertificateSet != null) + message.caCertificateSet = Boolean(object.caCertificateSet); return message; }; /** - * Creates a plain object from an OracleTable message. Also converts values to other types if specified. + * Creates a plain object from an OracleSslConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.OracleTable + * @memberof google.cloud.datastream.v1.OracleSslConfig * @static - * @param {google.cloud.datastream.v1.OracleTable} message OracleTable + * @param {google.cloud.datastream.v1.OracleSslConfig} message OracleSslConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OracleTable.toObject = function toObject(message, options) { + OracleSslConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.oracleColumns = []; - if (options.defaults) - object.table = ""; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.oracleColumns && message.oracleColumns.length) { - object.oracleColumns = []; - for (var j = 0; j < message.oracleColumns.length; ++j) - object.oracleColumns[j] = $root.google.cloud.datastream.v1.OracleColumn.toObject(message.oracleColumns[j], options); + if (options.defaults) { + object.caCertificate = ""; + object.caCertificateSet = false; } + if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) + object.caCertificate = message.caCertificate; + if (message.caCertificateSet != null && message.hasOwnProperty("caCertificateSet")) + object.caCertificateSet = message.caCertificateSet; return object; }; /** - * Converts this OracleTable to JSON. + * Converts this OracleSslConfig to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.OracleTable + * @memberof google.cloud.datastream.v1.OracleSslConfig * @instance * @returns {Object.} JSON object */ - OracleTable.prototype.toJSON = function toJSON() { + OracleSslConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OracleTable + * Gets the default type url for OracleSslConfig * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleTable + * @memberof google.cloud.datastream.v1.OracleSslConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OracleTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OracleSslConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleTable"; + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSslConfig"; }; - return OracleTable; + return OracleSslConfig; })(); - v1.OracleSchema = (function() { + v1.ConnectionProfile = (function() { /** - * Properties of an OracleSchema. + * Properties of a ConnectionProfile. * @memberof google.cloud.datastream.v1 - * @interface IOracleSchema - * @property {string|null} [schema] OracleSchema schema - * @property {Array.|null} [oracleTables] OracleSchema oracleTables + * @interface IConnectionProfile + * @property {string|null} [name] ConnectionProfile name + * @property {google.protobuf.ITimestamp|null} [createTime] ConnectionProfile createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectionProfile updateTime + * @property {Object.|null} [labels] ConnectionProfile labels + * @property {string|null} [displayName] ConnectionProfile displayName + * @property {google.cloud.datastream.v1.IOracleProfile|null} [oracleProfile] ConnectionProfile oracleProfile + * @property {google.cloud.datastream.v1.IGcsProfile|null} [gcsProfile] ConnectionProfile gcsProfile + * @property {google.cloud.datastream.v1.IMysqlProfile|null} [mysqlProfile] ConnectionProfile mysqlProfile + * @property {google.cloud.datastream.v1.IBigQueryProfile|null} [bigqueryProfile] ConnectionProfile bigqueryProfile + * @property {google.cloud.datastream.v1.IPostgresqlProfile|null} [postgresqlProfile] ConnectionProfile postgresqlProfile + * @property {google.cloud.datastream.v1.ISqlServerProfile|null} [sqlServerProfile] ConnectionProfile sqlServerProfile + * @property {google.cloud.datastream.v1.IStaticServiceIpConnectivity|null} [staticServiceIpConnectivity] ConnectionProfile staticServiceIpConnectivity + * @property {google.cloud.datastream.v1.IForwardSshTunnelConnectivity|null} [forwardSshConnectivity] ConnectionProfile forwardSshConnectivity + * @property {google.cloud.datastream.v1.IPrivateConnectivity|null} [privateConnectivity] ConnectionProfile privateConnectivity */ /** - * Constructs a new OracleSchema. + * Constructs a new ConnectionProfile. * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleSchema. - * @implements IOracleSchema + * @classdesc Represents a ConnectionProfile. + * @implements IConnectionProfile * @constructor - * @param {google.cloud.datastream.v1.IOracleSchema=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IConnectionProfile=} [properties] Properties to set */ - function OracleSchema(properties) { - this.oracleTables = []; + function ConnectionProfile(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15006,92 +15081,302 @@ } /** - * OracleSchema schema. - * @member {string} schema - * @memberof google.cloud.datastream.v1.OracleSchema + * ConnectionProfile name. + * @member {string} name + * @memberof google.cloud.datastream.v1.ConnectionProfile * @instance */ - OracleSchema.prototype.schema = ""; + ConnectionProfile.prototype.name = ""; /** - * OracleSchema oracleTables. - * @member {Array.} oracleTables - * @memberof google.cloud.datastream.v1.OracleSchema + * ConnectionProfile createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.datastream.v1.ConnectionProfile * @instance */ - OracleSchema.prototype.oracleTables = $util.emptyArray; + ConnectionProfile.prototype.createTime = null; /** - * Creates a new OracleSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {google.cloud.datastream.v1.IOracleSchema=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema instance + * ConnectionProfile updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance */ - OracleSchema.create = function create(properties) { - return new OracleSchema(properties); - }; + ConnectionProfile.prototype.updateTime = null; /** - * Encodes the specified OracleSchema message. Does not implicitly {@link google.cloud.datastream.v1.OracleSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {google.cloud.datastream.v1.IOracleSchema} message OracleSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSchema.encode = function encode(message, writer) { - if (!writer) + * ConnectionProfile labels. + * @member {Object.} labels + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.labels = $util.emptyObject; + + /** + * ConnectionProfile displayName. + * @member {string} displayName + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.displayName = ""; + + /** + * ConnectionProfile oracleProfile. + * @member {google.cloud.datastream.v1.IOracleProfile|null|undefined} oracleProfile + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.oracleProfile = null; + + /** + * ConnectionProfile gcsProfile. + * @member {google.cloud.datastream.v1.IGcsProfile|null|undefined} gcsProfile + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.gcsProfile = null; + + /** + * ConnectionProfile mysqlProfile. + * @member {google.cloud.datastream.v1.IMysqlProfile|null|undefined} mysqlProfile + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.mysqlProfile = null; + + /** + * ConnectionProfile bigqueryProfile. + * @member {google.cloud.datastream.v1.IBigQueryProfile|null|undefined} bigqueryProfile + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.bigqueryProfile = null; + + /** + * ConnectionProfile postgresqlProfile. + * @member {google.cloud.datastream.v1.IPostgresqlProfile|null|undefined} postgresqlProfile + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.postgresqlProfile = null; + + /** + * ConnectionProfile sqlServerProfile. + * @member {google.cloud.datastream.v1.ISqlServerProfile|null|undefined} sqlServerProfile + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.sqlServerProfile = null; + + /** + * ConnectionProfile staticServiceIpConnectivity. + * @member {google.cloud.datastream.v1.IStaticServiceIpConnectivity|null|undefined} staticServiceIpConnectivity + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.staticServiceIpConnectivity = null; + + /** + * ConnectionProfile forwardSshConnectivity. + * @member {google.cloud.datastream.v1.IForwardSshTunnelConnectivity|null|undefined} forwardSshConnectivity + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.forwardSshConnectivity = null; + + /** + * ConnectionProfile privateConnectivity. + * @member {google.cloud.datastream.v1.IPrivateConnectivity|null|undefined} privateConnectivity + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.privateConnectivity = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConnectionProfile profile. + * @member {"oracleProfile"|"gcsProfile"|"mysqlProfile"|"bigqueryProfile"|"postgresqlProfile"|"sqlServerProfile"|undefined} profile + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + Object.defineProperty(ConnectionProfile.prototype, "profile", { + get: $util.oneOfGetter($oneOfFields = ["oracleProfile", "gcsProfile", "mysqlProfile", "bigqueryProfile", "postgresqlProfile", "sqlServerProfile"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ConnectionProfile connectivity. + * @member {"staticServiceIpConnectivity"|"forwardSshConnectivity"|"privateConnectivity"|undefined} connectivity + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + */ + Object.defineProperty(ConnectionProfile.prototype, "connectivity", { + get: $util.oneOfGetter($oneOfFields = ["staticServiceIpConnectivity", "forwardSshConnectivity", "privateConnectivity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConnectionProfile instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @static + * @param {google.cloud.datastream.v1.IConnectionProfile=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile instance + */ + ConnectionProfile.create = function create(properties) { + return new ConnectionProfile(properties); + }; + + /** + * Encodes the specified ConnectionProfile message. Does not implicitly {@link google.cloud.datastream.v1.ConnectionProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @static + * @param {google.cloud.datastream.v1.IConnectionProfile} message ConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectionProfile.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.oracleTables != null && message.oracleTables.length) - for (var i = 0; i < message.oracleTables.length; ++i) - $root.google.cloud.datastream.v1.OracleTable.encode(message.oracleTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.oracleProfile != null && Object.hasOwnProperty.call(message, "oracleProfile")) + $root.google.cloud.datastream.v1.OracleProfile.encode(message.oracleProfile, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.gcsProfile != null && Object.hasOwnProperty.call(message, "gcsProfile")) + $root.google.cloud.datastream.v1.GcsProfile.encode(message.gcsProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.mysqlProfile != null && Object.hasOwnProperty.call(message, "mysqlProfile")) + $root.google.cloud.datastream.v1.MysqlProfile.encode(message.mysqlProfile, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.bigqueryProfile != null && Object.hasOwnProperty.call(message, "bigqueryProfile")) + $root.google.cloud.datastream.v1.BigQueryProfile.encode(message.bigqueryProfile, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.postgresqlProfile != null && Object.hasOwnProperty.call(message, "postgresqlProfile")) + $root.google.cloud.datastream.v1.PostgresqlProfile.encode(message.postgresqlProfile, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.sqlServerProfile != null && Object.hasOwnProperty.call(message, "sqlServerProfile")) + $root.google.cloud.datastream.v1.SqlServerProfile.encode(message.sqlServerProfile, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + if (message.staticServiceIpConnectivity != null && Object.hasOwnProperty.call(message, "staticServiceIpConnectivity")) + $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.encode(message.staticServiceIpConnectivity, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + if (message.forwardSshConnectivity != null && Object.hasOwnProperty.call(message, "forwardSshConnectivity")) + $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.encode(message.forwardSshConnectivity, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.privateConnectivity != null && Object.hasOwnProperty.call(message, "privateConnectivity")) + $root.google.cloud.datastream.v1.PrivateConnectivity.encode(message.privateConnectivity, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); return writer; }; /** - * Encodes the specified OracleSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSchema.verify|verify} messages. + * Encodes the specified ConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ConnectionProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSchema + * @memberof google.cloud.datastream.v1.ConnectionProfile * @static - * @param {google.cloud.datastream.v1.IOracleSchema} message OracleSchema message or plain object to encode + * @param {google.cloud.datastream.v1.IConnectionProfile} message ConnectionProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleSchema.encodeDelimited = function encodeDelimited(message, writer) { + ConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OracleSchema message from the specified reader or buffer. + * Decodes a ConnectionProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.OracleSchema + * @memberof google.cloud.datastream.v1.ConnectionProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema + * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleSchema.decode = function decode(reader, length) { + ConnectionProfile.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.datastream.v1.OracleSchema(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.ConnectionProfile(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.schema = reader.string(); + message.name = reader.string(); break; } case 2: { - if (!(message.oracleTables && message.oracleTables.length)) - message.oracleTables = []; - message.oracleTables.push($root.google.cloud.datastream.v1.OracleTable.decode(reader, reader.uint32())); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + 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 5: { + message.displayName = reader.string(); + break; + } + case 100: { + message.oracleProfile = $root.google.cloud.datastream.v1.OracleProfile.decode(reader, reader.uint32()); + break; + } + case 101: { + message.gcsProfile = $root.google.cloud.datastream.v1.GcsProfile.decode(reader, reader.uint32()); + break; + } + case 102: { + message.mysqlProfile = $root.google.cloud.datastream.v1.MysqlProfile.decode(reader, reader.uint32()); + break; + } + case 103: { + message.bigqueryProfile = $root.google.cloud.datastream.v1.BigQueryProfile.decode(reader, reader.uint32()); + break; + } + case 104: { + message.postgresqlProfile = $root.google.cloud.datastream.v1.PostgresqlProfile.decode(reader, reader.uint32()); + break; + } + case 105: { + message.sqlServerProfile = $root.google.cloud.datastream.v1.SqlServerProfile.decode(reader, reader.uint32()); + break; + } + case 200: { + message.staticServiceIpConnectivity = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.decode(reader, reader.uint32()); + break; + } + case 201: { + message.forwardSshConnectivity = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.decode(reader, reader.uint32()); + break; + } + case 202: { + message.privateConnectivity = $root.google.cloud.datastream.v1.PrivateConnectivity.decode(reader, reader.uint32()); break; } default: @@ -15103,149 +15388,365 @@ }; /** - * Decodes an OracleSchema message from the specified reader or buffer, length delimited. + * Decodes a ConnectionProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSchema + * @memberof google.cloud.datastream.v1.ConnectionProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema + * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleSchema.decodeDelimited = function decodeDelimited(reader) { + ConnectionProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OracleSchema message. + * Verifies a ConnectionProfile message. * @function verify - * @memberof google.cloud.datastream.v1.OracleSchema + * @memberof google.cloud.datastream.v1.ConnectionProfile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OracleSchema.verify = function verify(message) { + ConnectionProfile.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.oracleTables != null && message.hasOwnProperty("oracleTables")) { - if (!Array.isArray(message.oracleTables)) - return "oracleTables: array expected"; - for (var i = 0; i < message.oracleTables.length; ++i) { - var error = $root.google.cloud.datastream.v1.OracleTable.verify(message.oracleTables[i]); + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + 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.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.oracleProfile != null && message.hasOwnProperty("oracleProfile")) { + properties.profile = 1; + { + var error = $root.google.cloud.datastream.v1.OracleProfile.verify(message.oracleProfile); if (error) - return "oracleTables." + error; + return "oracleProfile." + error; + } + } + if (message.gcsProfile != null && message.hasOwnProperty("gcsProfile")) { + if (properties.profile === 1) + return "profile: multiple values"; + properties.profile = 1; + { + var error = $root.google.cloud.datastream.v1.GcsProfile.verify(message.gcsProfile); + if (error) + return "gcsProfile." + error; + } + } + if (message.mysqlProfile != null && message.hasOwnProperty("mysqlProfile")) { + if (properties.profile === 1) + return "profile: multiple values"; + properties.profile = 1; + { + var error = $root.google.cloud.datastream.v1.MysqlProfile.verify(message.mysqlProfile); + if (error) + return "mysqlProfile." + error; + } + } + if (message.bigqueryProfile != null && message.hasOwnProperty("bigqueryProfile")) { + if (properties.profile === 1) + return "profile: multiple values"; + properties.profile = 1; + { + var error = $root.google.cloud.datastream.v1.BigQueryProfile.verify(message.bigqueryProfile); + if (error) + return "bigqueryProfile." + error; + } + } + if (message.postgresqlProfile != null && message.hasOwnProperty("postgresqlProfile")) { + if (properties.profile === 1) + return "profile: multiple values"; + properties.profile = 1; + { + var error = $root.google.cloud.datastream.v1.PostgresqlProfile.verify(message.postgresqlProfile); + if (error) + return "postgresqlProfile." + error; + } + } + if (message.sqlServerProfile != null && message.hasOwnProperty("sqlServerProfile")) { + if (properties.profile === 1) + return "profile: multiple values"; + properties.profile = 1; + { + var error = $root.google.cloud.datastream.v1.SqlServerProfile.verify(message.sqlServerProfile); + if (error) + return "sqlServerProfile." + error; + } + } + if (message.staticServiceIpConnectivity != null && message.hasOwnProperty("staticServiceIpConnectivity")) { + properties.connectivity = 1; + { + var error = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.verify(message.staticServiceIpConnectivity); + if (error) + return "staticServiceIpConnectivity." + error; + } + } + if (message.forwardSshConnectivity != null && message.hasOwnProperty("forwardSshConnectivity")) { + if (properties.connectivity === 1) + return "connectivity: multiple values"; + properties.connectivity = 1; + { + var error = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.verify(message.forwardSshConnectivity); + if (error) + return "forwardSshConnectivity." + error; + } + } + if (message.privateConnectivity != null && message.hasOwnProperty("privateConnectivity")) { + if (properties.connectivity === 1) + return "connectivity: multiple values"; + properties.connectivity = 1; + { + var error = $root.google.cloud.datastream.v1.PrivateConnectivity.verify(message.privateConnectivity); + if (error) + return "privateConnectivity." + error; } } return null; }; /** - * Creates an OracleSchema message from a plain object. Also converts values to their respective internal types. + * Creates a ConnectionProfile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSchema + * @memberof google.cloud.datastream.v1.ConnectionProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema + * @returns {google.cloud.datastream.v1.ConnectionProfile} ConnectionProfile */ - OracleSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSchema) + ConnectionProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.ConnectionProfile) return object; - var message = new $root.google.cloud.datastream.v1.OracleSchema(); - if (object.schema != null) - message.schema = String(object.schema); - if (object.oracleTables) { - if (!Array.isArray(object.oracleTables)) - throw TypeError(".google.cloud.datastream.v1.OracleSchema.oracleTables: array expected"); - message.oracleTables = []; - for (var i = 0; i < object.oracleTables.length; ++i) { - if (typeof object.oracleTables[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSchema.oracleTables: object expected"); - message.oracleTables[i] = $root.google.cloud.datastream.v1.OracleTable.fromObject(object.oracleTables[i]); - } + var message = new $root.google.cloud.datastream.v1.ConnectionProfile(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.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.datastream.v1.ConnectionProfile.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.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]]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.oracleProfile != null) { + if (typeof object.oracleProfile !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.oracleProfile: object expected"); + message.oracleProfile = $root.google.cloud.datastream.v1.OracleProfile.fromObject(object.oracleProfile); + } + if (object.gcsProfile != null) { + if (typeof object.gcsProfile !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.gcsProfile: object expected"); + message.gcsProfile = $root.google.cloud.datastream.v1.GcsProfile.fromObject(object.gcsProfile); + } + if (object.mysqlProfile != null) { + if (typeof object.mysqlProfile !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.mysqlProfile: object expected"); + message.mysqlProfile = $root.google.cloud.datastream.v1.MysqlProfile.fromObject(object.mysqlProfile); + } + if (object.bigqueryProfile != null) { + if (typeof object.bigqueryProfile !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.bigqueryProfile: object expected"); + message.bigqueryProfile = $root.google.cloud.datastream.v1.BigQueryProfile.fromObject(object.bigqueryProfile); + } + if (object.postgresqlProfile != null) { + if (typeof object.postgresqlProfile !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.postgresqlProfile: object expected"); + message.postgresqlProfile = $root.google.cloud.datastream.v1.PostgresqlProfile.fromObject(object.postgresqlProfile); + } + if (object.sqlServerProfile != null) { + if (typeof object.sqlServerProfile !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.sqlServerProfile: object expected"); + message.sqlServerProfile = $root.google.cloud.datastream.v1.SqlServerProfile.fromObject(object.sqlServerProfile); + } + if (object.staticServiceIpConnectivity != null) { + if (typeof object.staticServiceIpConnectivity !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.staticServiceIpConnectivity: object expected"); + message.staticServiceIpConnectivity = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.fromObject(object.staticServiceIpConnectivity); + } + if (object.forwardSshConnectivity != null) { + if (typeof object.forwardSshConnectivity !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.forwardSshConnectivity: object expected"); + message.forwardSshConnectivity = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.fromObject(object.forwardSshConnectivity); + } + if (object.privateConnectivity != null) { + if (typeof object.privateConnectivity !== "object") + throw TypeError(".google.cloud.datastream.v1.ConnectionProfile.privateConnectivity: object expected"); + message.privateConnectivity = $root.google.cloud.datastream.v1.PrivateConnectivity.fromObject(object.privateConnectivity); } return message; }; /** - * Creates a plain object from an OracleSchema message. Also converts values to other types if specified. + * Creates a plain object from a ConnectionProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.OracleSchema + * @memberof google.cloud.datastream.v1.ConnectionProfile * @static - * @param {google.cloud.datastream.v1.OracleSchema} message OracleSchema + * @param {google.cloud.datastream.v1.ConnectionProfile} message ConnectionProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OracleSchema.toObject = function toObject(message, options) { + ConnectionProfile.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.oracleTables = []; - if (options.defaults) - object.schema = ""; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.oracleTables && message.oracleTables.length) { - object.oracleTables = []; - for (var j = 0; j < message.oracleTables.length; ++j) - object.oracleTables[j] = $root.google.cloud.datastream.v1.OracleTable.toObject(message.oracleTables[j], options); + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; } - return object; - }; - - /** - * Converts this OracleSchema to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSchema - * @instance - * @returns {Object.} JSON object - */ - OracleSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OracleSchema - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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); + 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.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.oracleProfile != null && message.hasOwnProperty("oracleProfile")) { + object.oracleProfile = $root.google.cloud.datastream.v1.OracleProfile.toObject(message.oracleProfile, options); + if (options.oneofs) + object.profile = "oracleProfile"; + } + if (message.gcsProfile != null && message.hasOwnProperty("gcsProfile")) { + object.gcsProfile = $root.google.cloud.datastream.v1.GcsProfile.toObject(message.gcsProfile, options); + if (options.oneofs) + object.profile = "gcsProfile"; + } + if (message.mysqlProfile != null && message.hasOwnProperty("mysqlProfile")) { + object.mysqlProfile = $root.google.cloud.datastream.v1.MysqlProfile.toObject(message.mysqlProfile, options); + if (options.oneofs) + object.profile = "mysqlProfile"; + } + if (message.bigqueryProfile != null && message.hasOwnProperty("bigqueryProfile")) { + object.bigqueryProfile = $root.google.cloud.datastream.v1.BigQueryProfile.toObject(message.bigqueryProfile, options); + if (options.oneofs) + object.profile = "bigqueryProfile"; + } + if (message.postgresqlProfile != null && message.hasOwnProperty("postgresqlProfile")) { + object.postgresqlProfile = $root.google.cloud.datastream.v1.PostgresqlProfile.toObject(message.postgresqlProfile, options); + if (options.oneofs) + object.profile = "postgresqlProfile"; + } + if (message.sqlServerProfile != null && message.hasOwnProperty("sqlServerProfile")) { + object.sqlServerProfile = $root.google.cloud.datastream.v1.SqlServerProfile.toObject(message.sqlServerProfile, options); + if (options.oneofs) + object.profile = "sqlServerProfile"; + } + if (message.staticServiceIpConnectivity != null && message.hasOwnProperty("staticServiceIpConnectivity")) { + object.staticServiceIpConnectivity = $root.google.cloud.datastream.v1.StaticServiceIpConnectivity.toObject(message.staticServiceIpConnectivity, options); + if (options.oneofs) + object.connectivity = "staticServiceIpConnectivity"; + } + if (message.forwardSshConnectivity != null && message.hasOwnProperty("forwardSshConnectivity")) { + object.forwardSshConnectivity = $root.google.cloud.datastream.v1.ForwardSshTunnelConnectivity.toObject(message.forwardSshConnectivity, options); + if (options.oneofs) + object.connectivity = "forwardSshConnectivity"; + } + if (message.privateConnectivity != null && message.hasOwnProperty("privateConnectivity")) { + object.privateConnectivity = $root.google.cloud.datastream.v1.PrivateConnectivity.toObject(message.privateConnectivity, options); + if (options.oneofs) + object.connectivity = "privateConnectivity"; + } + return object; + }; + + /** + * Converts this ConnectionProfile to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @instance + * @returns {Object.} JSON object + */ + ConnectionProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectionProfile + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.ConnectionProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSchema"; + return typeUrlPrefix + "/google.cloud.datastream.v1.ConnectionProfile"; }; - return OracleSchema; + return ConnectionProfile; })(); - v1.OracleRdbms = (function() { + v1.OracleColumn = (function() { /** - * Properties of an OracleRdbms. + * Properties of an OracleColumn. * @memberof google.cloud.datastream.v1 - * @interface IOracleRdbms - * @property {Array.|null} [oracleSchemas] OracleRdbms oracleSchemas + * @interface IOracleColumn + * @property {string|null} [column] OracleColumn column + * @property {string|null} [dataType] OracleColumn dataType + * @property {number|null} [length] OracleColumn length + * @property {number|null} [precision] OracleColumn precision + * @property {number|null} [scale] OracleColumn scale + * @property {string|null} [encoding] OracleColumn encoding + * @property {boolean|null} [primaryKey] OracleColumn primaryKey + * @property {boolean|null} [nullable] OracleColumn nullable + * @property {number|null} [ordinalPosition] OracleColumn ordinalPosition */ /** - * Constructs a new OracleRdbms. + * Constructs a new OracleColumn. * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleRdbms. - * @implements IOracleRdbms + * @classdesc Represents an OracleColumn. + * @implements IOracleColumn * @constructor - * @param {google.cloud.datastream.v1.IOracleRdbms=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IOracleColumn=} [properties] Properties to set */ - function OracleRdbms(properties) { - this.oracleSchemas = []; + function OracleColumn(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15253,227 +15754,381 @@ } /** - * OracleRdbms oracleSchemas. - * @member {Array.} oracleSchemas - * @memberof google.cloud.datastream.v1.OracleRdbms + * OracleColumn column. + * @member {string} column + * @memberof google.cloud.datastream.v1.OracleColumn * @instance */ - OracleRdbms.prototype.oracleSchemas = $util.emptyArray; + OracleColumn.prototype.column = ""; /** - * Creates a new OracleRdbms instance using the specified properties. + * OracleColumn dataType. + * @member {string} dataType + * @memberof google.cloud.datastream.v1.OracleColumn + * @instance + */ + OracleColumn.prototype.dataType = ""; + + /** + * OracleColumn length. + * @member {number} length + * @memberof google.cloud.datastream.v1.OracleColumn + * @instance + */ + OracleColumn.prototype.length = 0; + + /** + * OracleColumn precision. + * @member {number} precision + * @memberof google.cloud.datastream.v1.OracleColumn + * @instance + */ + OracleColumn.prototype.precision = 0; + + /** + * OracleColumn scale. + * @member {number} scale + * @memberof google.cloud.datastream.v1.OracleColumn + * @instance + */ + OracleColumn.prototype.scale = 0; + + /** + * OracleColumn encoding. + * @member {string} encoding + * @memberof google.cloud.datastream.v1.OracleColumn + * @instance + */ + OracleColumn.prototype.encoding = ""; + + /** + * OracleColumn primaryKey. + * @member {boolean} primaryKey + * @memberof google.cloud.datastream.v1.OracleColumn + * @instance + */ + OracleColumn.prototype.primaryKey = false; + + /** + * OracleColumn nullable. + * @member {boolean} nullable + * @memberof google.cloud.datastream.v1.OracleColumn + * @instance + */ + OracleColumn.prototype.nullable = false; + + /** + * OracleColumn ordinalPosition. + * @member {number} ordinalPosition + * @memberof google.cloud.datastream.v1.OracleColumn + * @instance + */ + OracleColumn.prototype.ordinalPosition = 0; + + /** + * Creates a new OracleColumn instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.OracleRdbms + * @memberof google.cloud.datastream.v1.OracleColumn * @static - * @param {google.cloud.datastream.v1.IOracleRdbms=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms instance + * @param {google.cloud.datastream.v1.IOracleColumn=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn instance */ - OracleRdbms.create = function create(properties) { - return new OracleRdbms(properties); + OracleColumn.create = function create(properties) { + return new OracleColumn(properties); }; /** - * Encodes the specified OracleRdbms message. Does not implicitly {@link google.cloud.datastream.v1.OracleRdbms.verify|verify} messages. + * Encodes the specified OracleColumn message. Does not implicitly {@link google.cloud.datastream.v1.OracleColumn.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.OracleRdbms + * @memberof google.cloud.datastream.v1.OracleColumn * @static - * @param {google.cloud.datastream.v1.IOracleRdbms} message OracleRdbms message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleColumn} message OracleColumn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleRdbms.encode = function encode(message, writer) { + OracleColumn.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.oracleSchemas != null && message.oracleSchemas.length) - for (var i = 0; i < message.oracleSchemas.length; ++i) - $root.google.cloud.datastream.v1.OracleSchema.encode(message.oracleSchemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); + if (message.length != null && Object.hasOwnProperty.call(message, "length")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); + if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.precision); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scale); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.encoding); + if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.primaryKey); + if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.nullable); + if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ordinalPosition); return writer; }; /** - * Encodes the specified OracleRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleRdbms.verify|verify} messages. + * Encodes the specified OracleColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleColumn.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleRdbms + * @memberof google.cloud.datastream.v1.OracleColumn * @static - * @param {google.cloud.datastream.v1.IOracleRdbms} message OracleRdbms message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleColumn} message OracleColumn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleRdbms.encodeDelimited = function encodeDelimited(message, writer) { + OracleColumn.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OracleRdbms message from the specified reader or buffer. + * Decodes an OracleColumn message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.OracleRdbms + * @memberof google.cloud.datastream.v1.OracleColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms + * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleRdbms.decode = function decode(reader, length) { + OracleColumn.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.datastream.v1.OracleRdbms(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleColumn(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.oracleSchemas && message.oracleSchemas.length)) - message.oracleSchemas = []; - message.oracleSchemas.push($root.google.cloud.datastream.v1.OracleSchema.decode(reader, reader.uint32())); + message.column = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OracleRdbms message from the specified reader or buffer, length delimited. + case 2: { + message.dataType = reader.string(); + break; + } + case 3: { + message.length = reader.int32(); + break; + } + case 4: { + message.precision = reader.int32(); + break; + } + case 5: { + message.scale = reader.int32(); + break; + } + case 6: { + message.encoding = reader.string(); + break; + } + case 7: { + message.primaryKey = reader.bool(); + break; + } + case 8: { + message.nullable = reader.bool(); + break; + } + case 9: { + message.ordinalPosition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OracleColumn message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleRdbms + * @memberof google.cloud.datastream.v1.OracleColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms + * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleRdbms.decodeDelimited = function decodeDelimited(reader) { + OracleColumn.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OracleRdbms message. + * Verifies an OracleColumn message. * @function verify - * @memberof google.cloud.datastream.v1.OracleRdbms + * @memberof google.cloud.datastream.v1.OracleColumn * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OracleRdbms.verify = function verify(message) { + OracleColumn.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.oracleSchemas != null && message.hasOwnProperty("oracleSchemas")) { - if (!Array.isArray(message.oracleSchemas)) - return "oracleSchemas: array expected"; - for (var i = 0; i < message.oracleSchemas.length; ++i) { - var error = $root.google.cloud.datastream.v1.OracleSchema.verify(message.oracleSchemas[i]); - if (error) - return "oracleSchemas." + error; - } - } + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.dataType != null && message.hasOwnProperty("dataType")) + if (!$util.isString(message.dataType)) + return "dataType: string expected"; + if (message.length != null && message.hasOwnProperty("length")) + if (!$util.isInteger(message.length)) + return "length: integer expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (!$util.isInteger(message.precision)) + return "precision: integer expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (!$util.isInteger(message.scale)) + return "scale: integer expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) + if (typeof message.primaryKey !== "boolean") + return "primaryKey: boolean expected"; + if (message.nullable != null && message.hasOwnProperty("nullable")) + if (typeof message.nullable !== "boolean") + return "nullable: boolean expected"; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + if (!$util.isInteger(message.ordinalPosition)) + return "ordinalPosition: integer expected"; return null; }; /** - * Creates an OracleRdbms message from a plain object. Also converts values to their respective internal types. + * Creates an OracleColumn message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.OracleRdbms + * @memberof google.cloud.datastream.v1.OracleColumn * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms + * @returns {google.cloud.datastream.v1.OracleColumn} OracleColumn */ - OracleRdbms.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleRdbms) + OracleColumn.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleColumn) return object; - var message = new $root.google.cloud.datastream.v1.OracleRdbms(); - if (object.oracleSchemas) { - if (!Array.isArray(object.oracleSchemas)) - throw TypeError(".google.cloud.datastream.v1.OracleRdbms.oracleSchemas: array expected"); - message.oracleSchemas = []; - for (var i = 0; i < object.oracleSchemas.length; ++i) { - if (typeof object.oracleSchemas[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleRdbms.oracleSchemas: object expected"); - message.oracleSchemas[i] = $root.google.cloud.datastream.v1.OracleSchema.fromObject(object.oracleSchemas[i]); - } - } + var message = new $root.google.cloud.datastream.v1.OracleColumn(); + if (object.column != null) + message.column = String(object.column); + if (object.dataType != null) + message.dataType = String(object.dataType); + if (object.length != null) + message.length = object.length | 0; + if (object.precision != null) + message.precision = object.precision | 0; + if (object.scale != null) + message.scale = object.scale | 0; + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.primaryKey != null) + message.primaryKey = Boolean(object.primaryKey); + if (object.nullable != null) + message.nullable = Boolean(object.nullable); + if (object.ordinalPosition != null) + message.ordinalPosition = object.ordinalPosition | 0; return message; }; /** - * Creates a plain object from an OracleRdbms message. Also converts values to other types if specified. + * Creates a plain object from an OracleColumn message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.OracleRdbms + * @memberof google.cloud.datastream.v1.OracleColumn * @static - * @param {google.cloud.datastream.v1.OracleRdbms} message OracleRdbms + * @param {google.cloud.datastream.v1.OracleColumn} message OracleColumn * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OracleRdbms.toObject = function toObject(message, options) { + OracleColumn.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.oracleSchemas = []; - if (message.oracleSchemas && message.oracleSchemas.length) { - object.oracleSchemas = []; - for (var j = 0; j < message.oracleSchemas.length; ++j) - object.oracleSchemas[j] = $root.google.cloud.datastream.v1.OracleSchema.toObject(message.oracleSchemas[j], options); + if (options.defaults) { + object.column = ""; + object.dataType = ""; + object.length = 0; + object.precision = 0; + object.scale = 0; + object.encoding = ""; + object.primaryKey = false; + object.nullable = false; + object.ordinalPosition = 0; } + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.dataType != null && message.hasOwnProperty("dataType")) + object.dataType = message.dataType; + if (message.length != null && message.hasOwnProperty("length")) + object.length = message.length; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = message.precision; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = message.scale; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) + object.primaryKey = message.primaryKey; + if (message.nullable != null && message.hasOwnProperty("nullable")) + object.nullable = message.nullable; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + object.ordinalPosition = message.ordinalPosition; return object; }; /** - * Converts this OracleRdbms to JSON. + * Converts this OracleColumn to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.OracleRdbms + * @memberof google.cloud.datastream.v1.OracleColumn * @instance * @returns {Object.} JSON object */ - OracleRdbms.prototype.toJSON = function toJSON() { + OracleColumn.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OracleRdbms + * Gets the default type url for OracleColumn * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleRdbms + * @memberof google.cloud.datastream.v1.OracleColumn * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OracleRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OracleColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleRdbms"; + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleColumn"; }; - return OracleRdbms; + return OracleColumn; })(); - v1.OracleSourceConfig = (function() { + v1.OracleTable = (function() { /** - * Properties of an OracleSourceConfig. + * Properties of an OracleTable. * @memberof google.cloud.datastream.v1 - * @interface IOracleSourceConfig - * @property {google.cloud.datastream.v1.IOracleRdbms|null} [includeObjects] OracleSourceConfig includeObjects - * @property {google.cloud.datastream.v1.IOracleRdbms|null} [excludeObjects] OracleSourceConfig excludeObjects - * @property {number|null} [maxConcurrentCdcTasks] OracleSourceConfig maxConcurrentCdcTasks - * @property {number|null} [maxConcurrentBackfillTasks] OracleSourceConfig maxConcurrentBackfillTasks - * @property {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null} [dropLargeObjects] OracleSourceConfig dropLargeObjects - * @property {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null} [streamLargeObjects] OracleSourceConfig streamLargeObjects + * @interface IOracleTable + * @property {string|null} [table] OracleTable table + * @property {Array.|null} [oracleColumns] OracleTable oracleColumns */ /** - * Constructs a new OracleSourceConfig. + * Constructs a new OracleTable. * @memberof google.cloud.datastream.v1 - * @classdesc Represents an OracleSourceConfig. - * @implements IOracleSourceConfig + * @classdesc Represents an OracleTable. + * @implements IOracleTable * @constructor - * @param {google.cloud.datastream.v1.IOracleSourceConfig=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IOracleTable=} [properties] Properties to set */ - function OracleSourceConfig(properties) { + function OracleTable(properties) { + this.oracleColumns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15481,159 +16136,92 @@ } /** - * OracleSourceConfig includeObjects. - * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} includeObjects - * @memberof google.cloud.datastream.v1.OracleSourceConfig + * OracleTable table. + * @member {string} table + * @memberof google.cloud.datastream.v1.OracleTable * @instance */ - OracleSourceConfig.prototype.includeObjects = null; + OracleTable.prototype.table = ""; /** - * OracleSourceConfig excludeObjects. - * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} excludeObjects - * @memberof google.cloud.datastream.v1.OracleSourceConfig + * OracleTable oracleColumns. + * @member {Array.} oracleColumns + * @memberof google.cloud.datastream.v1.OracleTable * @instance */ - OracleSourceConfig.prototype.excludeObjects = null; + OracleTable.prototype.oracleColumns = $util.emptyArray; /** - * OracleSourceConfig maxConcurrentCdcTasks. - * @member {number} maxConcurrentCdcTasks - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance + * Creates a new OracleTable instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.OracleTable + * @static + * @param {google.cloud.datastream.v1.IOracleTable=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleTable} OracleTable instance */ - OracleSourceConfig.prototype.maxConcurrentCdcTasks = 0; + OracleTable.create = function create(properties) { + return new OracleTable(properties); + }; /** - * OracleSourceConfig maxConcurrentBackfillTasks. - * @member {number} maxConcurrentBackfillTasks - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance + * Encodes the specified OracleTable message. Does not implicitly {@link google.cloud.datastream.v1.OracleTable.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.OracleTable + * @static + * @param {google.cloud.datastream.v1.IOracleTable} message OracleTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - OracleSourceConfig.prototype.maxConcurrentBackfillTasks = 0; - - /** - * OracleSourceConfig dropLargeObjects. - * @member {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null|undefined} dropLargeObjects - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.dropLargeObjects = null; - - /** - * OracleSourceConfig streamLargeObjects. - * @member {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null|undefined} streamLargeObjects - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - OracleSourceConfig.prototype.streamLargeObjects = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * OracleSourceConfig largeObjectsHandling. - * @member {"dropLargeObjects"|"streamLargeObjects"|undefined} largeObjectsHandling - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @instance - */ - Object.defineProperty(OracleSourceConfig.prototype, "largeObjectsHandling", { - get: $util.oneOfGetter($oneOfFields = ["dropLargeObjects", "streamLargeObjects"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new OracleSourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {google.cloud.datastream.v1.IOracleSourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig instance - */ - OracleSourceConfig.create = function create(properties) { - return new OracleSourceConfig(properties); - }; - - /** - * Encodes the specified OracleSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @static - * @param {google.cloud.datastream.v1.IOracleSourceConfig} message OracleSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleSourceConfig.encode = function encode(message, writer) { + OracleTable.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) - $root.google.cloud.datastream.v1.OracleRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) - $root.google.cloud.datastream.v1.OracleRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.maxConcurrentCdcTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentCdcTasks")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxConcurrentCdcTasks); - if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConcurrentBackfillTasks); - if (message.dropLargeObjects != null && Object.hasOwnProperty.call(message, "dropLargeObjects")) - $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.encode(message.dropLargeObjects, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.streamLargeObjects != null && Object.hasOwnProperty.call(message, "streamLargeObjects")) - $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.encode(message.streamLargeObjects, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.oracleColumns != null && message.oracleColumns.length) + for (var i = 0; i < message.oracleColumns.length; ++i) + $root.google.cloud.datastream.v1.OracleColumn.encode(message.oracleColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified OracleSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.verify|verify} messages. + * Encodes the specified OracleTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleTable.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @memberof google.cloud.datastream.v1.OracleTable * @static - * @param {google.cloud.datastream.v1.IOracleSourceConfig} message OracleSourceConfig message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleTable} message OracleTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { + OracleTable.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OracleSourceConfig message from the specified reader or buffer. + * Decodes an OracleTable message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @memberof google.cloud.datastream.v1.OracleTable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig + * @returns {google.cloud.datastream.v1.OracleTable} OracleTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleSourceConfig.decode = function decode(reader, length) { + OracleTable.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.datastream.v1.OracleSourceConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleTable(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.includeObjects = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); + message.table = reader.string(); break; } case 2: { - message.excludeObjects = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); - break; - } - case 3: { - message.maxConcurrentCdcTasks = reader.int32(); - break; - } - case 4: { - message.maxConcurrentBackfillTasks = reader.int32(); - break; - } - case 100: { - message.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.decode(reader, reader.uint32()); - break; - } - case 102: { - message.streamLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.decode(reader, reader.uint32()); + if (!(message.oracleColumns && message.oracleColumns.length)) + message.oracleColumns = []; + message.oracleColumns.push($root.google.cloud.datastream.v1.OracleColumn.decode(reader, reader.uint32())); break; } default: @@ -15645,727 +16233,476 @@ }; /** - * Decodes an OracleSourceConfig message from the specified reader or buffer, length delimited. + * Decodes an OracleTable message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @memberof google.cloud.datastream.v1.OracleTable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig + * @returns {google.cloud.datastream.v1.OracleTable} OracleTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleSourceConfig.decodeDelimited = function decodeDelimited(reader) { + OracleTable.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OracleSourceConfig message. + * Verifies an OracleTable message. * @function verify - * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @memberof google.cloud.datastream.v1.OracleTable * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OracleSourceConfig.verify = function verify(message) { + OracleTable.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { - var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.includeObjects); - if (error) - return "includeObjects." + error; - } - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { - var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.excludeObjects); - if (error) - return "excludeObjects." + error; - } - if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) - if (!$util.isInteger(message.maxConcurrentCdcTasks)) - return "maxConcurrentCdcTasks: integer expected"; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - if (!$util.isInteger(message.maxConcurrentBackfillTasks)) - return "maxConcurrentBackfillTasks: integer expected"; - if (message.dropLargeObjects != null && message.hasOwnProperty("dropLargeObjects")) { - properties.largeObjectsHandling = 1; - { - var error = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify(message.dropLargeObjects); - if (error) - return "dropLargeObjects." + error; - } - } - if (message.streamLargeObjects != null && message.hasOwnProperty("streamLargeObjects")) { - if (properties.largeObjectsHandling === 1) - return "largeObjectsHandling: multiple values"; - properties.largeObjectsHandling = 1; - { - var error = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify(message.streamLargeObjects); + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.oracleColumns != null && message.hasOwnProperty("oracleColumns")) { + if (!Array.isArray(message.oracleColumns)) + return "oracleColumns: array expected"; + for (var i = 0; i < message.oracleColumns.length; ++i) { + var error = $root.google.cloud.datastream.v1.OracleColumn.verify(message.oracleColumns[i]); if (error) - return "streamLargeObjects." + error; + return "oracleColumns." + error; } } return null; }; /** - * Creates an OracleSourceConfig message from a plain object. Also converts values to their respective internal types. + * Creates an OracleTable message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @memberof google.cloud.datastream.v1.OracleTable * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig + * @returns {google.cloud.datastream.v1.OracleTable} OracleTable */ - OracleSourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig) + OracleTable.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleTable) return object; - var message = new $root.google.cloud.datastream.v1.OracleSourceConfig(); - if (object.includeObjects != null) { - if (typeof object.includeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.includeObjects: object expected"); - message.includeObjects = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.includeObjects); - } - if (object.excludeObjects != null) { - if (typeof object.excludeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.excludeObjects: object expected"); - message.excludeObjects = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.excludeObjects); - } - if (object.maxConcurrentCdcTasks != null) - message.maxConcurrentCdcTasks = object.maxConcurrentCdcTasks | 0; - if (object.maxConcurrentBackfillTasks != null) - message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; - if (object.dropLargeObjects != null) { - if (typeof object.dropLargeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.dropLargeObjects: object expected"); - message.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.fromObject(object.dropLargeObjects); - } - if (object.streamLargeObjects != null) { - if (typeof object.streamLargeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.streamLargeObjects: object expected"); - message.streamLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.fromObject(object.streamLargeObjects); + var message = new $root.google.cloud.datastream.v1.OracleTable(); + if (object.table != null) + message.table = String(object.table); + if (object.oracleColumns) { + if (!Array.isArray(object.oracleColumns)) + throw TypeError(".google.cloud.datastream.v1.OracleTable.oracleColumns: array expected"); + message.oracleColumns = []; + for (var i = 0; i < object.oracleColumns.length; ++i) { + if (typeof object.oracleColumns[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleTable.oracleColumns: object expected"); + message.oracleColumns[i] = $root.google.cloud.datastream.v1.OracleColumn.fromObject(object.oracleColumns[i]); + } } return message; }; /** - * Creates a plain object from an OracleSourceConfig message. Also converts values to other types if specified. + * Creates a plain object from an OracleTable message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @memberof google.cloud.datastream.v1.OracleTable * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig} message OracleSourceConfig + * @param {google.cloud.datastream.v1.OracleTable} message OracleTable * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OracleSourceConfig.toObject = function toObject(message, options) { + OracleTable.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.includeObjects = null; - object.excludeObjects = null; - object.maxConcurrentCdcTasks = 0; - object.maxConcurrentBackfillTasks = 0; - } - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) - object.includeObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.includeObjects, options); - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) - object.excludeObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.excludeObjects, options); - if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) - object.maxConcurrentCdcTasks = message.maxConcurrentCdcTasks; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; - if (message.dropLargeObjects != null && message.hasOwnProperty("dropLargeObjects")) { - object.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.toObject(message.dropLargeObjects, options); - if (options.oneofs) - object.largeObjectsHandling = "dropLargeObjects"; - } - if (message.streamLargeObjects != null && message.hasOwnProperty("streamLargeObjects")) { - object.streamLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.toObject(message.streamLargeObjects, options); - if (options.oneofs) - object.largeObjectsHandling = "streamLargeObjects"; + if (options.arrays || options.defaults) + object.oracleColumns = []; + if (options.defaults) + object.table = ""; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.oracleColumns && message.oracleColumns.length) { + object.oracleColumns = []; + for (var j = 0; j < message.oracleColumns.length; ++j) + object.oracleColumns[j] = $root.google.cloud.datastream.v1.OracleColumn.toObject(message.oracleColumns[j], options); } return object; }; /** - * Converts this OracleSourceConfig to JSON. + * Converts this OracleTable to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @memberof google.cloud.datastream.v1.OracleTable * @instance * @returns {Object.} JSON object */ - OracleSourceConfig.prototype.toJSON = function toJSON() { + OracleTable.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OracleSourceConfig + * Gets the default type url for OracleTable * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @memberof google.cloud.datastream.v1.OracleTable * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OracleSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OracleTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig"; + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleTable"; }; - OracleSourceConfig.DropLargeObjects = (function() { + return OracleTable; + })(); - /** - * Properties of a DropLargeObjects. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @interface IDropLargeObjects - */ + v1.OracleSchema = (function() { - /** - * Constructs a new DropLargeObjects. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @classdesc Represents a DropLargeObjects. - * @implements IDropLargeObjects - * @constructor - * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects=} [properties] Properties to set - */ - function DropLargeObjects(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an OracleSchema. + * @memberof google.cloud.datastream.v1 + * @interface IOracleSchema + * @property {string|null} [schema] OracleSchema schema + * @property {Array.|null} [oracleTables] OracleSchema oracleTables + */ - /** - * Creates a new DropLargeObjects instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects instance - */ - DropLargeObjects.create = function create(properties) { - return new DropLargeObjects(properties); - }; + /** + * Constructs a new OracleSchema. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents an OracleSchema. + * @implements IOracleSchema + * @constructor + * @param {google.cloud.datastream.v1.IOracleSchema=} [properties] Properties to set + */ + function OracleSchema(properties) { + this.oracleTables = []; + 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 DropLargeObjects message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects} message DropLargeObjects message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropLargeObjects.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * OracleSchema schema. + * @member {string} schema + * @memberof google.cloud.datastream.v1.OracleSchema + * @instance + */ + OracleSchema.prototype.schema = ""; - /** - * Encodes the specified DropLargeObjects message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects} message DropLargeObjects message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropLargeObjects.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * OracleSchema oracleTables. + * @member {Array.} oracleTables + * @memberof google.cloud.datastream.v1.OracleSchema + * @instance + */ + OracleSchema.prototype.oracleTables = $util.emptyArray; - /** - * Decodes a DropLargeObjects message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropLargeObjects.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.datastream.v1.OracleSourceConfig.DropLargeObjects(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + /** + * Creates a new OracleSchema instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.OracleSchema + * @static + * @param {google.cloud.datastream.v1.IOracleSchema=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema instance + */ + OracleSchema.create = function create(properties) { + return new OracleSchema(properties); + }; + + /** + * Encodes the specified OracleSchema message. Does not implicitly {@link google.cloud.datastream.v1.OracleSchema.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.OracleSchema + * @static + * @param {google.cloud.datastream.v1.IOracleSchema} message OracleSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OracleSchema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); + if (message.oracleTables != null && message.oracleTables.length) + for (var i = 0; i < message.oracleTables.length; ++i) + $root.google.cloud.datastream.v1.OracleTable.encode(message.oracleTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OracleSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.OracleSchema + * @static + * @param {google.cloud.datastream.v1.IOracleSchema} message OracleSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OracleSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OracleSchema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.OracleSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OracleSchema.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.datastream.v1.OracleSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.schema = reader.string(); + break; + } + case 2: { + if (!(message.oracleTables && message.oracleTables.length)) + message.oracleTables = []; + message.oracleTables.push($root.google.cloud.datastream.v1.OracleTable.decode(reader, reader.uint32())); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a DropLargeObjects message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropLargeObjects.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a DropLargeObjects message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DropLargeObjects.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Decodes an OracleSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.OracleSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OracleSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a DropLargeObjects message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects - */ - DropLargeObjects.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects) - return object; - return new $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects(); - }; - - /** - * Creates a plain object from a DropLargeObjects message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} message DropLargeObjects - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DropLargeObjects.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DropLargeObjects to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @instance - * @returns {Object.} JSON object - */ - DropLargeObjects.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DropLargeObjects - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DropLargeObjects.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Verifies an OracleSchema message. + * @function verify + * @memberof google.cloud.datastream.v1.OracleSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OracleSchema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.oracleTables != null && message.hasOwnProperty("oracleTables")) { + if (!Array.isArray(message.oracleTables)) + return "oracleTables: array expected"; + for (var i = 0; i < message.oracleTables.length; ++i) { + var error = $root.google.cloud.datastream.v1.OracleTable.verify(message.oracleTables[i]); + if (error) + return "oracleTables." + error; } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects"; - }; + } + return null; + }; - return DropLargeObjects; - })(); + /** + * Creates an OracleSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.OracleSchema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.OracleSchema} OracleSchema + */ + OracleSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleSchema) + return object; + var message = new $root.google.cloud.datastream.v1.OracleSchema(); + if (object.schema != null) + message.schema = String(object.schema); + if (object.oracleTables) { + if (!Array.isArray(object.oracleTables)) + throw TypeError(".google.cloud.datastream.v1.OracleSchema.oracleTables: array expected"); + message.oracleTables = []; + for (var i = 0; i < object.oracleTables.length; ++i) { + if (typeof object.oracleTables[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleSchema.oracleTables: object expected"); + message.oracleTables[i] = $root.google.cloud.datastream.v1.OracleTable.fromObject(object.oracleTables[i]); + } + } + return message; + }; - OracleSourceConfig.StreamLargeObjects = (function() { + /** + * Creates a plain object from an OracleSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.OracleSchema + * @static + * @param {google.cloud.datastream.v1.OracleSchema} message OracleSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OracleSchema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.oracleTables = []; + if (options.defaults) + object.schema = ""; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.oracleTables && message.oracleTables.length) { + object.oracleTables = []; + for (var j = 0; j < message.oracleTables.length; ++j) + object.oracleTables[j] = $root.google.cloud.datastream.v1.OracleTable.toObject(message.oracleTables[j], options); + } + return object; + }; - /** - * Properties of a StreamLargeObjects. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @interface IStreamLargeObjects - */ + /** + * Converts this OracleSchema to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.OracleSchema + * @instance + * @returns {Object.} JSON object + */ + OracleSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new StreamLargeObjects. - * @memberof google.cloud.datastream.v1.OracleSourceConfig - * @classdesc Represents a StreamLargeObjects. - * @implements IStreamLargeObjects - * @constructor - * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects=} [properties] Properties to set - */ - function StreamLargeObjects(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]]; + /** + * Gets the default type url for OracleSchema + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.OracleSchema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OracleSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSchema"; + }; - /** - * Creates a new StreamLargeObjects instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects instance - */ - StreamLargeObjects.create = function create(properties) { - return new StreamLargeObjects(properties); - }; + return OracleSchema; + })(); - /** - * Encodes the specified StreamLargeObjects message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects} message StreamLargeObjects message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamLargeObjects.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + v1.OracleRdbms = (function() { - /** - * Encodes the specified StreamLargeObjects message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects} message StreamLargeObjects message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamLargeObjects.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an OracleRdbms. + * @memberof google.cloud.datastream.v1 + * @interface IOracleRdbms + * @property {Array.|null} [oracleSchemas] OracleRdbms oracleSchemas + */ - /** - * Decodes a StreamLargeObjects message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamLargeObjects.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.datastream.v1.OracleSourceConfig.StreamLargeObjects(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StreamLargeObjects message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamLargeObjects.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamLargeObjects message. - * @function verify - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamLargeObjects.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a StreamLargeObjects message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects - */ - StreamLargeObjects.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects) - return object; - return new $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects(); - }; - - /** - * Creates a plain object from a StreamLargeObjects message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} message StreamLargeObjects - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamLargeObjects.toObject = function toObject() { - return {}; - }; - - /** - * Converts this StreamLargeObjects to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @instance - * @returns {Object.} JSON object - */ - StreamLargeObjects.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StreamLargeObjects - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StreamLargeObjects.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects"; - }; - - return StreamLargeObjects; - })(); - - return OracleSourceConfig; - })(); - - v1.PostgresqlColumn = (function() { - - /** - * Properties of a PostgresqlColumn. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlColumn - * @property {string|null} [column] PostgresqlColumn column - * @property {string|null} [dataType] PostgresqlColumn dataType - * @property {number|null} [length] PostgresqlColumn length - * @property {number|null} [precision] PostgresqlColumn precision - * @property {number|null} [scale] PostgresqlColumn scale - * @property {boolean|null} [primaryKey] PostgresqlColumn primaryKey - * @property {boolean|null} [nullable] PostgresqlColumn nullable - * @property {number|null} [ordinalPosition] PostgresqlColumn ordinalPosition - */ - - /** - * Constructs a new PostgresqlColumn. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlColumn. - * @implements IPostgresqlColumn - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlColumn=} [properties] Properties to set - */ - function PostgresqlColumn(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]]; - } - - /** - * PostgresqlColumn column. - * @member {string} column - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.column = ""; - - /** - * PostgresqlColumn dataType. - * @member {string} dataType - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.dataType = ""; - - /** - * PostgresqlColumn length. - * @member {number} length - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.length = 0; - - /** - * PostgresqlColumn precision. - * @member {number} precision - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.precision = 0; - - /** - * PostgresqlColumn scale. - * @member {number} scale - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.scale = 0; - - /** - * PostgresqlColumn primaryKey. - * @member {boolean} primaryKey - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.primaryKey = false; - - /** - * PostgresqlColumn nullable. - * @member {boolean} nullable - * @memberof google.cloud.datastream.v1.PostgresqlColumn - * @instance - */ - PostgresqlColumn.prototype.nullable = false; + /** + * Constructs a new OracleRdbms. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents an OracleRdbms. + * @implements IOracleRdbms + * @constructor + * @param {google.cloud.datastream.v1.IOracleRdbms=} [properties] Properties to set + */ + function OracleRdbms(properties) { + this.oracleSchemas = []; + 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]]; + } /** - * PostgresqlColumn ordinalPosition. - * @member {number} ordinalPosition - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * OracleRdbms oracleSchemas. + * @member {Array.} oracleSchemas + * @memberof google.cloud.datastream.v1.OracleRdbms * @instance */ - PostgresqlColumn.prototype.ordinalPosition = 0; + OracleRdbms.prototype.oracleSchemas = $util.emptyArray; /** - * Creates a new PostgresqlColumn instance using the specified properties. + * Creates a new OracleRdbms instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @memberof google.cloud.datastream.v1.OracleRdbms * @static - * @param {google.cloud.datastream.v1.IPostgresqlColumn=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn instance + * @param {google.cloud.datastream.v1.IOracleRdbms=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms instance */ - PostgresqlColumn.create = function create(properties) { - return new PostgresqlColumn(properties); + OracleRdbms.create = function create(properties) { + return new OracleRdbms(properties); }; /** - * Encodes the specified PostgresqlColumn message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlColumn.verify|verify} messages. + * Encodes the specified OracleRdbms message. Does not implicitly {@link google.cloud.datastream.v1.OracleRdbms.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @memberof google.cloud.datastream.v1.OracleRdbms * @static - * @param {google.cloud.datastream.v1.IPostgresqlColumn} message PostgresqlColumn message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleRdbms} message OracleRdbms message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostgresqlColumn.encode = function encode(message, writer) { + OracleRdbms.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); - if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.precision); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scale); - if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.primaryKey); - if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.nullable); - if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ordinalPosition); + if (message.oracleSchemas != null && message.oracleSchemas.length) + for (var i = 0; i < message.oracleSchemas.length; ++i) + $root.google.cloud.datastream.v1.OracleSchema.encode(message.oracleSchemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified PostgresqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlColumn.verify|verify} messages. + * Encodes the specified OracleRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleRdbms.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @memberof google.cloud.datastream.v1.OracleRdbms * @static - * @param {google.cloud.datastream.v1.IPostgresqlColumn} message PostgresqlColumn message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleRdbms} message OracleRdbms message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostgresqlColumn.encodeDelimited = function encodeDelimited(message, writer) { + OracleRdbms.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PostgresqlColumn message from the specified reader or buffer. + * Decodes an OracleRdbms message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @memberof google.cloud.datastream.v1.OracleRdbms * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn + * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgresqlColumn.decode = function decode(reader, length) { + OracleRdbms.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.datastream.v1.PostgresqlColumn(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleRdbms(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.column = reader.string(); - break; - } - case 2: { - message.dataType = reader.string(); - break; - } - case 3: { - message.length = reader.int32(); - break; - } - case 4: { - message.precision = reader.int32(); - break; - } - case 5: { - message.scale = reader.int32(); - break; - } - case 7: { - message.primaryKey = reader.bool(); - break; - } - case 8: { - message.nullable = reader.bool(); - break; - } - case 9: { - message.ordinalPosition = reader.int32(); + if (!(message.oracleSchemas && message.oracleSchemas.length)) + message.oracleSchemas = []; + message.oracleSchemas.push($root.google.cloud.datastream.v1.OracleSchema.decode(reader, reader.uint32())); break; } default: @@ -16377,181 +16714,146 @@ }; /** - * Decodes a PostgresqlColumn message from the specified reader or buffer, length delimited. + * Decodes an OracleRdbms message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @memberof google.cloud.datastream.v1.OracleRdbms * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn + * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgresqlColumn.decodeDelimited = function decodeDelimited(reader) { + OracleRdbms.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PostgresqlColumn message. + * Verifies an OracleRdbms message. * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @memberof google.cloud.datastream.v1.OracleRdbms * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PostgresqlColumn.verify = function verify(message) { + OracleRdbms.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) - if (!$util.isString(message.dataType)) - return "dataType: string expected"; - if (message.length != null && message.hasOwnProperty("length")) - if (!$util.isInteger(message.length)) - return "length: integer expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (!$util.isInteger(message.precision)) - return "precision: integer expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (!$util.isInteger(message.scale)) - return "scale: integer expected"; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - if (typeof message.primaryKey !== "boolean") - return "primaryKey: boolean expected"; - if (message.nullable != null && message.hasOwnProperty("nullable")) - if (typeof message.nullable !== "boolean") - return "nullable: boolean expected"; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - if (!$util.isInteger(message.ordinalPosition)) - return "ordinalPosition: integer expected"; + if (message.oracleSchemas != null && message.hasOwnProperty("oracleSchemas")) { + if (!Array.isArray(message.oracleSchemas)) + return "oracleSchemas: array expected"; + for (var i = 0; i < message.oracleSchemas.length; ++i) { + var error = $root.google.cloud.datastream.v1.OracleSchema.verify(message.oracleSchemas[i]); + if (error) + return "oracleSchemas." + error; + } + } return null; }; /** - * Creates a PostgresqlColumn message from a plain object. Also converts values to their respective internal types. + * Creates an OracleRdbms message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @memberof google.cloud.datastream.v1.OracleRdbms * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn + * @returns {google.cloud.datastream.v1.OracleRdbms} OracleRdbms */ - PostgresqlColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlColumn) + OracleRdbms.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleRdbms) return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlColumn(); - if (object.column != null) - message.column = String(object.column); - if (object.dataType != null) - message.dataType = String(object.dataType); - if (object.length != null) - message.length = object.length | 0; - if (object.precision != null) - message.precision = object.precision | 0; - if (object.scale != null) - message.scale = object.scale | 0; - if (object.primaryKey != null) - message.primaryKey = Boolean(object.primaryKey); - if (object.nullable != null) - message.nullable = Boolean(object.nullable); - if (object.ordinalPosition != null) - message.ordinalPosition = object.ordinalPosition | 0; + var message = new $root.google.cloud.datastream.v1.OracleRdbms(); + if (object.oracleSchemas) { + if (!Array.isArray(object.oracleSchemas)) + throw TypeError(".google.cloud.datastream.v1.OracleRdbms.oracleSchemas: array expected"); + message.oracleSchemas = []; + for (var i = 0; i < object.oracleSchemas.length; ++i) { + if (typeof object.oracleSchemas[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleRdbms.oracleSchemas: object expected"); + message.oracleSchemas[i] = $root.google.cloud.datastream.v1.OracleSchema.fromObject(object.oracleSchemas[i]); + } + } return message; }; /** - * Creates a plain object from a PostgresqlColumn message. Also converts values to other types if specified. + * Creates a plain object from an OracleRdbms message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @memberof google.cloud.datastream.v1.OracleRdbms * @static - * @param {google.cloud.datastream.v1.PostgresqlColumn} message PostgresqlColumn + * @param {google.cloud.datastream.v1.OracleRdbms} message OracleRdbms * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PostgresqlColumn.toObject = function toObject(message, options) { + OracleRdbms.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.column = ""; - object.dataType = ""; - object.length = 0; - object.precision = 0; - object.scale = 0; - object.primaryKey = false; - object.nullable = false; - object.ordinalPosition = 0; + if (options.arrays || options.defaults) + object.oracleSchemas = []; + if (message.oracleSchemas && message.oracleSchemas.length) { + object.oracleSchemas = []; + for (var j = 0; j < message.oracleSchemas.length; ++j) + object.oracleSchemas[j] = $root.google.cloud.datastream.v1.OracleSchema.toObject(message.oracleSchemas[j], options); } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = message.dataType; - if (message.length != null && message.hasOwnProperty("length")) - object.length = message.length; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = message.precision; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = message.scale; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - object.primaryKey = message.primaryKey; - if (message.nullable != null && message.hasOwnProperty("nullable")) - object.nullable = message.nullable; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - object.ordinalPosition = message.ordinalPosition; return object; }; /** - * Converts this PostgresqlColumn to JSON. + * Converts this OracleRdbms to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @memberof google.cloud.datastream.v1.OracleRdbms * @instance * @returns {Object.} JSON object */ - PostgresqlColumn.prototype.toJSON = function toJSON() { + OracleRdbms.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PostgresqlColumn + * Gets the default type url for OracleRdbms * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @memberof google.cloud.datastream.v1.OracleRdbms * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PostgresqlColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OracleRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlColumn"; + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleRdbms"; }; - return PostgresqlColumn; + return OracleRdbms; })(); - v1.PostgresqlTable = (function() { + v1.OracleSourceConfig = (function() { /** - * Properties of a PostgresqlTable. + * Properties of an OracleSourceConfig. * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlTable - * @property {string|null} [table] PostgresqlTable table - * @property {Array.|null} [postgresqlColumns] PostgresqlTable postgresqlColumns + * @interface IOracleSourceConfig + * @property {google.cloud.datastream.v1.IOracleRdbms|null} [includeObjects] OracleSourceConfig includeObjects + * @property {google.cloud.datastream.v1.IOracleRdbms|null} [excludeObjects] OracleSourceConfig excludeObjects + * @property {number|null} [maxConcurrentCdcTasks] OracleSourceConfig maxConcurrentCdcTasks + * @property {number|null} [maxConcurrentBackfillTasks] OracleSourceConfig maxConcurrentBackfillTasks + * @property {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null} [dropLargeObjects] OracleSourceConfig dropLargeObjects + * @property {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null} [streamLargeObjects] OracleSourceConfig streamLargeObjects + * @property {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner|null} [logMiner] OracleSourceConfig logMiner + * @property {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser|null} [binaryLogParser] OracleSourceConfig binaryLogParser */ /** - * Constructs a new PostgresqlTable. + * Constructs a new OracleSourceConfig. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlTable. - * @implements IPostgresqlTable + * @classdesc Represents an OracleSourceConfig. + * @implements IOracleSourceConfig * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlTable=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IOracleSourceConfig=} [properties] Properties to set */ - function PostgresqlTable(properties) { - this.postgresqlColumns = []; + function OracleSourceConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16559,92 +16861,198 @@ } /** - * PostgresqlTable table. - * @member {string} table - * @memberof google.cloud.datastream.v1.PostgresqlTable + * OracleSourceConfig includeObjects. + * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} includeObjects + * @memberof google.cloud.datastream.v1.OracleSourceConfig * @instance */ - PostgresqlTable.prototype.table = ""; + OracleSourceConfig.prototype.includeObjects = null; /** - * PostgresqlTable postgresqlColumns. - * @member {Array.} postgresqlColumns - * @memberof google.cloud.datastream.v1.PostgresqlTable + * OracleSourceConfig excludeObjects. + * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} excludeObjects + * @memberof google.cloud.datastream.v1.OracleSourceConfig * @instance */ - PostgresqlTable.prototype.postgresqlColumns = $util.emptyArray; + OracleSourceConfig.prototype.excludeObjects = null; /** - * Creates a new PostgresqlTable instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {google.cloud.datastream.v1.IPostgresqlTable=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable instance + * OracleSourceConfig maxConcurrentCdcTasks. + * @member {number} maxConcurrentCdcTasks + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @instance */ - PostgresqlTable.create = function create(properties) { - return new PostgresqlTable(properties); - }; + OracleSourceConfig.prototype.maxConcurrentCdcTasks = 0; /** - * Encodes the specified PostgresqlTable message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlTable.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {google.cloud.datastream.v1.IPostgresqlTable} message PostgresqlTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * OracleSourceConfig maxConcurrentBackfillTasks. + * @member {number} maxConcurrentBackfillTasks + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @instance */ - PostgresqlTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.postgresqlColumns != null && message.postgresqlColumns.length) - for (var i = 0; i < message.postgresqlColumns.length; ++i) - $root.google.cloud.datastream.v1.PostgresqlColumn.encode(message.postgresqlColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + OracleSourceConfig.prototype.maxConcurrentBackfillTasks = 0; /** - * Encodes the specified PostgresqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlTable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {google.cloud.datastream.v1.IPostgresqlTable} message PostgresqlTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * OracleSourceConfig dropLargeObjects. + * @member {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null|undefined} dropLargeObjects + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @instance */ - PostgresqlTable.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + OracleSourceConfig.prototype.dropLargeObjects = null; /** - * Decodes a PostgresqlTable message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlTable - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * OracleSourceConfig streamLargeObjects. + * @member {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null|undefined} streamLargeObjects + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @instance */ - PostgresqlTable.decode = function decode(reader, length) { + OracleSourceConfig.prototype.streamLargeObjects = null; + + /** + * OracleSourceConfig logMiner. + * @member {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner|null|undefined} logMiner + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @instance + */ + OracleSourceConfig.prototype.logMiner = null; + + /** + * OracleSourceConfig binaryLogParser. + * @member {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser|null|undefined} binaryLogParser + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @instance + */ + OracleSourceConfig.prototype.binaryLogParser = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OracleSourceConfig largeObjectsHandling. + * @member {"dropLargeObjects"|"streamLargeObjects"|undefined} largeObjectsHandling + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @instance + */ + Object.defineProperty(OracleSourceConfig.prototype, "largeObjectsHandling", { + get: $util.oneOfGetter($oneOfFields = ["dropLargeObjects", "streamLargeObjects"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * OracleSourceConfig cdcMethod. + * @member {"logMiner"|"binaryLogParser"|undefined} cdcMethod + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @instance + */ + Object.defineProperty(OracleSourceConfig.prototype, "cdcMethod", { + get: $util.oneOfGetter($oneOfFields = ["logMiner", "binaryLogParser"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OracleSourceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @static + * @param {google.cloud.datastream.v1.IOracleSourceConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig instance + */ + OracleSourceConfig.create = function create(properties) { + return new OracleSourceConfig(properties); + }; + + /** + * Encodes the specified OracleSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @static + * @param {google.cloud.datastream.v1.IOracleSourceConfig} message OracleSourceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OracleSourceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) + $root.google.cloud.datastream.v1.OracleRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) + $root.google.cloud.datastream.v1.OracleRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maxConcurrentCdcTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentCdcTasks")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxConcurrentCdcTasks); + if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConcurrentBackfillTasks); + if (message.dropLargeObjects != null && Object.hasOwnProperty.call(message, "dropLargeObjects")) + $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.encode(message.dropLargeObjects, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.streamLargeObjects != null && Object.hasOwnProperty.call(message, "streamLargeObjects")) + $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.encode(message.streamLargeObjects, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.logMiner != null && Object.hasOwnProperty.call(message, "logMiner")) + $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner.encode(message.logMiner, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.binaryLogParser != null && Object.hasOwnProperty.call(message, "binaryLogParser")) + $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.encode(message.binaryLogParser, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OracleSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @static + * @param {google.cloud.datastream.v1.IOracleSourceConfig} message OracleSourceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OracleSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OracleSourceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OracleSourceConfig.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.datastream.v1.PostgresqlTable(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleSourceConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.table = reader.string(); + message.includeObjects = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.postgresqlColumns && message.postgresqlColumns.length)) - message.postgresqlColumns = []; - message.postgresqlColumns.push($root.google.cloud.datastream.v1.PostgresqlColumn.decode(reader, reader.uint32())); + message.excludeObjects = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); + break; + } + case 3: { + message.maxConcurrentCdcTasks = reader.int32(); + break; + } + case 4: { + message.maxConcurrentBackfillTasks = reader.int32(); + break; + } + case 100: { + message.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.decode(reader, reader.uint32()); + break; + } + case 102: { + message.streamLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.decode(reader, reader.uint32()); + break; + } + case 103: { + message.logMiner = $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner.decode(reader, reader.uint32()); + break; + } + case 104: { + message.binaryLogParser = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.decode(reader, reader.uint32()); break; } default: @@ -16656,1316 +17064,1430 @@ }; /** - * Decodes a PostgresqlTable message from the specified reader or buffer, length delimited. + * Decodes an OracleSourceConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlTable + * @memberof google.cloud.datastream.v1.OracleSourceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable + * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgresqlTable.decodeDelimited = function decodeDelimited(reader) { + OracleSourceConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PostgresqlTable message. + * Verifies an OracleSourceConfig message. * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlTable + * @memberof google.cloud.datastream.v1.OracleSourceConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PostgresqlTable.verify = function verify(message) { + OracleSourceConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.postgresqlColumns != null && message.hasOwnProperty("postgresqlColumns")) { - if (!Array.isArray(message.postgresqlColumns)) - return "postgresqlColumns: array expected"; - for (var i = 0; i < message.postgresqlColumns.length; ++i) { - var error = $root.google.cloud.datastream.v1.PostgresqlColumn.verify(message.postgresqlColumns[i]); + var properties = {}; + if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { + var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.includeObjects); + if (error) + return "includeObjects." + error; + } + if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { + var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.excludeObjects); + if (error) + return "excludeObjects." + error; + } + if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) + if (!$util.isInteger(message.maxConcurrentCdcTasks)) + return "maxConcurrentCdcTasks: integer expected"; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + if (!$util.isInteger(message.maxConcurrentBackfillTasks)) + return "maxConcurrentBackfillTasks: integer expected"; + if (message.dropLargeObjects != null && message.hasOwnProperty("dropLargeObjects")) { + properties.largeObjectsHandling = 1; + { + var error = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify(message.dropLargeObjects); if (error) - return "postgresqlColumns." + error; + return "dropLargeObjects." + error; + } + } + if (message.streamLargeObjects != null && message.hasOwnProperty("streamLargeObjects")) { + if (properties.largeObjectsHandling === 1) + return "largeObjectsHandling: multiple values"; + properties.largeObjectsHandling = 1; + { + var error = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify(message.streamLargeObjects); + if (error) + return "streamLargeObjects." + error; + } + } + if (message.logMiner != null && message.hasOwnProperty("logMiner")) { + properties.cdcMethod = 1; + { + var error = $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner.verify(message.logMiner); + if (error) + return "logMiner." + error; + } + } + if (message.binaryLogParser != null && message.hasOwnProperty("binaryLogParser")) { + if (properties.cdcMethod === 1) + return "cdcMethod: multiple values"; + properties.cdcMethod = 1; + { + var error = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.verify(message.binaryLogParser); + if (error) + return "binaryLogParser." + error; } } return null; }; /** - * Creates a PostgresqlTable message from a plain object. Also converts values to their respective internal types. + * Creates an OracleSourceConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlTable + * @memberof google.cloud.datastream.v1.OracleSourceConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable + * @returns {google.cloud.datastream.v1.OracleSourceConfig} OracleSourceConfig */ - PostgresqlTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlTable) + OracleSourceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig) return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlTable(); - if (object.table != null) - message.table = String(object.table); - if (object.postgresqlColumns) { - if (!Array.isArray(object.postgresqlColumns)) - throw TypeError(".google.cloud.datastream.v1.PostgresqlTable.postgresqlColumns: array expected"); - message.postgresqlColumns = []; - for (var i = 0; i < object.postgresqlColumns.length; ++i) { - if (typeof object.postgresqlColumns[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlTable.postgresqlColumns: object expected"); - message.postgresqlColumns[i] = $root.google.cloud.datastream.v1.PostgresqlColumn.fromObject(object.postgresqlColumns[i]); - } + var message = new $root.google.cloud.datastream.v1.OracleSourceConfig(); + if (object.includeObjects != null) { + if (typeof object.includeObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.includeObjects: object expected"); + message.includeObjects = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.includeObjects); + } + if (object.excludeObjects != null) { + if (typeof object.excludeObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.excludeObjects: object expected"); + message.excludeObjects = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.excludeObjects); + } + if (object.maxConcurrentCdcTasks != null) + message.maxConcurrentCdcTasks = object.maxConcurrentCdcTasks | 0; + if (object.maxConcurrentBackfillTasks != null) + message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; + if (object.dropLargeObjects != null) { + if (typeof object.dropLargeObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.dropLargeObjects: object expected"); + message.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.fromObject(object.dropLargeObjects); + } + if (object.streamLargeObjects != null) { + if (typeof object.streamLargeObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.streamLargeObjects: object expected"); + message.streamLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.fromObject(object.streamLargeObjects); + } + if (object.logMiner != null) { + if (typeof object.logMiner !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.logMiner: object expected"); + message.logMiner = $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner.fromObject(object.logMiner); + } + if (object.binaryLogParser != null) { + if (typeof object.binaryLogParser !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.binaryLogParser: object expected"); + message.binaryLogParser = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.fromObject(object.binaryLogParser); } return message; }; /** - * Creates a plain object from a PostgresqlTable message. Also converts values to other types if specified. + * Creates a plain object from an OracleSourceConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlTable + * @memberof google.cloud.datastream.v1.OracleSourceConfig * @static - * @param {google.cloud.datastream.v1.PostgresqlTable} message PostgresqlTable + * @param {google.cloud.datastream.v1.OracleSourceConfig} message OracleSourceConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PostgresqlTable.toObject = function toObject(message, options) { + OracleSourceConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.postgresqlColumns = []; - if (options.defaults) - object.table = ""; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.postgresqlColumns && message.postgresqlColumns.length) { - object.postgresqlColumns = []; - for (var j = 0; j < message.postgresqlColumns.length; ++j) - object.postgresqlColumns[j] = $root.google.cloud.datastream.v1.PostgresqlColumn.toObject(message.postgresqlColumns[j], options); + if (options.defaults) { + object.includeObjects = null; + object.excludeObjects = null; + object.maxConcurrentCdcTasks = 0; + object.maxConcurrentBackfillTasks = 0; + } + if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) + object.includeObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.includeObjects, options); + if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) + object.excludeObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.excludeObjects, options); + if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) + object.maxConcurrentCdcTasks = message.maxConcurrentCdcTasks; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; + if (message.dropLargeObjects != null && message.hasOwnProperty("dropLargeObjects")) { + object.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.toObject(message.dropLargeObjects, options); + if (options.oneofs) + object.largeObjectsHandling = "dropLargeObjects"; + } + if (message.streamLargeObjects != null && message.hasOwnProperty("streamLargeObjects")) { + object.streamLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.toObject(message.streamLargeObjects, options); + if (options.oneofs) + object.largeObjectsHandling = "streamLargeObjects"; + } + if (message.logMiner != null && message.hasOwnProperty("logMiner")) { + object.logMiner = $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner.toObject(message.logMiner, options); + if (options.oneofs) + object.cdcMethod = "logMiner"; + } + if (message.binaryLogParser != null && message.hasOwnProperty("binaryLogParser")) { + object.binaryLogParser = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.toObject(message.binaryLogParser, options); + if (options.oneofs) + object.cdcMethod = "binaryLogParser"; } return object; }; /** - * Converts this PostgresqlTable to JSON. + * Converts this OracleSourceConfig to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlTable + * @memberof google.cloud.datastream.v1.OracleSourceConfig * @instance * @returns {Object.} JSON object */ - PostgresqlTable.prototype.toJSON = function toJSON() { + OracleSourceConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PostgresqlTable + * Gets the default type url for OracleSourceConfig * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlTable + * @memberof google.cloud.datastream.v1.OracleSourceConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PostgresqlTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OracleSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlTable"; + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig"; }; - return PostgresqlTable; - })(); - - v1.PostgresqlSchema = (function() { - - /** - * Properties of a PostgresqlSchema. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlSchema - * @property {string|null} [schema] PostgresqlSchema schema - * @property {Array.|null} [postgresqlTables] PostgresqlSchema postgresqlTables - */ - - /** - * Constructs a new PostgresqlSchema. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlSchema. - * @implements IPostgresqlSchema - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlSchema=} [properties] Properties to set - */ - function PostgresqlSchema(properties) { - this.postgresqlTables = []; - 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]]; - } + OracleSourceConfig.DropLargeObjects = (function() { - /** - * PostgresqlSchema schema. - * @member {string} schema - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @instance - */ - PostgresqlSchema.prototype.schema = ""; + /** + * Properties of a DropLargeObjects. + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @interface IDropLargeObjects + */ - /** - * PostgresqlSchema postgresqlTables. - * @member {Array.} postgresqlTables - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @instance - */ - PostgresqlSchema.prototype.postgresqlTables = $util.emptyArray; + /** + * Constructs a new DropLargeObjects. + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @classdesc Represents a DropLargeObjects. + * @implements IDropLargeObjects + * @constructor + * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects=} [properties] Properties to set + */ + function DropLargeObjects(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 PostgresqlSchema instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSchema=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema instance - */ - PostgresqlSchema.create = function create(properties) { - return new PostgresqlSchema(properties); - }; + /** + * Creates a new DropLargeObjects instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects instance + */ + DropLargeObjects.create = function create(properties) { + return new DropLargeObjects(properties); + }; - /** - * Encodes the specified PostgresqlSchema message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSchema.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSchema} message PostgresqlSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlSchema.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.postgresqlTables != null && message.postgresqlTables.length) - for (var i = 0; i < message.postgresqlTables.length; ++i) - $root.google.cloud.datastream.v1.PostgresqlTable.encode(message.postgresqlTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified DropLargeObjects message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects} message DropLargeObjects message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropLargeObjects.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Encodes the specified PostgresqlSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSchema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSchema} message PostgresqlSchema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlSchema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DropLargeObjects message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects} message DropLargeObjects message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropLargeObjects.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a PostgresqlSchema message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlSchema.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.datastream.v1.PostgresqlSchema(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schema = reader.string(); - break; - } - case 2: { - if (!(message.postgresqlTables && message.postgresqlTables.length)) - message.postgresqlTables = []; - message.postgresqlTables.push($root.google.cloud.datastream.v1.PostgresqlTable.decode(reader, reader.uint32())); + /** + * Decodes a DropLargeObjects message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropLargeObjects.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.datastream.v1.OracleSourceConfig.DropLargeObjects(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a PostgresqlSchema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlSchema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a PostgresqlSchema message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlSchema.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.postgresqlTables != null && message.hasOwnProperty("postgresqlTables")) { - if (!Array.isArray(message.postgresqlTables)) - return "postgresqlTables: array expected"; - for (var i = 0; i < message.postgresqlTables.length; ++i) { - var error = $root.google.cloud.datastream.v1.PostgresqlTable.verify(message.postgresqlTables[i]); - if (error) - return "postgresqlTables." + error; - } - } - return null; - }; + /** + * Decodes a DropLargeObjects message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropLargeObjects.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a PostgresqlSchema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema - */ - PostgresqlSchema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSchema) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlSchema(); - if (object.schema != null) - message.schema = String(object.schema); - if (object.postgresqlTables) { - if (!Array.isArray(object.postgresqlTables)) - throw TypeError(".google.cloud.datastream.v1.PostgresqlSchema.postgresqlTables: array expected"); - message.postgresqlTables = []; - for (var i = 0; i < object.postgresqlTables.length; ++i) { - if (typeof object.postgresqlTables[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlSchema.postgresqlTables: object expected"); - message.postgresqlTables[i] = $root.google.cloud.datastream.v1.PostgresqlTable.fromObject(object.postgresqlTables[i]); - } - } - return message; - }; + /** + * Verifies a DropLargeObjects message. + * @function verify + * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DropLargeObjects.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Creates a plain object from a PostgresqlSchema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {google.cloud.datastream.v1.PostgresqlSchema} message PostgresqlSchema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlSchema.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.postgresqlTables = []; - if (options.defaults) - object.schema = ""; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.postgresqlTables && message.postgresqlTables.length) { - object.postgresqlTables = []; - for (var j = 0; j < message.postgresqlTables.length; ++j) - object.postgresqlTables[j] = $root.google.cloud.datastream.v1.PostgresqlTable.toObject(message.postgresqlTables[j], options); - } - return object; - }; + /** + * Creates a DropLargeObjects message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} DropLargeObjects + */ + DropLargeObjects.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects) + return object; + return new $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects(); + }; - /** - * Converts this PostgresqlSchema to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @instance - * @returns {Object.} JSON object - */ - PostgresqlSchema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DropLargeObjects message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects} message DropLargeObjects + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DropLargeObjects.toObject = function toObject() { + return {}; + }; - /** - * Gets the default type url for PostgresqlSchema - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlSchema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSchema"; - }; + /** + * Converts this DropLargeObjects to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + * @instance + * @returns {Object.} JSON object + */ + DropLargeObjects.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return PostgresqlSchema; - })(); + /** + * Gets the default type url for DropLargeObjects + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DropLargeObjects.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects"; + }; - v1.PostgresqlRdbms = (function() { + return DropLargeObjects; + })(); - /** - * Properties of a PostgresqlRdbms. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlRdbms - * @property {Array.|null} [postgresqlSchemas] PostgresqlRdbms postgresqlSchemas - */ + OracleSourceConfig.StreamLargeObjects = (function() { - /** - * Constructs a new PostgresqlRdbms. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlRdbms. - * @implements IPostgresqlRdbms - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlRdbms=} [properties] Properties to set - */ - function PostgresqlRdbms(properties) { - this.postgresqlSchemas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a StreamLargeObjects. + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @interface IStreamLargeObjects + */ - /** - * PostgresqlRdbms postgresqlSchemas. - * @member {Array.} postgresqlSchemas - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @instance - */ - PostgresqlRdbms.prototype.postgresqlSchemas = $util.emptyArray; + /** + * Constructs a new StreamLargeObjects. + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @classdesc Represents a StreamLargeObjects. + * @implements IStreamLargeObjects + * @constructor + * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects=} [properties] Properties to set + */ + function StreamLargeObjects(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 PostgresqlRdbms instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {google.cloud.datastream.v1.IPostgresqlRdbms=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms instance - */ - PostgresqlRdbms.create = function create(properties) { - return new PostgresqlRdbms(properties); - }; + /** + * Creates a new StreamLargeObjects instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects instance + */ + StreamLargeObjects.create = function create(properties) { + return new StreamLargeObjects(properties); + }; - /** - * Encodes the specified PostgresqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlRdbms.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {google.cloud.datastream.v1.IPostgresqlRdbms} message PostgresqlRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlRdbms.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.postgresqlSchemas != null && message.postgresqlSchemas.length) - for (var i = 0; i < message.postgresqlSchemas.length; ++i) - $root.google.cloud.datastream.v1.PostgresqlSchema.encode(message.postgresqlSchemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified StreamLargeObjects message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects} message StreamLargeObjects message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamLargeObjects.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Encodes the specified PostgresqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlRdbms.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {google.cloud.datastream.v1.IPostgresqlRdbms} message PostgresqlRdbms message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlRdbms.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified StreamLargeObjects message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects} message StreamLargeObjects message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamLargeObjects.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a PostgresqlRdbms message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlRdbms.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.datastream.v1.PostgresqlRdbms(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.postgresqlSchemas && message.postgresqlSchemas.length)) - message.postgresqlSchemas = []; - message.postgresqlSchemas.push($root.google.cloud.datastream.v1.PostgresqlSchema.decode(reader, reader.uint32())); + /** + * Decodes a StreamLargeObjects message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamLargeObjects.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.datastream.v1.OracleSourceConfig.StreamLargeObjects(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a PostgresqlRdbms message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlRdbms.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a StreamLargeObjects message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamLargeObjects.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a PostgresqlRdbms message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlRdbms.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.postgresqlSchemas != null && message.hasOwnProperty("postgresqlSchemas")) { - if (!Array.isArray(message.postgresqlSchemas)) - return "postgresqlSchemas: array expected"; - for (var i = 0; i < message.postgresqlSchemas.length; ++i) { - var error = $root.google.cloud.datastream.v1.PostgresqlSchema.verify(message.postgresqlSchemas[i]); - if (error) - return "postgresqlSchemas." + error; - } - } - return null; - }; + /** + * Verifies a StreamLargeObjects message. + * @function verify + * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamLargeObjects.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Creates a PostgresqlRdbms message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms - */ - PostgresqlRdbms.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlRdbms) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlRdbms(); - if (object.postgresqlSchemas) { - if (!Array.isArray(object.postgresqlSchemas)) - throw TypeError(".google.cloud.datastream.v1.PostgresqlRdbms.postgresqlSchemas: array expected"); - message.postgresqlSchemas = []; - for (var i = 0; i < object.postgresqlSchemas.length; ++i) { - if (typeof object.postgresqlSchemas[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlRdbms.postgresqlSchemas: object expected"); - message.postgresqlSchemas[i] = $root.google.cloud.datastream.v1.PostgresqlSchema.fromObject(object.postgresqlSchemas[i]); - } - } - return message; - }; + /** + * Creates a StreamLargeObjects message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} StreamLargeObjects + */ + StreamLargeObjects.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects) + return object; + return new $root.google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects(); + }; - /** - * Creates a plain object from a PostgresqlRdbms message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {google.cloud.datastream.v1.PostgresqlRdbms} message PostgresqlRdbms - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlRdbms.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.postgresqlSchemas = []; - if (message.postgresqlSchemas && message.postgresqlSchemas.length) { - object.postgresqlSchemas = []; - for (var j = 0; j < message.postgresqlSchemas.length; ++j) - object.postgresqlSchemas[j] = $root.google.cloud.datastream.v1.PostgresqlSchema.toObject(message.postgresqlSchemas[j], options); - } - return object; - }; + /** + * Creates a plain object from a StreamLargeObjects message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects} message StreamLargeObjects + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamLargeObjects.toObject = function toObject() { + return {}; + }; - /** - * Converts this PostgresqlRdbms to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @instance - * @returns {Object.} JSON object - */ - PostgresqlRdbms.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this StreamLargeObjects to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + * @instance + * @returns {Object.} JSON object + */ + StreamLargeObjects.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for PostgresqlRdbms - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlRdbms - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Gets the default type url for StreamLargeObjects + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StreamLargeObjects.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects"; + }; + + return StreamLargeObjects; + })(); + + OracleSourceConfig.LogMiner = (function() { + + /** + * Properties of a LogMiner. + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @interface ILogMiner + */ + + /** + * Constructs a new LogMiner. + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @classdesc Represents a LogMiner. + * @implements ILogMiner + * @constructor + * @param {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner=} [properties] Properties to set + */ + function LogMiner(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlRdbms"; - }; - return PostgresqlRdbms; - })(); + /** + * Creates a new LogMiner instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleSourceConfig.LogMiner} LogMiner instance + */ + LogMiner.create = function create(properties) { + return new LogMiner(properties); + }; - v1.PostgresqlSourceConfig = (function() { + /** + * Encodes the specified LogMiner message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.LogMiner.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner} message LogMiner message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogMiner.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Properties of a PostgresqlSourceConfig. - * @memberof google.cloud.datastream.v1 - * @interface IPostgresqlSourceConfig - * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [includeObjects] PostgresqlSourceConfig includeObjects - * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [excludeObjects] PostgresqlSourceConfig excludeObjects - * @property {string|null} [replicationSlot] PostgresqlSourceConfig replicationSlot - * @property {string|null} [publication] PostgresqlSourceConfig publication - * @property {number|null} [maxConcurrentBackfillTasks] PostgresqlSourceConfig maxConcurrentBackfillTasks - */ + /** + * Encodes the specified LogMiner message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.LogMiner.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.ILogMiner} message LogMiner message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogMiner.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new PostgresqlSourceConfig. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a PostgresqlSourceConfig. - * @implements IPostgresqlSourceConfig - * @constructor - * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig=} [properties] Properties to set - */ - function PostgresqlSourceConfig(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]]; - } + /** + * Decodes a LogMiner message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.OracleSourceConfig.LogMiner} LogMiner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogMiner.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.datastream.v1.OracleSourceConfig.LogMiner(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * PostgresqlSourceConfig includeObjects. - * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} includeObjects - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - */ - PostgresqlSourceConfig.prototype.includeObjects = null; + /** + * Decodes a LogMiner message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.OracleSourceConfig.LogMiner} LogMiner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogMiner.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * PostgresqlSourceConfig excludeObjects. - * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} excludeObjects - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - */ - PostgresqlSourceConfig.prototype.excludeObjects = null; + /** + * Verifies a LogMiner message. + * @function verify + * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogMiner.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * PostgresqlSourceConfig replicationSlot. - * @member {string} replicationSlot - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - */ - PostgresqlSourceConfig.prototype.replicationSlot = ""; + /** + * Creates a LogMiner message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.OracleSourceConfig.LogMiner} LogMiner + */ + LogMiner.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner) + return object; + return new $root.google.cloud.datastream.v1.OracleSourceConfig.LogMiner(); + }; - /** - * PostgresqlSourceConfig publication. - * @member {string} publication - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - */ - PostgresqlSourceConfig.prototype.publication = ""; + /** + * Creates a plain object from a LogMiner message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.LogMiner} message LogMiner + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogMiner.toObject = function toObject() { + return {}; + }; - /** - * PostgresqlSourceConfig maxConcurrentBackfillTasks. - * @member {number} maxConcurrentBackfillTasks - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - */ - PostgresqlSourceConfig.prototype.maxConcurrentBackfillTasks = 0; + /** + * Converts this LogMiner to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner + * @instance + * @returns {Object.} JSON object + */ + LogMiner.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new PostgresqlSourceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig instance - */ - PostgresqlSourceConfig.create = function create(properties) { - return new PostgresqlSourceConfig(properties); - }; + /** + * Gets the default type url for LogMiner + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.OracleSourceConfig.LogMiner + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogMiner.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.LogMiner"; + }; - /** - * Encodes the specified PostgresqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSourceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig} message PostgresqlSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlSourceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) - $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) - $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.replicationSlot != null && Object.hasOwnProperty.call(message, "replicationSlot")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.replicationSlot); - if (message.publication != null && Object.hasOwnProperty.call(message, "publication")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.publication); - if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxConcurrentBackfillTasks); - return writer; - }; + return LogMiner; + })(); - /** - * Encodes the specified PostgresqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSourceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig} message PostgresqlSourceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + OracleSourceConfig.BinaryLogParser = (function() { - /** - * Decodes a PostgresqlSourceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlSourceConfig.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.datastream.v1.PostgresqlSourceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.includeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); - break; - } - case 2: { - message.excludeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); - break; - } - case 3: { - message.replicationSlot = reader.string(); - break; - } - case 4: { - message.publication = reader.string(); - break; - } - case 5: { - message.maxConcurrentBackfillTasks = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostgresqlSourceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlSourceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostgresqlSourceConfig message. - * @function verify - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlSourceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { - var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.includeObjects); - if (error) - return "includeObjects." + error; - } - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { - var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.excludeObjects); - if (error) - return "excludeObjects." + error; - } - if (message.replicationSlot != null && message.hasOwnProperty("replicationSlot")) - if (!$util.isString(message.replicationSlot)) - return "replicationSlot: string expected"; - if (message.publication != null && message.hasOwnProperty("publication")) - if (!$util.isString(message.publication)) - return "publication: string expected"; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - if (!$util.isInteger(message.maxConcurrentBackfillTasks)) - return "maxConcurrentBackfillTasks: integer expected"; - return null; - }; + /** + * Properties of a BinaryLogParser. + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @interface IBinaryLogParser + * @property {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess|null} [oracleAsmLogFileAccess] BinaryLogParser oracleAsmLogFileAccess + * @property {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories|null} [logFileDirectories] BinaryLogParser logFileDirectories + */ - /** - * Creates a PostgresqlSourceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig - */ - PostgresqlSourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSourceConfig) - return object; - var message = new $root.google.cloud.datastream.v1.PostgresqlSourceConfig(); - if (object.includeObjects != null) { - if (typeof object.includeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlSourceConfig.includeObjects: object expected"); - message.includeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.includeObjects); - } - if (object.excludeObjects != null) { - if (typeof object.excludeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.PostgresqlSourceConfig.excludeObjects: object expected"); - message.excludeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.excludeObjects); + /** + * Constructs a new BinaryLogParser. + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @classdesc Represents a BinaryLogParser. + * @implements IBinaryLogParser + * @constructor + * @param {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser=} [properties] Properties to set + */ + function BinaryLogParser(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]]; } - if (object.replicationSlot != null) - message.replicationSlot = String(object.replicationSlot); - if (object.publication != null) - message.publication = String(object.publication); - if (object.maxConcurrentBackfillTasks != null) - message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; - return message; - }; - /** - * Creates a plain object from a PostgresqlSourceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {google.cloud.datastream.v1.PostgresqlSourceConfig} message PostgresqlSourceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlSourceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.includeObjects = null; - object.excludeObjects = null; - object.replicationSlot = ""; - object.publication = ""; - object.maxConcurrentBackfillTasks = 0; - } - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) - object.includeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.includeObjects, options); - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) - object.excludeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.excludeObjects, options); - if (message.replicationSlot != null && message.hasOwnProperty("replicationSlot")) - object.replicationSlot = message.replicationSlot; - if (message.publication != null && message.hasOwnProperty("publication")) - object.publication = message.publication; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; - return object; - }; + /** + * BinaryLogParser oracleAsmLogFileAccess. + * @member {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess|null|undefined} oracleAsmLogFileAccess + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @instance + */ + BinaryLogParser.prototype.oracleAsmLogFileAccess = null; - /** - * Converts this PostgresqlSourceConfig to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @instance - * @returns {Object.} JSON object - */ - PostgresqlSourceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * BinaryLogParser logFileDirectories. + * @member {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories|null|undefined} logFileDirectories + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @instance + */ + BinaryLogParser.prototype.logFileDirectories = null; - /** - * Gets the default type url for PostgresqlSourceConfig - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSourceConfig"; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - return PostgresqlSourceConfig; - })(); + /** + * BinaryLogParser logFileAccess. + * @member {"oracleAsmLogFileAccess"|"logFileDirectories"|undefined} logFileAccess + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @instance + */ + Object.defineProperty(BinaryLogParser.prototype, "logFileAccess", { + get: $util.oneOfGetter($oneOfFields = ["oracleAsmLogFileAccess", "logFileDirectories"]), + set: $util.oneOfSetter($oneOfFields) + }); - v1.MysqlColumn = (function() { + /** + * Creates a new BinaryLogParser instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser} BinaryLogParser instance + */ + BinaryLogParser.create = function create(properties) { + return new BinaryLogParser(properties); + }; - /** - * Properties of a MysqlColumn. - * @memberof google.cloud.datastream.v1 - * @interface IMysqlColumn - * @property {string|null} [column] MysqlColumn column - * @property {string|null} [dataType] MysqlColumn dataType - * @property {number|null} [length] MysqlColumn length - * @property {string|null} [collation] MysqlColumn collation - * @property {boolean|null} [primaryKey] MysqlColumn primaryKey - * @property {boolean|null} [nullable] MysqlColumn nullable - * @property {number|null} [ordinalPosition] MysqlColumn ordinalPosition - * @property {number|null} [precision] MysqlColumn precision - * @property {number|null} [scale] MysqlColumn scale - */ + /** + * Encodes the specified BinaryLogParser message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser} message BinaryLogParser message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryLogParser.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oracleAsmLogFileAccess != null && Object.hasOwnProperty.call(message, "oracleAsmLogFileAccess")) + $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.encode(message.oracleAsmLogFileAccess, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.logFileDirectories != null && Object.hasOwnProperty.call(message, "logFileDirectories")) + $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.encode(message.logFileDirectories, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Constructs a new MysqlColumn. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlColumn. - * @implements IMysqlColumn - * @constructor - * @param {google.cloud.datastream.v1.IMysqlColumn=} [properties] Properties to set - */ - function MysqlColumn(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 BinaryLogParser message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.IBinaryLogParser} message BinaryLogParser message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryLogParser.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * MysqlColumn column. - * @member {string} column - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.column = ""; + /** + * Decodes a BinaryLogParser message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser} BinaryLogParser + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryLogParser.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.datastream.v1.OracleSourceConfig.BinaryLogParser(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.oracleAsmLogFileAccess = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.decode(reader, reader.uint32()); + break; + } + case 2: { + message.logFileDirectories = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * MysqlColumn dataType. - * @member {string} dataType - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.dataType = ""; + /** + * Decodes a BinaryLogParser message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser} BinaryLogParser + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryLogParser.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MysqlColumn length. - * @member {number} length - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.length = 0; + /** + * Verifies a BinaryLogParser message. + * @function verify + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BinaryLogParser.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.oracleAsmLogFileAccess != null && message.hasOwnProperty("oracleAsmLogFileAccess")) { + properties.logFileAccess = 1; + { + var error = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.verify(message.oracleAsmLogFileAccess); + if (error) + return "oracleAsmLogFileAccess." + error; + } + } + if (message.logFileDirectories != null && message.hasOwnProperty("logFileDirectories")) { + if (properties.logFileAccess === 1) + return "logFileAccess: multiple values"; + properties.logFileAccess = 1; + { + var error = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.verify(message.logFileDirectories); + if (error) + return "logFileDirectories." + error; + } + } + return null; + }; - /** - * MysqlColumn collation. - * @member {string} collation - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.collation = ""; + /** + * Creates a BinaryLogParser message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser} BinaryLogParser + */ + BinaryLogParser.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser) + return object; + var message = new $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser(); + if (object.oracleAsmLogFileAccess != null) { + if (typeof object.oracleAsmLogFileAccess !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.oracleAsmLogFileAccess: object expected"); + message.oracleAsmLogFileAccess = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.fromObject(object.oracleAsmLogFileAccess); + } + if (object.logFileDirectories != null) { + if (typeof object.logFileDirectories !== "object") + throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.logFileDirectories: object expected"); + message.logFileDirectories = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.fromObject(object.logFileDirectories); + } + return message; + }; - /** - * MysqlColumn primaryKey. - * @member {boolean} primaryKey - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.primaryKey = false; + /** + * Creates a plain object from a BinaryLogParser message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser} message BinaryLogParser + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BinaryLogParser.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.oracleAsmLogFileAccess != null && message.hasOwnProperty("oracleAsmLogFileAccess")) { + object.oracleAsmLogFileAccess = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.toObject(message.oracleAsmLogFileAccess, options); + if (options.oneofs) + object.logFileAccess = "oracleAsmLogFileAccess"; + } + if (message.logFileDirectories != null && message.hasOwnProperty("logFileDirectories")) { + object.logFileDirectories = $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.toObject(message.logFileDirectories, options); + if (options.oneofs) + object.logFileAccess = "logFileDirectories"; + } + return object; + }; - /** - * MysqlColumn nullable. - * @member {boolean} nullable - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.nullable = false; + /** + * Converts this BinaryLogParser to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @instance + * @returns {Object.} JSON object + */ + BinaryLogParser.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MysqlColumn ordinalPosition. - * @member {number} ordinalPosition - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.ordinalPosition = 0; + /** + * Gets the default type url for BinaryLogParser + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BinaryLogParser.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser"; + }; - /** - * MysqlColumn precision. - * @member {number} precision - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.precision = 0; + BinaryLogParser.OracleAsmLogFileAccess = (function() { - /** - * MysqlColumn scale. - * @member {number} scale - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - */ - MysqlColumn.prototype.scale = 0; + /** + * Properties of an OracleAsmLogFileAccess. + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @interface IOracleAsmLogFileAccess + */ - /** - * Creates a new MysqlColumn instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1.IMysqlColumn=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn instance - */ - MysqlColumn.create = function create(properties) { - return new MysqlColumn(properties); - }; + /** + * Constructs a new OracleAsmLogFileAccess. + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @classdesc Represents an OracleAsmLogFileAccess. + * @implements IOracleAsmLogFileAccess + * @constructor + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess=} [properties] Properties to set + */ + function OracleAsmLogFileAccess(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 MysqlColumn message. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1.IMysqlColumn} message MysqlColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlColumn.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); - if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); - if (message.collation != null && Object.hasOwnProperty.call(message, "collation")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.collation); - if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.primaryKey); - if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.nullable); - if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.ordinalPosition); - if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.precision); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scale); - return writer; - }; + /** + * Creates a new OracleAsmLogFileAccess instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess} OracleAsmLogFileAccess instance + */ + OracleAsmLogFileAccess.create = function create(properties) { + return new OracleAsmLogFileAccess(properties); + }; - /** - * Encodes the specified MysqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1.IMysqlColumn} message MysqlColumn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlColumn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified OracleAsmLogFileAccess message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess} message OracleAsmLogFileAccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OracleAsmLogFileAccess.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Decodes a MysqlColumn message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlColumn.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.datastream.v1.MysqlColumn(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.column = reader.string(); - break; - } - case 2: { - message.dataType = reader.string(); - break; - } - case 3: { - message.length = reader.int32(); - break; - } - case 4: { - message.collation = reader.string(); - break; - } - case 5: { - message.primaryKey = reader.bool(); - break; - } - case 6: { - message.nullable = reader.bool(); - break; - } - case 7: { - message.ordinalPosition = reader.int32(); - break; - } - case 8: { - message.precision = reader.int32(); - break; - } - case 9: { - message.scale = reader.int32(); - break; + /** + * Encodes the specified OracleAsmLogFileAccess message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.IOracleAsmLogFileAccess} message OracleAsmLogFileAccess message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OracleAsmLogFileAccess.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OracleAsmLogFileAccess message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess} OracleAsmLogFileAccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OracleAsmLogFileAccess.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.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return message; + }; - /** - * Decodes a MysqlColumn message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlColumn.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an OracleAsmLogFileAccess message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess} OracleAsmLogFileAccess + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OracleAsmLogFileAccess.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a MysqlColumn message. - * @function verify - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlColumn.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isString(message.column)) - return "column: string expected"; - if (message.dataType != null && message.hasOwnProperty("dataType")) - if (!$util.isString(message.dataType)) - return "dataType: string expected"; - if (message.length != null && message.hasOwnProperty("length")) - if (!$util.isInteger(message.length)) - return "length: integer expected"; - if (message.collation != null && message.hasOwnProperty("collation")) - if (!$util.isString(message.collation)) - return "collation: string expected"; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - if (typeof message.primaryKey !== "boolean") - return "primaryKey: boolean expected"; - if (message.nullable != null && message.hasOwnProperty("nullable")) - if (typeof message.nullable !== "boolean") - return "nullable: boolean expected"; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - if (!$util.isInteger(message.ordinalPosition)) - return "ordinalPosition: integer expected"; - if (message.precision != null && message.hasOwnProperty("precision")) - if (!$util.isInteger(message.precision)) - return "precision: integer expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (!$util.isInteger(message.scale)) - return "scale: integer expected"; - return null; - }; + /** + * Verifies an OracleAsmLogFileAccess message. + * @function verify + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OracleAsmLogFileAccess.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Creates a MysqlColumn message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn - */ - MysqlColumn.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlColumn) - return object; - var message = new $root.google.cloud.datastream.v1.MysqlColumn(); - if (object.column != null) - message.column = String(object.column); - if (object.dataType != null) - message.dataType = String(object.dataType); - if (object.length != null) - message.length = object.length | 0; - if (object.collation != null) - message.collation = String(object.collation); - if (object.primaryKey != null) - message.primaryKey = Boolean(object.primaryKey); - if (object.nullable != null) - message.nullable = Boolean(object.nullable); - if (object.ordinalPosition != null) - message.ordinalPosition = object.ordinalPosition | 0; - if (object.precision != null) - message.precision = object.precision | 0; - if (object.scale != null) - message.scale = object.scale | 0; - return message; - }; + /** + * Creates an OracleAsmLogFileAccess message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess} OracleAsmLogFileAccess + */ + OracleAsmLogFileAccess.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess) + return object; + return new $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess(); + }; - /** - * Creates a plain object from a MysqlColumn message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {google.cloud.datastream.v1.MysqlColumn} message MysqlColumn - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlColumn.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.column = ""; - object.dataType = ""; - object.length = 0; - object.collation = ""; - object.primaryKey = false; - object.nullable = false; - object.ordinalPosition = 0; - object.precision = 0; - object.scale = 0; - } - if (message.column != null && message.hasOwnProperty("column")) - object.column = message.column; - if (message.dataType != null && message.hasOwnProperty("dataType")) - object.dataType = message.dataType; - if (message.length != null && message.hasOwnProperty("length")) - object.length = message.length; - if (message.collation != null && message.hasOwnProperty("collation")) - object.collation = message.collation; - if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) - object.primaryKey = message.primaryKey; - if (message.nullable != null && message.hasOwnProperty("nullable")) - object.nullable = message.nullable; - if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) - object.ordinalPosition = message.ordinalPosition; - if (message.precision != null && message.hasOwnProperty("precision")) - object.precision = message.precision; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = message.scale; - return object; - }; + /** + * Creates a plain object from an OracleAsmLogFileAccess message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess} message OracleAsmLogFileAccess + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OracleAsmLogFileAccess.toObject = function toObject() { + return {}; + }; - /** - * Converts this MysqlColumn to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlColumn - * @instance - * @returns {Object.} JSON object - */ - MysqlColumn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this OracleAsmLogFileAccess to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + * @instance + * @returns {Object.} JSON object + */ + OracleAsmLogFileAccess.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for MysqlColumn - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlColumn - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlColumn"; - }; + /** + * Gets the default type url for OracleAsmLogFileAccess + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OracleAsmLogFileAccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess"; + }; - return MysqlColumn; + return OracleAsmLogFileAccess; + })(); + + BinaryLogParser.LogFileDirectories = (function() { + + /** + * Properties of a LogFileDirectories. + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @interface ILogFileDirectories + * @property {string|null} [onlineLogDirectory] LogFileDirectories onlineLogDirectory + * @property {string|null} [archivedLogDirectory] LogFileDirectories archivedLogDirectory + */ + + /** + * Constructs a new LogFileDirectories. + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + * @classdesc Represents a LogFileDirectories. + * @implements ILogFileDirectories + * @constructor + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories=} [properties] Properties to set + */ + function LogFileDirectories(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]]; + } + + /** + * LogFileDirectories onlineLogDirectory. + * @member {string} onlineLogDirectory + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @instance + */ + LogFileDirectories.prototype.onlineLogDirectory = ""; + + /** + * LogFileDirectories archivedLogDirectory. + * @member {string} archivedLogDirectory + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @instance + */ + LogFileDirectories.prototype.archivedLogDirectory = ""; + + /** + * Creates a new LogFileDirectories instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories} LogFileDirectories instance + */ + LogFileDirectories.create = function create(properties) { + return new LogFileDirectories(properties); + }; + + /** + * Encodes the specified LogFileDirectories message. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories} message LogFileDirectories message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogFileDirectories.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.onlineLogDirectory != null && Object.hasOwnProperty.call(message, "onlineLogDirectory")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.onlineLogDirectory); + if (message.archivedLogDirectory != null && Object.hasOwnProperty.call(message, "archivedLogDirectory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.archivedLogDirectory); + return writer; + }; + + /** + * Encodes the specified LogFileDirectories message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.ILogFileDirectories} message LogFileDirectories message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogFileDirectories.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LogFileDirectories message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories} LogFileDirectories + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogFileDirectories.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.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.onlineLogDirectory = reader.string(); + break; + } + case 2: { + message.archivedLogDirectory = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LogFileDirectories message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories} LogFileDirectories + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogFileDirectories.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LogFileDirectories message. + * @function verify + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogFileDirectories.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.onlineLogDirectory != null && message.hasOwnProperty("onlineLogDirectory")) + if (!$util.isString(message.onlineLogDirectory)) + return "onlineLogDirectory: string expected"; + if (message.archivedLogDirectory != null && message.hasOwnProperty("archivedLogDirectory")) + if (!$util.isString(message.archivedLogDirectory)) + return "archivedLogDirectory: string expected"; + return null; + }; + + /** + * Creates a LogFileDirectories message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories} LogFileDirectories + */ + LogFileDirectories.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories) + return object; + var message = new $root.google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories(); + if (object.onlineLogDirectory != null) + message.onlineLogDirectory = String(object.onlineLogDirectory); + if (object.archivedLogDirectory != null) + message.archivedLogDirectory = String(object.archivedLogDirectory); + return message; + }; + + /** + * Creates a plain object from a LogFileDirectories message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @static + * @param {google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories} message LogFileDirectories + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogFileDirectories.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.onlineLogDirectory = ""; + object.archivedLogDirectory = ""; + } + if (message.onlineLogDirectory != null && message.hasOwnProperty("onlineLogDirectory")) + object.onlineLogDirectory = message.onlineLogDirectory; + if (message.archivedLogDirectory != null && message.hasOwnProperty("archivedLogDirectory")) + object.archivedLogDirectory = message.archivedLogDirectory; + return object; + }; + + /** + * Converts this LogFileDirectories to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @instance + * @returns {Object.} JSON object + */ + LogFileDirectories.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LogFileDirectories + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LogFileDirectories.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories"; + }; + + return LogFileDirectories; + })(); + + return BinaryLogParser; + })(); + + return OracleSourceConfig; })(); - v1.MysqlTable = (function() { + v1.PostgresqlColumn = (function() { /** - * Properties of a MysqlTable. + * Properties of a PostgresqlColumn. * @memberof google.cloud.datastream.v1 - * @interface IMysqlTable - * @property {string|null} [table] MysqlTable table - * @property {Array.|null} [mysqlColumns] MysqlTable mysqlColumns + * @interface IPostgresqlColumn + * @property {string|null} [column] PostgresqlColumn column + * @property {string|null} [dataType] PostgresqlColumn dataType + * @property {number|null} [length] PostgresqlColumn length + * @property {number|null} [precision] PostgresqlColumn precision + * @property {number|null} [scale] PostgresqlColumn scale + * @property {boolean|null} [primaryKey] PostgresqlColumn primaryKey + * @property {boolean|null} [nullable] PostgresqlColumn nullable + * @property {number|null} [ordinalPosition] PostgresqlColumn ordinalPosition */ /** - * Constructs a new MysqlTable. + * Constructs a new PostgresqlColumn. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlTable. - * @implements IMysqlTable + * @classdesc Represents a PostgresqlColumn. + * @implements IPostgresqlColumn * @constructor - * @param {google.cloud.datastream.v1.IMysqlTable=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IPostgresqlColumn=} [properties] Properties to set */ - function MysqlTable(properties) { - this.mysqlColumns = []; + function PostgresqlColumn(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17973,92 +18495,173 @@ } /** - * MysqlTable table. - * @member {string} table - * @memberof google.cloud.datastream.v1.MysqlTable + * PostgresqlColumn column. + * @member {string} column + * @memberof google.cloud.datastream.v1.PostgresqlColumn * @instance */ - MysqlTable.prototype.table = ""; + PostgresqlColumn.prototype.column = ""; /** - * MysqlTable mysqlColumns. - * @member {Array.} mysqlColumns - * @memberof google.cloud.datastream.v1.MysqlTable + * PostgresqlColumn dataType. + * @member {string} dataType + * @memberof google.cloud.datastream.v1.PostgresqlColumn * @instance */ - MysqlTable.prototype.mysqlColumns = $util.emptyArray; + PostgresqlColumn.prototype.dataType = ""; /** - * Creates a new MysqlTable instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {google.cloud.datastream.v1.IMysqlTable=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable instance + * PostgresqlColumn length. + * @member {number} length + * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @instance */ - MysqlTable.create = function create(properties) { - return new MysqlTable(properties); - }; + PostgresqlColumn.prototype.length = 0; /** - * Encodes the specified MysqlTable message. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {google.cloud.datastream.v1.IMysqlTable} message MysqlTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * PostgresqlColumn precision. + * @member {number} precision + * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @instance */ - MysqlTable.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.mysqlColumns != null && message.mysqlColumns.length) - for (var i = 0; i < message.mysqlColumns.length; ++i) - $root.google.cloud.datastream.v1.MysqlColumn.encode(message.mysqlColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + PostgresqlColumn.prototype.precision = 0; /** - * Encodes the specified MysqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlTable - * @static - * @param {google.cloud.datastream.v1.IMysqlTable} message MysqlTable message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * PostgresqlColumn scale. + * @member {number} scale + * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @instance */ - MysqlTable.encodeDelimited = function encodeDelimited(message, writer) { + PostgresqlColumn.prototype.scale = 0; + + /** + * PostgresqlColumn primaryKey. + * @member {boolean} primaryKey + * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @instance + */ + PostgresqlColumn.prototype.primaryKey = false; + + /** + * PostgresqlColumn nullable. + * @member {boolean} nullable + * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @instance + */ + PostgresqlColumn.prototype.nullable = false; + + /** + * PostgresqlColumn ordinalPosition. + * @member {number} ordinalPosition + * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @instance + */ + PostgresqlColumn.prototype.ordinalPosition = 0; + + /** + * Creates a new PostgresqlColumn instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @static + * @param {google.cloud.datastream.v1.IPostgresqlColumn=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn instance + */ + PostgresqlColumn.create = function create(properties) { + return new PostgresqlColumn(properties); + }; + + /** + * Encodes the specified PostgresqlColumn message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlColumn.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @static + * @param {google.cloud.datastream.v1.IPostgresqlColumn} message PostgresqlColumn message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostgresqlColumn.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); + if (message.length != null && Object.hasOwnProperty.call(message, "length")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); + if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.precision); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scale); + if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.primaryKey); + if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.nullable); + if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ordinalPosition); + return writer; + }; + + /** + * Encodes the specified PostgresqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlColumn.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.PostgresqlColumn + * @static + * @param {google.cloud.datastream.v1.IPostgresqlColumn} message PostgresqlColumn message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostgresqlColumn.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MysqlTable message from the specified reader or buffer. + * Decodes a PostgresqlColumn message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.MysqlTable + * @memberof google.cloud.datastream.v1.PostgresqlColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable + * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlTable.decode = function decode(reader, length) { + PostgresqlColumn.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.datastream.v1.MysqlTable(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlColumn(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.table = reader.string(); + message.column = reader.string(); break; } case 2: { - if (!(message.mysqlColumns && message.mysqlColumns.length)) - message.mysqlColumns = []; - message.mysqlColumns.push($root.google.cloud.datastream.v1.MysqlColumn.decode(reader, reader.uint32())); + message.dataType = reader.string(); + break; + } + case 3: { + message.length = reader.int32(); + break; + } + case 4: { + message.precision = reader.int32(); + break; + } + case 5: { + message.scale = reader.int32(); + break; + } + case 7: { + message.primaryKey = reader.bool(); + break; + } + case 8: { + message.nullable = reader.bool(); + break; + } + case 9: { + message.ordinalPosition = reader.int32(); break; } default: @@ -18070,150 +18673,181 @@ }; /** - * Decodes a MysqlTable message from the specified reader or buffer, length delimited. + * Decodes a PostgresqlColumn message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlTable + * @memberof google.cloud.datastream.v1.PostgresqlColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable + * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlTable.decodeDelimited = function decodeDelimited(reader) { + PostgresqlColumn.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MysqlTable message. + * Verifies a PostgresqlColumn message. * @function verify - * @memberof google.cloud.datastream.v1.MysqlTable + * @memberof google.cloud.datastream.v1.PostgresqlColumn * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MysqlTable.verify = function verify(message) { + PostgresqlColumn.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.mysqlColumns != null && message.hasOwnProperty("mysqlColumns")) { - if (!Array.isArray(message.mysqlColumns)) - return "mysqlColumns: array expected"; - for (var i = 0; i < message.mysqlColumns.length; ++i) { - var error = $root.google.cloud.datastream.v1.MysqlColumn.verify(message.mysqlColumns[i]); - if (error) - return "mysqlColumns." + error; - } - } + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.dataType != null && message.hasOwnProperty("dataType")) + if (!$util.isString(message.dataType)) + return "dataType: string expected"; + if (message.length != null && message.hasOwnProperty("length")) + if (!$util.isInteger(message.length)) + return "length: integer expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (!$util.isInteger(message.precision)) + return "precision: integer expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (!$util.isInteger(message.scale)) + return "scale: integer expected"; + if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) + if (typeof message.primaryKey !== "boolean") + return "primaryKey: boolean expected"; + if (message.nullable != null && message.hasOwnProperty("nullable")) + if (typeof message.nullable !== "boolean") + return "nullable: boolean expected"; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + if (!$util.isInteger(message.ordinalPosition)) + return "ordinalPosition: integer expected"; return null; }; /** - * Creates a MysqlTable message from a plain object. Also converts values to their respective internal types. + * Creates a PostgresqlColumn message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlTable + * @memberof google.cloud.datastream.v1.PostgresqlColumn * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable + * @returns {google.cloud.datastream.v1.PostgresqlColumn} PostgresqlColumn */ - MysqlTable.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlTable) + PostgresqlColumn.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PostgresqlColumn) return object; - var message = new $root.google.cloud.datastream.v1.MysqlTable(); - if (object.table != null) - message.table = String(object.table); - if (object.mysqlColumns) { - if (!Array.isArray(object.mysqlColumns)) - throw TypeError(".google.cloud.datastream.v1.MysqlTable.mysqlColumns: array expected"); - message.mysqlColumns = []; - for (var i = 0; i < object.mysqlColumns.length; ++i) { - if (typeof object.mysqlColumns[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlTable.mysqlColumns: object expected"); - message.mysqlColumns[i] = $root.google.cloud.datastream.v1.MysqlColumn.fromObject(object.mysqlColumns[i]); - } - } + var message = new $root.google.cloud.datastream.v1.PostgresqlColumn(); + if (object.column != null) + message.column = String(object.column); + if (object.dataType != null) + message.dataType = String(object.dataType); + if (object.length != null) + message.length = object.length | 0; + if (object.precision != null) + message.precision = object.precision | 0; + if (object.scale != null) + message.scale = object.scale | 0; + if (object.primaryKey != null) + message.primaryKey = Boolean(object.primaryKey); + if (object.nullable != null) + message.nullable = Boolean(object.nullable); + if (object.ordinalPosition != null) + message.ordinalPosition = object.ordinalPosition | 0; return message; }; /** - * Creates a plain object from a MysqlTable message. Also converts values to other types if specified. + * Creates a plain object from a PostgresqlColumn message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.MysqlTable + * @memberof google.cloud.datastream.v1.PostgresqlColumn * @static - * @param {google.cloud.datastream.v1.MysqlTable} message MysqlTable + * @param {google.cloud.datastream.v1.PostgresqlColumn} message PostgresqlColumn * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MysqlTable.toObject = function toObject(message, options) { + PostgresqlColumn.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.mysqlColumns = []; - if (options.defaults) - object.table = ""; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.mysqlColumns && message.mysqlColumns.length) { - object.mysqlColumns = []; - for (var j = 0; j < message.mysqlColumns.length; ++j) - object.mysqlColumns[j] = $root.google.cloud.datastream.v1.MysqlColumn.toObject(message.mysqlColumns[j], options); + if (options.defaults) { + object.column = ""; + object.dataType = ""; + object.length = 0; + object.precision = 0; + object.scale = 0; + object.primaryKey = false; + object.nullable = false; + object.ordinalPosition = 0; } + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.dataType != null && message.hasOwnProperty("dataType")) + object.dataType = message.dataType; + if (message.length != null && message.hasOwnProperty("length")) + object.length = message.length; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = message.precision; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = message.scale; + if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) + object.primaryKey = message.primaryKey; + if (message.nullable != null && message.hasOwnProperty("nullable")) + object.nullable = message.nullable; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + object.ordinalPosition = message.ordinalPosition; return object; }; /** - * Converts this MysqlTable to JSON. + * Converts this PostgresqlColumn to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlTable + * @memberof google.cloud.datastream.v1.PostgresqlColumn * @instance * @returns {Object.} JSON object */ - MysqlTable.prototype.toJSON = function toJSON() { + PostgresqlColumn.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MysqlTable + * Gets the default type url for PostgresqlColumn * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlTable + * @memberof google.cloud.datastream.v1.PostgresqlColumn * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MysqlTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PostgresqlColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlTable"; + return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlColumn"; }; - return MysqlTable; + return PostgresqlColumn; })(); - v1.MysqlDatabase = (function() { + v1.PostgresqlTable = (function() { /** - * Properties of a MysqlDatabase. + * Properties of a PostgresqlTable. * @memberof google.cloud.datastream.v1 - * @interface IMysqlDatabase - * @property {string|null} [database] MysqlDatabase database - * @property {Array.|null} [mysqlTables] MysqlDatabase mysqlTables + * @interface IPostgresqlTable + * @property {string|null} [table] PostgresqlTable table + * @property {Array.|null} [postgresqlColumns] PostgresqlTable postgresqlColumns */ /** - * Constructs a new MysqlDatabase. + * Constructs a new PostgresqlTable. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlDatabase. - * @implements IMysqlDatabase + * @classdesc Represents a PostgresqlTable. + * @implements IPostgresqlTable * @constructor - * @param {google.cloud.datastream.v1.IMysqlDatabase=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IPostgresqlTable=} [properties] Properties to set */ - function MysqlDatabase(properties) { - this.mysqlTables = []; + function PostgresqlTable(properties) { + this.postgresqlColumns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18221,92 +18855,92 @@ } /** - * MysqlDatabase database. - * @member {string} database - * @memberof google.cloud.datastream.v1.MysqlDatabase + * PostgresqlTable table. + * @member {string} table + * @memberof google.cloud.datastream.v1.PostgresqlTable * @instance */ - MysqlDatabase.prototype.database = ""; + PostgresqlTable.prototype.table = ""; /** - * MysqlDatabase mysqlTables. - * @member {Array.} mysqlTables - * @memberof google.cloud.datastream.v1.MysqlDatabase + * PostgresqlTable postgresqlColumns. + * @member {Array.} postgresqlColumns + * @memberof google.cloud.datastream.v1.PostgresqlTable * @instance */ - MysqlDatabase.prototype.mysqlTables = $util.emptyArray; + PostgresqlTable.prototype.postgresqlColumns = $util.emptyArray; /** - * Creates a new MysqlDatabase instance using the specified properties. + * Creates a new PostgresqlTable instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.MysqlDatabase + * @memberof google.cloud.datastream.v1.PostgresqlTable * @static - * @param {google.cloud.datastream.v1.IMysqlDatabase=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase instance + * @param {google.cloud.datastream.v1.IPostgresqlTable=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable instance */ - MysqlDatabase.create = function create(properties) { - return new MysqlDatabase(properties); + PostgresqlTable.create = function create(properties) { + return new PostgresqlTable(properties); }; /** - * Encodes the specified MysqlDatabase message. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. + * Encodes the specified PostgresqlTable message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlTable.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.MysqlDatabase + * @memberof google.cloud.datastream.v1.PostgresqlTable * @static - * @param {google.cloud.datastream.v1.IMysqlDatabase} message MysqlDatabase message or plain object to encode + * @param {google.cloud.datastream.v1.IPostgresqlTable} message PostgresqlTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MysqlDatabase.encode = function encode(message, writer) { + PostgresqlTable.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); - if (message.mysqlTables != null && message.mysqlTables.length) - for (var i = 0; i < message.mysqlTables.length; ++i) - $root.google.cloud.datastream.v1.MysqlTable.encode(message.mysqlTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.postgresqlColumns != null && message.postgresqlColumns.length) + for (var i = 0; i < message.postgresqlColumns.length; ++i) + $root.google.cloud.datastream.v1.PostgresqlColumn.encode(message.postgresqlColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified MysqlDatabase message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. + * Encodes the specified PostgresqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlTable.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlDatabase + * @memberof google.cloud.datastream.v1.PostgresqlTable * @static - * @param {google.cloud.datastream.v1.IMysqlDatabase} message MysqlDatabase message or plain object to encode + * @param {google.cloud.datastream.v1.IPostgresqlTable} message PostgresqlTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MysqlDatabase.encodeDelimited = function encodeDelimited(message, writer) { + PostgresqlTable.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MysqlDatabase message from the specified reader or buffer. + * Decodes a PostgresqlTable message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.MysqlDatabase + * @memberof google.cloud.datastream.v1.PostgresqlTable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase + * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlDatabase.decode = function decode(reader, length) { + PostgresqlTable.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.datastream.v1.MysqlDatabase(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlTable(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.database = reader.string(); + message.table = reader.string(); break; } case 2: { - if (!(message.mysqlTables && message.mysqlTables.length)) - message.mysqlTables = []; - message.mysqlTables.push($root.google.cloud.datastream.v1.MysqlTable.decode(reader, reader.uint32())); + if (!(message.postgresqlColumns && message.postgresqlColumns.length)) + message.postgresqlColumns = []; + message.postgresqlColumns.push($root.google.cloud.datastream.v1.PostgresqlColumn.decode(reader, reader.uint32())); break; } default: @@ -18318,149 +18952,150 @@ }; /** - * Decodes a MysqlDatabase message from the specified reader or buffer, length delimited. + * Decodes a PostgresqlTable message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlDatabase + * @memberof google.cloud.datastream.v1.PostgresqlTable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase + * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlDatabase.decodeDelimited = function decodeDelimited(reader) { + PostgresqlTable.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MysqlDatabase message. + * Verifies a PostgresqlTable message. * @function verify - * @memberof google.cloud.datastream.v1.MysqlDatabase + * @memberof google.cloud.datastream.v1.PostgresqlTable * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MysqlDatabase.verify = function verify(message) { + PostgresqlTable.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.mysqlTables != null && message.hasOwnProperty("mysqlTables")) { - if (!Array.isArray(message.mysqlTables)) - return "mysqlTables: array expected"; - for (var i = 0; i < message.mysqlTables.length; ++i) { - var error = $root.google.cloud.datastream.v1.MysqlTable.verify(message.mysqlTables[i]); + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.postgresqlColumns != null && message.hasOwnProperty("postgresqlColumns")) { + if (!Array.isArray(message.postgresqlColumns)) + return "postgresqlColumns: array expected"; + for (var i = 0; i < message.postgresqlColumns.length; ++i) { + var error = $root.google.cloud.datastream.v1.PostgresqlColumn.verify(message.postgresqlColumns[i]); if (error) - return "mysqlTables." + error; + return "postgresqlColumns." + error; } } return null; }; /** - * Creates a MysqlDatabase message from a plain object. Also converts values to their respective internal types. + * Creates a PostgresqlTable message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlDatabase + * @memberof google.cloud.datastream.v1.PostgresqlTable * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase + * @returns {google.cloud.datastream.v1.PostgresqlTable} PostgresqlTable */ - MysqlDatabase.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlDatabase) + PostgresqlTable.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PostgresqlTable) return object; - var message = new $root.google.cloud.datastream.v1.MysqlDatabase(); - if (object.database != null) - message.database = String(object.database); - if (object.mysqlTables) { - if (!Array.isArray(object.mysqlTables)) - throw TypeError(".google.cloud.datastream.v1.MysqlDatabase.mysqlTables: array expected"); - message.mysqlTables = []; - for (var i = 0; i < object.mysqlTables.length; ++i) { - if (typeof object.mysqlTables[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlDatabase.mysqlTables: object expected"); - message.mysqlTables[i] = $root.google.cloud.datastream.v1.MysqlTable.fromObject(object.mysqlTables[i]); + var message = new $root.google.cloud.datastream.v1.PostgresqlTable(); + if (object.table != null) + message.table = String(object.table); + if (object.postgresqlColumns) { + if (!Array.isArray(object.postgresqlColumns)) + throw TypeError(".google.cloud.datastream.v1.PostgresqlTable.postgresqlColumns: array expected"); + message.postgresqlColumns = []; + for (var i = 0; i < object.postgresqlColumns.length; ++i) { + if (typeof object.postgresqlColumns[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.PostgresqlTable.postgresqlColumns: object expected"); + message.postgresqlColumns[i] = $root.google.cloud.datastream.v1.PostgresqlColumn.fromObject(object.postgresqlColumns[i]); } } return message; }; /** - * Creates a plain object from a MysqlDatabase message. Also converts values to other types if specified. + * Creates a plain object from a PostgresqlTable message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.MysqlDatabase + * @memberof google.cloud.datastream.v1.PostgresqlTable * @static - * @param {google.cloud.datastream.v1.MysqlDatabase} message MysqlDatabase + * @param {google.cloud.datastream.v1.PostgresqlTable} message PostgresqlTable * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MysqlDatabase.toObject = function toObject(message, options) { + PostgresqlTable.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.mysqlTables = []; + object.postgresqlColumns = []; if (options.defaults) - object.database = ""; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.mysqlTables && message.mysqlTables.length) { - object.mysqlTables = []; - for (var j = 0; j < message.mysqlTables.length; ++j) - object.mysqlTables[j] = $root.google.cloud.datastream.v1.MysqlTable.toObject(message.mysqlTables[j], options); + object.table = ""; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.postgresqlColumns && message.postgresqlColumns.length) { + object.postgresqlColumns = []; + for (var j = 0; j < message.postgresqlColumns.length; ++j) + object.postgresqlColumns[j] = $root.google.cloud.datastream.v1.PostgresqlColumn.toObject(message.postgresqlColumns[j], options); } return object; }; /** - * Converts this MysqlDatabase to JSON. + * Converts this PostgresqlTable to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlDatabase + * @memberof google.cloud.datastream.v1.PostgresqlTable * @instance * @returns {Object.} JSON object */ - MysqlDatabase.prototype.toJSON = function toJSON() { + PostgresqlTable.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MysqlDatabase + * Gets the default type url for PostgresqlTable * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlDatabase + * @memberof google.cloud.datastream.v1.PostgresqlTable * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MysqlDatabase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PostgresqlTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlDatabase"; + return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlTable"; }; - return MysqlDatabase; + return PostgresqlTable; })(); - v1.MysqlRdbms = (function() { + v1.PostgresqlSchema = (function() { /** - * Properties of a MysqlRdbms. + * Properties of a PostgresqlSchema. * @memberof google.cloud.datastream.v1 - * @interface IMysqlRdbms - * @property {Array.|null} [mysqlDatabases] MysqlRdbms mysqlDatabases + * @interface IPostgresqlSchema + * @property {string|null} [schema] PostgresqlSchema schema + * @property {Array.|null} [postgresqlTables] PostgresqlSchema postgresqlTables */ /** - * Constructs a new MysqlRdbms. + * Constructs a new PostgresqlSchema. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlRdbms. - * @implements IMysqlRdbms + * @classdesc Represents a PostgresqlSchema. + * @implements IPostgresqlSchema * @constructor - * @param {google.cloud.datastream.v1.IMysqlRdbms=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IPostgresqlSchema=} [properties] Properties to set */ - function MysqlRdbms(properties) { - this.mysqlDatabases = []; + function PostgresqlSchema(properties) { + this.postgresqlTables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18468,78 +19103,92 @@ } /** - * MysqlRdbms mysqlDatabases. - * @member {Array.} mysqlDatabases - * @memberof google.cloud.datastream.v1.MysqlRdbms + * PostgresqlSchema schema. + * @member {string} schema + * @memberof google.cloud.datastream.v1.PostgresqlSchema * @instance */ - MysqlRdbms.prototype.mysqlDatabases = $util.emptyArray; + PostgresqlSchema.prototype.schema = ""; /** - * Creates a new MysqlRdbms instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.MysqlRdbms - * @static - * @param {google.cloud.datastream.v1.IMysqlRdbms=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms instance + * PostgresqlSchema postgresqlTables. + * @member {Array.} postgresqlTables + * @memberof google.cloud.datastream.v1.PostgresqlSchema + * @instance */ - MysqlRdbms.create = function create(properties) { - return new MysqlRdbms(properties); - }; + PostgresqlSchema.prototype.postgresqlTables = $util.emptyArray; /** - * Encodes the specified MysqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.MysqlRdbms + * Creates a new PostgresqlSchema instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.PostgresqlSchema * @static - * @param {google.cloud.datastream.v1.IMysqlRdbms} message MysqlRdbms message or plain object to encode + * @param {google.cloud.datastream.v1.IPostgresqlSchema=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema instance + */ + PostgresqlSchema.create = function create(properties) { + return new PostgresqlSchema(properties); + }; + + /** + * Encodes the specified PostgresqlSchema message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSchema.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.PostgresqlSchema + * @static + * @param {google.cloud.datastream.v1.IPostgresqlSchema} message PostgresqlSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MysqlRdbms.encode = function encode(message, writer) { + PostgresqlSchema.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mysqlDatabases != null && message.mysqlDatabases.length) - for (var i = 0; i < message.mysqlDatabases.length; ++i) - $root.google.cloud.datastream.v1.MysqlDatabase.encode(message.mysqlDatabases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); + if (message.postgresqlTables != null && message.postgresqlTables.length) + for (var i = 0; i < message.postgresqlTables.length; ++i) + $root.google.cloud.datastream.v1.PostgresqlTable.encode(message.postgresqlTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified MysqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. + * Encodes the specified PostgresqlSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSchema.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlRdbms + * @memberof google.cloud.datastream.v1.PostgresqlSchema * @static - * @param {google.cloud.datastream.v1.IMysqlRdbms} message MysqlRdbms message or plain object to encode + * @param {google.cloud.datastream.v1.IPostgresqlSchema} message PostgresqlSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MysqlRdbms.encodeDelimited = function encodeDelimited(message, writer) { + PostgresqlSchema.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MysqlRdbms message from the specified reader or buffer. + * Decodes a PostgresqlSchema message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.MysqlRdbms + * @memberof google.cloud.datastream.v1.PostgresqlSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms + * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlRdbms.decode = function decode(reader, length) { + PostgresqlSchema.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.datastream.v1.MysqlRdbms(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlSchema(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.mysqlDatabases && message.mysqlDatabases.length)) - message.mysqlDatabases = []; - message.mysqlDatabases.push($root.google.cloud.datastream.v1.MysqlDatabase.decode(reader, reader.uint32())); + message.schema = reader.string(); + break; + } + case 2: { + if (!(message.postgresqlTables && message.postgresqlTables.length)) + message.postgresqlTables = []; + message.postgresqlTables.push($root.google.cloud.datastream.v1.PostgresqlTable.decode(reader, reader.uint32())); break; } default: @@ -18551,142 +19200,149 @@ }; /** - * Decodes a MysqlRdbms message from the specified reader or buffer, length delimited. + * Decodes a PostgresqlSchema message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlRdbms + * @memberof google.cloud.datastream.v1.PostgresqlSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms + * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlRdbms.decodeDelimited = function decodeDelimited(reader) { + PostgresqlSchema.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MysqlRdbms message. + * Verifies a PostgresqlSchema message. * @function verify - * @memberof google.cloud.datastream.v1.MysqlRdbms + * @memberof google.cloud.datastream.v1.PostgresqlSchema * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MysqlRdbms.verify = function verify(message) { + PostgresqlSchema.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mysqlDatabases != null && message.hasOwnProperty("mysqlDatabases")) { - if (!Array.isArray(message.mysqlDatabases)) - return "mysqlDatabases: array expected"; - for (var i = 0; i < message.mysqlDatabases.length; ++i) { - var error = $root.google.cloud.datastream.v1.MysqlDatabase.verify(message.mysqlDatabases[i]); + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.postgresqlTables != null && message.hasOwnProperty("postgresqlTables")) { + if (!Array.isArray(message.postgresqlTables)) + return "postgresqlTables: array expected"; + for (var i = 0; i < message.postgresqlTables.length; ++i) { + var error = $root.google.cloud.datastream.v1.PostgresqlTable.verify(message.postgresqlTables[i]); if (error) - return "mysqlDatabases." + error; + return "postgresqlTables." + error; } } return null; }; /** - * Creates a MysqlRdbms message from a plain object. Also converts values to their respective internal types. + * Creates a PostgresqlSchema message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlRdbms + * @memberof google.cloud.datastream.v1.PostgresqlSchema * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms + * @returns {google.cloud.datastream.v1.PostgresqlSchema} PostgresqlSchema */ - MysqlRdbms.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlRdbms) + PostgresqlSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSchema) return object; - var message = new $root.google.cloud.datastream.v1.MysqlRdbms(); - if (object.mysqlDatabases) { - if (!Array.isArray(object.mysqlDatabases)) - throw TypeError(".google.cloud.datastream.v1.MysqlRdbms.mysqlDatabases: array expected"); - message.mysqlDatabases = []; - for (var i = 0; i < object.mysqlDatabases.length; ++i) { - if (typeof object.mysqlDatabases[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlRdbms.mysqlDatabases: object expected"); - message.mysqlDatabases[i] = $root.google.cloud.datastream.v1.MysqlDatabase.fromObject(object.mysqlDatabases[i]); + var message = new $root.google.cloud.datastream.v1.PostgresqlSchema(); + if (object.schema != null) + message.schema = String(object.schema); + if (object.postgresqlTables) { + if (!Array.isArray(object.postgresqlTables)) + throw TypeError(".google.cloud.datastream.v1.PostgresqlSchema.postgresqlTables: array expected"); + message.postgresqlTables = []; + for (var i = 0; i < object.postgresqlTables.length; ++i) { + if (typeof object.postgresqlTables[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.PostgresqlSchema.postgresqlTables: object expected"); + message.postgresqlTables[i] = $root.google.cloud.datastream.v1.PostgresqlTable.fromObject(object.postgresqlTables[i]); } } return message; }; /** - * Creates a plain object from a MysqlRdbms message. Also converts values to other types if specified. + * Creates a plain object from a PostgresqlSchema message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.MysqlRdbms + * @memberof google.cloud.datastream.v1.PostgresqlSchema * @static - * @param {google.cloud.datastream.v1.MysqlRdbms} message MysqlRdbms + * @param {google.cloud.datastream.v1.PostgresqlSchema} message PostgresqlSchema * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MysqlRdbms.toObject = function toObject(message, options) { + PostgresqlSchema.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.mysqlDatabases = []; - if (message.mysqlDatabases && message.mysqlDatabases.length) { - object.mysqlDatabases = []; - for (var j = 0; j < message.mysqlDatabases.length; ++j) - object.mysqlDatabases[j] = $root.google.cloud.datastream.v1.MysqlDatabase.toObject(message.mysqlDatabases[j], options); + object.postgresqlTables = []; + if (options.defaults) + object.schema = ""; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.postgresqlTables && message.postgresqlTables.length) { + object.postgresqlTables = []; + for (var j = 0; j < message.postgresqlTables.length; ++j) + object.postgresqlTables[j] = $root.google.cloud.datastream.v1.PostgresqlTable.toObject(message.postgresqlTables[j], options); } return object; }; /** - * Converts this MysqlRdbms to JSON. + * Converts this PostgresqlSchema to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlRdbms + * @memberof google.cloud.datastream.v1.PostgresqlSchema * @instance * @returns {Object.} JSON object */ - MysqlRdbms.prototype.toJSON = function toJSON() { + PostgresqlSchema.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MysqlRdbms + * Gets the default type url for PostgresqlSchema * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlRdbms + * @memberof google.cloud.datastream.v1.PostgresqlSchema * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MysqlRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PostgresqlSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlRdbms"; + return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSchema"; }; - return MysqlRdbms; + return PostgresqlSchema; })(); - v1.MysqlSourceConfig = (function() { + v1.PostgresqlRdbms = (function() { /** - * Properties of a MysqlSourceConfig. + * Properties of a PostgresqlRdbms. * @memberof google.cloud.datastream.v1 - * @interface IMysqlSourceConfig - * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [includeObjects] MysqlSourceConfig includeObjects - * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [excludeObjects] MysqlSourceConfig excludeObjects - * @property {number|null} [maxConcurrentCdcTasks] MysqlSourceConfig maxConcurrentCdcTasks - * @property {number|null} [maxConcurrentBackfillTasks] MysqlSourceConfig maxConcurrentBackfillTasks + * @interface IPostgresqlRdbms + * @property {Array.|null} [postgresqlSchemas] PostgresqlRdbms postgresqlSchemas */ /** - * Constructs a new MysqlSourceConfig. + * Constructs a new PostgresqlRdbms. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a MysqlSourceConfig. - * @implements IMysqlSourceConfig + * @classdesc Represents a PostgresqlRdbms. + * @implements IPostgresqlRdbms * @constructor - * @param {google.cloud.datastream.v1.IMysqlSourceConfig=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IPostgresqlRdbms=} [properties] Properties to set */ - function MysqlSourceConfig(properties) { + function PostgresqlRdbms(properties) { + this.postgresqlSchemas = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18694,117 +19350,78 @@ } /** - * MysqlSourceConfig includeObjects. - * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} includeObjects - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.includeObjects = null; - - /** - * MysqlSourceConfig excludeObjects. - * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} excludeObjects - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.excludeObjects = null; - - /** - * MysqlSourceConfig maxConcurrentCdcTasks. - * @member {number} maxConcurrentCdcTasks - * @memberof google.cloud.datastream.v1.MysqlSourceConfig - * @instance - */ - MysqlSourceConfig.prototype.maxConcurrentCdcTasks = 0; - - /** - * MysqlSourceConfig maxConcurrentBackfillTasks. - * @member {number} maxConcurrentBackfillTasks - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * PostgresqlRdbms postgresqlSchemas. + * @member {Array.} postgresqlSchemas + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @instance */ - MysqlSourceConfig.prototype.maxConcurrentBackfillTasks = 0; + PostgresqlRdbms.prototype.postgresqlSchemas = $util.emptyArray; /** - * Creates a new MysqlSourceConfig instance using the specified properties. + * Creates a new PostgresqlRdbms instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @static - * @param {google.cloud.datastream.v1.IMysqlSourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig instance + * @param {google.cloud.datastream.v1.IPostgresqlRdbms=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms instance */ - MysqlSourceConfig.create = function create(properties) { - return new MysqlSourceConfig(properties); + PostgresqlRdbms.create = function create(properties) { + return new PostgresqlRdbms(properties); }; /** - * Encodes the specified MysqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. + * Encodes the specified PostgresqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlRdbms.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @static - * @param {google.cloud.datastream.v1.IMysqlSourceConfig} message MysqlSourceConfig message or plain object to encode + * @param {google.cloud.datastream.v1.IPostgresqlRdbms} message PostgresqlRdbms message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MysqlSourceConfig.encode = function encode(message, writer) { + PostgresqlRdbms.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) - $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) - $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.maxConcurrentCdcTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentCdcTasks")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxConcurrentCdcTasks); - if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConcurrentBackfillTasks); + if (message.postgresqlSchemas != null && message.postgresqlSchemas.length) + for (var i = 0; i < message.postgresqlSchemas.length; ++i) + $root.google.cloud.datastream.v1.PostgresqlSchema.encode(message.postgresqlSchemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified MysqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. + * Encodes the specified PostgresqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlRdbms.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @static - * @param {google.cloud.datastream.v1.IMysqlSourceConfig} message MysqlSourceConfig message or plain object to encode + * @param {google.cloud.datastream.v1.IPostgresqlRdbms} message PostgresqlRdbms message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MysqlSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { + PostgresqlRdbms.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer. + * Decodes a PostgresqlRdbms message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig + * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlSourceConfig.decode = function decode(reader, length) { + PostgresqlRdbms.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.datastream.v1.MysqlSourceConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlRdbms(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.includeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - case 2: { - message.excludeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - case 3: { - message.maxConcurrentCdcTasks = reader.int32(); - break; - } - case 4: { - message.maxConcurrentBackfillTasks = reader.int32(); + if (!(message.postgresqlSchemas && message.postgresqlSchemas.length)) + message.postgresqlSchemas = []; + message.postgresqlSchemas.push($root.google.cloud.datastream.v1.PostgresqlSchema.decode(reader, reader.uint32())); break; } default: @@ -18816,160 +19433,143 @@ }; /** - * Decodes a MysqlSourceConfig message from the specified reader or buffer, length delimited. + * Decodes a PostgresqlRdbms message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig + * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MysqlSourceConfig.decodeDelimited = function decodeDelimited(reader) { + PostgresqlRdbms.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MysqlSourceConfig message. + * Verifies a PostgresqlRdbms message. * @function verify - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MysqlSourceConfig.verify = function verify(message) { + PostgresqlRdbms.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { - var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.includeObjects); - if (error) - return "includeObjects." + error; - } - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { - var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.excludeObjects); - if (error) - return "excludeObjects." + error; + if (message.postgresqlSchemas != null && message.hasOwnProperty("postgresqlSchemas")) { + if (!Array.isArray(message.postgresqlSchemas)) + return "postgresqlSchemas: array expected"; + for (var i = 0; i < message.postgresqlSchemas.length; ++i) { + var error = $root.google.cloud.datastream.v1.PostgresqlSchema.verify(message.postgresqlSchemas[i]); + if (error) + return "postgresqlSchemas." + error; + } } - if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) - if (!$util.isInteger(message.maxConcurrentCdcTasks)) - return "maxConcurrentCdcTasks: integer expected"; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - if (!$util.isInteger(message.maxConcurrentBackfillTasks)) - return "maxConcurrentBackfillTasks: integer expected"; return null; }; /** - * Creates a MysqlSourceConfig message from a plain object. Also converts values to their respective internal types. + * Creates a PostgresqlRdbms message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig + * @returns {google.cloud.datastream.v1.PostgresqlRdbms} PostgresqlRdbms */ - MysqlSourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.MysqlSourceConfig) + PostgresqlRdbms.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PostgresqlRdbms) return object; - var message = new $root.google.cloud.datastream.v1.MysqlSourceConfig(); - if (object.includeObjects != null) { - if (typeof object.includeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlSourceConfig.includeObjects: object expected"); - message.includeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.includeObjects); - } - if (object.excludeObjects != null) { - if (typeof object.excludeObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.MysqlSourceConfig.excludeObjects: object expected"); - message.excludeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.excludeObjects); + var message = new $root.google.cloud.datastream.v1.PostgresqlRdbms(); + if (object.postgresqlSchemas) { + if (!Array.isArray(object.postgresqlSchemas)) + throw TypeError(".google.cloud.datastream.v1.PostgresqlRdbms.postgresqlSchemas: array expected"); + message.postgresqlSchemas = []; + for (var i = 0; i < object.postgresqlSchemas.length; ++i) { + if (typeof object.postgresqlSchemas[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.PostgresqlRdbms.postgresqlSchemas: object expected"); + message.postgresqlSchemas[i] = $root.google.cloud.datastream.v1.PostgresqlSchema.fromObject(object.postgresqlSchemas[i]); + } } - if (object.maxConcurrentCdcTasks != null) - message.maxConcurrentCdcTasks = object.maxConcurrentCdcTasks | 0; - if (object.maxConcurrentBackfillTasks != null) - message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; return message; }; /** - * Creates a plain object from a MysqlSourceConfig message. Also converts values to other types if specified. + * Creates a plain object from a PostgresqlRdbms message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @static - * @param {google.cloud.datastream.v1.MysqlSourceConfig} message MysqlSourceConfig + * @param {google.cloud.datastream.v1.PostgresqlRdbms} message PostgresqlRdbms * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MysqlSourceConfig.toObject = function toObject(message, options) { + PostgresqlRdbms.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.includeObjects = null; - object.excludeObjects = null; - object.maxConcurrentCdcTasks = 0; - object.maxConcurrentBackfillTasks = 0; + if (options.arrays || options.defaults) + object.postgresqlSchemas = []; + if (message.postgresqlSchemas && message.postgresqlSchemas.length) { + object.postgresqlSchemas = []; + for (var j = 0; j < message.postgresqlSchemas.length; ++j) + object.postgresqlSchemas[j] = $root.google.cloud.datastream.v1.PostgresqlSchema.toObject(message.postgresqlSchemas[j], options); } - if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) - object.includeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.includeObjects, options); - if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) - object.excludeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.excludeObjects, options); - if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) - object.maxConcurrentCdcTasks = message.maxConcurrentCdcTasks; - if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) - object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; return object; }; /** - * Converts this MysqlSourceConfig to JSON. + * Converts this PostgresqlRdbms to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @instance * @returns {Object.} JSON object */ - MysqlSourceConfig.prototype.toJSON = function toJSON() { + PostgresqlRdbms.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MysqlSourceConfig + * Gets the default type url for PostgresqlRdbms * @function getTypeUrl - * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlRdbms * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MysqlSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PostgresqlRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlSourceConfig"; + return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlRdbms"; }; - return MysqlSourceConfig; + return PostgresqlRdbms; })(); - v1.SourceConfig = (function() { + v1.PostgresqlSourceConfig = (function() { /** - * Properties of a SourceConfig. + * Properties of a PostgresqlSourceConfig. * @memberof google.cloud.datastream.v1 - * @interface ISourceConfig - * @property {string|null} [sourceConnectionProfile] SourceConfig sourceConnectionProfile - * @property {google.cloud.datastream.v1.IOracleSourceConfig|null} [oracleSourceConfig] SourceConfig oracleSourceConfig - * @property {google.cloud.datastream.v1.IMysqlSourceConfig|null} [mysqlSourceConfig] SourceConfig mysqlSourceConfig - * @property {google.cloud.datastream.v1.IPostgresqlSourceConfig|null} [postgresqlSourceConfig] SourceConfig postgresqlSourceConfig + * @interface IPostgresqlSourceConfig + * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [includeObjects] PostgresqlSourceConfig includeObjects + * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [excludeObjects] PostgresqlSourceConfig excludeObjects + * @property {string|null} [replicationSlot] PostgresqlSourceConfig replicationSlot + * @property {string|null} [publication] PostgresqlSourceConfig publication + * @property {number|null} [maxConcurrentBackfillTasks] PostgresqlSourceConfig maxConcurrentBackfillTasks */ /** - * Constructs a new SourceConfig. + * Constructs a new PostgresqlSourceConfig. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SourceConfig. - * @implements ISourceConfig + * @classdesc Represents a PostgresqlSourceConfig. + * @implements IPostgresqlSourceConfig * @constructor - * @param {google.cloud.datastream.v1.ISourceConfig=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig=} [properties] Properties to set */ - function SourceConfig(properties) { + function PostgresqlSourceConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18977,131 +19577,131 @@ } /** - * SourceConfig sourceConnectionProfile. - * @member {string} sourceConnectionProfile - * @memberof google.cloud.datastream.v1.SourceConfig + * PostgresqlSourceConfig includeObjects. + * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} includeObjects + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @instance */ - SourceConfig.prototype.sourceConnectionProfile = ""; + PostgresqlSourceConfig.prototype.includeObjects = null; /** - * SourceConfig oracleSourceConfig. - * @member {google.cloud.datastream.v1.IOracleSourceConfig|null|undefined} oracleSourceConfig - * @memberof google.cloud.datastream.v1.SourceConfig + * PostgresqlSourceConfig excludeObjects. + * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} excludeObjects + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @instance */ - SourceConfig.prototype.oracleSourceConfig = null; + PostgresqlSourceConfig.prototype.excludeObjects = null; /** - * SourceConfig mysqlSourceConfig. - * @member {google.cloud.datastream.v1.IMysqlSourceConfig|null|undefined} mysqlSourceConfig - * @memberof google.cloud.datastream.v1.SourceConfig + * PostgresqlSourceConfig replicationSlot. + * @member {string} replicationSlot + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @instance */ - SourceConfig.prototype.mysqlSourceConfig = null; + PostgresqlSourceConfig.prototype.replicationSlot = ""; /** - * SourceConfig postgresqlSourceConfig. - * @member {google.cloud.datastream.v1.IPostgresqlSourceConfig|null|undefined} postgresqlSourceConfig - * @memberof google.cloud.datastream.v1.SourceConfig + * PostgresqlSourceConfig publication. + * @member {string} publication + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @instance */ - SourceConfig.prototype.postgresqlSourceConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + PostgresqlSourceConfig.prototype.publication = ""; /** - * SourceConfig sourceStreamConfig. - * @member {"oracleSourceConfig"|"mysqlSourceConfig"|"postgresqlSourceConfig"|undefined} sourceStreamConfig - * @memberof google.cloud.datastream.v1.SourceConfig + * PostgresqlSourceConfig maxConcurrentBackfillTasks. + * @member {number} maxConcurrentBackfillTasks + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @instance */ - Object.defineProperty(SourceConfig.prototype, "sourceStreamConfig", { - get: $util.oneOfGetter($oneOfFields = ["oracleSourceConfig", "mysqlSourceConfig", "postgresqlSourceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + PostgresqlSourceConfig.prototype.maxConcurrentBackfillTasks = 0; /** - * Creates a new SourceConfig instance using the specified properties. + * Creates a new PostgresqlSourceConfig instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.SourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @static - * @param {google.cloud.datastream.v1.ISourceConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig instance + * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig instance */ - SourceConfig.create = function create(properties) { - return new SourceConfig(properties); + PostgresqlSourceConfig.create = function create(properties) { + return new PostgresqlSourceConfig(properties); }; /** - * Encodes the specified SourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. + * Encodes the specified PostgresqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSourceConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.SourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @static - * @param {google.cloud.datastream.v1.ISourceConfig} message SourceConfig message or plain object to encode + * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig} message PostgresqlSourceConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceConfig.encode = function encode(message, writer) { + PostgresqlSourceConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sourceConnectionProfile != null && Object.hasOwnProperty.call(message, "sourceConnectionProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceConnectionProfile); - if (message.oracleSourceConfig != null && Object.hasOwnProperty.call(message, "oracleSourceConfig")) - $root.google.cloud.datastream.v1.OracleSourceConfig.encode(message.oracleSourceConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.mysqlSourceConfig != null && Object.hasOwnProperty.call(message, "mysqlSourceConfig")) - $root.google.cloud.datastream.v1.MysqlSourceConfig.encode(message.mysqlSourceConfig, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.postgresqlSourceConfig != null && Object.hasOwnProperty.call(message, "postgresqlSourceConfig")) - $root.google.cloud.datastream.v1.PostgresqlSourceConfig.encode(message.postgresqlSourceConfig, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) + $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) + $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.replicationSlot != null && Object.hasOwnProperty.call(message, "replicationSlot")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.replicationSlot); + if (message.publication != null && Object.hasOwnProperty.call(message, "publication")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.publication); + if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxConcurrentBackfillTasks); return writer; }; /** - * Encodes the specified SourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. + * Encodes the specified PostgresqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.PostgresqlSourceConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @static - * @param {google.cloud.datastream.v1.ISourceConfig} message SourceConfig message or plain object to encode + * @param {google.cloud.datastream.v1.IPostgresqlSourceConfig} message PostgresqlSourceConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceConfig.encodeDelimited = function encodeDelimited(message, writer) { + PostgresqlSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceConfig message from the specified reader or buffer. + * Decodes a PostgresqlSourceConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.SourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig + * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceConfig.decode = function decode(reader, length) { + PostgresqlSourceConfig.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.datastream.v1.SourceConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.PostgresqlSourceConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.sourceConnectionProfile = reader.string(); + message.includeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); break; } - case 100: { - message.oracleSourceConfig = $root.google.cloud.datastream.v1.OracleSourceConfig.decode(reader, reader.uint32()); + case 2: { + message.excludeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); break; } - case 101: { - message.mysqlSourceConfig = $root.google.cloud.datastream.v1.MysqlSourceConfig.decode(reader, reader.uint32()); + case 3: { + message.replicationSlot = reader.string(); break; } - case 102: { - message.postgresqlSourceConfig = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.decode(reader, reader.uint32()); + case 4: { + message.publication = reader.string(); + break; + } + case 5: { + message.maxConcurrentBackfillTasks = reader.int32(); break; } default: @@ -19113,180 +19713,172 @@ }; /** - * Decodes a SourceConfig message from the specified reader or buffer, length delimited. + * Decodes a PostgresqlSourceConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig + * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceConfig.decodeDelimited = function decodeDelimited(reader) { + PostgresqlSourceConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceConfig message. + * Verifies a PostgresqlSourceConfig message. * @function verify - * @memberof google.cloud.datastream.v1.SourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceConfig.verify = function verify(message) { + PostgresqlSourceConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.sourceConnectionProfile != null && message.hasOwnProperty("sourceConnectionProfile")) - if (!$util.isString(message.sourceConnectionProfile)) - return "sourceConnectionProfile: string expected"; - if (message.oracleSourceConfig != null && message.hasOwnProperty("oracleSourceConfig")) { - properties.sourceStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.OracleSourceConfig.verify(message.oracleSourceConfig); - if (error) - return "oracleSourceConfig." + error; - } - } - if (message.mysqlSourceConfig != null && message.hasOwnProperty("mysqlSourceConfig")) { - if (properties.sourceStreamConfig === 1) - return "sourceStreamConfig: multiple values"; - properties.sourceStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlSourceConfig.verify(message.mysqlSourceConfig); - if (error) - return "mysqlSourceConfig." + error; - } + if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { + var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.includeObjects); + if (error) + return "includeObjects." + error; } - if (message.postgresqlSourceConfig != null && message.hasOwnProperty("postgresqlSourceConfig")) { - if (properties.sourceStreamConfig === 1) - return "sourceStreamConfig: multiple values"; - properties.sourceStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.verify(message.postgresqlSourceConfig); - if (error) - return "postgresqlSourceConfig." + error; - } + if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { + var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.excludeObjects); + if (error) + return "excludeObjects." + error; } + if (message.replicationSlot != null && message.hasOwnProperty("replicationSlot")) + if (!$util.isString(message.replicationSlot)) + return "replicationSlot: string expected"; + if (message.publication != null && message.hasOwnProperty("publication")) + if (!$util.isString(message.publication)) + return "publication: string expected"; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + if (!$util.isInteger(message.maxConcurrentBackfillTasks)) + return "maxConcurrentBackfillTasks: integer expected"; return null; }; /** - * Creates a SourceConfig message from a plain object. Also converts values to their respective internal types. + * Creates a PostgresqlSourceConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.SourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig + * @returns {google.cloud.datastream.v1.PostgresqlSourceConfig} PostgresqlSourceConfig */ - SourceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceConfig) + PostgresqlSourceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.PostgresqlSourceConfig) return object; - var message = new $root.google.cloud.datastream.v1.SourceConfig(); - if (object.sourceConnectionProfile != null) - message.sourceConnectionProfile = String(object.sourceConnectionProfile); - if (object.oracleSourceConfig != null) { - if (typeof object.oracleSourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceConfig.oracleSourceConfig: object expected"); - message.oracleSourceConfig = $root.google.cloud.datastream.v1.OracleSourceConfig.fromObject(object.oracleSourceConfig); - } - if (object.mysqlSourceConfig != null) { - if (typeof object.mysqlSourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceConfig.mysqlSourceConfig: object expected"); - message.mysqlSourceConfig = $root.google.cloud.datastream.v1.MysqlSourceConfig.fromObject(object.mysqlSourceConfig); + var message = new $root.google.cloud.datastream.v1.PostgresqlSourceConfig(); + if (object.includeObjects != null) { + if (typeof object.includeObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.PostgresqlSourceConfig.includeObjects: object expected"); + message.includeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.includeObjects); } - if (object.postgresqlSourceConfig != null) { - if (typeof object.postgresqlSourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceConfig.postgresqlSourceConfig: object expected"); - message.postgresqlSourceConfig = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.fromObject(object.postgresqlSourceConfig); + if (object.excludeObjects != null) { + if (typeof object.excludeObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.PostgresqlSourceConfig.excludeObjects: object expected"); + message.excludeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.excludeObjects); } + if (object.replicationSlot != null) + message.replicationSlot = String(object.replicationSlot); + if (object.publication != null) + message.publication = String(object.publication); + if (object.maxConcurrentBackfillTasks != null) + message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; return message; }; /** - * Creates a plain object from a SourceConfig message. Also converts values to other types if specified. + * Creates a plain object from a PostgresqlSourceConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.SourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @static - * @param {google.cloud.datastream.v1.SourceConfig} message SourceConfig + * @param {google.cloud.datastream.v1.PostgresqlSourceConfig} message PostgresqlSourceConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceConfig.toObject = function toObject(message, options) { + PostgresqlSourceConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.sourceConnectionProfile = ""; - if (message.sourceConnectionProfile != null && message.hasOwnProperty("sourceConnectionProfile")) - object.sourceConnectionProfile = message.sourceConnectionProfile; - if (message.oracleSourceConfig != null && message.hasOwnProperty("oracleSourceConfig")) { - object.oracleSourceConfig = $root.google.cloud.datastream.v1.OracleSourceConfig.toObject(message.oracleSourceConfig, options); - if (options.oneofs) - object.sourceStreamConfig = "oracleSourceConfig"; - } - if (message.mysqlSourceConfig != null && message.hasOwnProperty("mysqlSourceConfig")) { - object.mysqlSourceConfig = $root.google.cloud.datastream.v1.MysqlSourceConfig.toObject(message.mysqlSourceConfig, options); - if (options.oneofs) - object.sourceStreamConfig = "mysqlSourceConfig"; - } - if (message.postgresqlSourceConfig != null && message.hasOwnProperty("postgresqlSourceConfig")) { - object.postgresqlSourceConfig = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.toObject(message.postgresqlSourceConfig, options); - if (options.oneofs) - object.sourceStreamConfig = "postgresqlSourceConfig"; + if (options.defaults) { + object.includeObjects = null; + object.excludeObjects = null; + object.replicationSlot = ""; + object.publication = ""; + object.maxConcurrentBackfillTasks = 0; } + if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) + object.includeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.includeObjects, options); + if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) + object.excludeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.excludeObjects, options); + if (message.replicationSlot != null && message.hasOwnProperty("replicationSlot")) + object.replicationSlot = message.replicationSlot; + if (message.publication != null && message.hasOwnProperty("publication")) + object.publication = message.publication; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; return object; }; /** - * Converts this SourceConfig to JSON. + * Converts this PostgresqlSourceConfig to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.SourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @instance * @returns {Object.} JSON object */ - SourceConfig.prototype.toJSON = function toJSON() { + PostgresqlSourceConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SourceConfig + * Gets the default type url for PostgresqlSourceConfig * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceConfig + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PostgresqlSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceConfig"; + return typeUrlPrefix + "/google.cloud.datastream.v1.PostgresqlSourceConfig"; }; - return SourceConfig; + return PostgresqlSourceConfig; })(); - v1.AvroFileFormat = (function() { + v1.SqlServerColumn = (function() { /** - * Properties of an AvroFileFormat. + * Properties of a SqlServerColumn. * @memberof google.cloud.datastream.v1 - * @interface IAvroFileFormat + * @interface ISqlServerColumn + * @property {string|null} [column] SqlServerColumn column + * @property {string|null} [dataType] SqlServerColumn dataType + * @property {number|null} [length] SqlServerColumn length + * @property {number|null} [precision] SqlServerColumn precision + * @property {number|null} [scale] SqlServerColumn scale + * @property {boolean|null} [primaryKey] SqlServerColumn primaryKey + * @property {boolean|null} [nullable] SqlServerColumn nullable + * @property {number|null} [ordinalPosition] SqlServerColumn ordinalPosition */ /** - * Constructs a new AvroFileFormat. + * Constructs a new SqlServerColumn. * @memberof google.cloud.datastream.v1 - * @classdesc Represents an AvroFileFormat. - * @implements IAvroFileFormat + * @classdesc Represents a SqlServerColumn. + * @implements ISqlServerColumn * @constructor - * @param {google.cloud.datastream.v1.IAvroFileFormat=} [properties] Properties to set + * @param {google.cloud.datastream.v1.ISqlServerColumn=} [properties] Properties to set */ - function AvroFileFormat(properties) { + function SqlServerColumn(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19294,63 +19886,175 @@ } /** - * Creates a new AvroFileFormat instance using the specified properties. + * SqlServerColumn column. + * @member {string} column + * @memberof google.cloud.datastream.v1.SqlServerColumn + * @instance + */ + SqlServerColumn.prototype.column = ""; + + /** + * SqlServerColumn dataType. + * @member {string} dataType + * @memberof google.cloud.datastream.v1.SqlServerColumn + * @instance + */ + SqlServerColumn.prototype.dataType = ""; + + /** + * SqlServerColumn length. + * @member {number} length + * @memberof google.cloud.datastream.v1.SqlServerColumn + * @instance + */ + SqlServerColumn.prototype.length = 0; + + /** + * SqlServerColumn precision. + * @member {number} precision + * @memberof google.cloud.datastream.v1.SqlServerColumn + * @instance + */ + SqlServerColumn.prototype.precision = 0; + + /** + * SqlServerColumn scale. + * @member {number} scale + * @memberof google.cloud.datastream.v1.SqlServerColumn + * @instance + */ + SqlServerColumn.prototype.scale = 0; + + /** + * SqlServerColumn primaryKey. + * @member {boolean} primaryKey + * @memberof google.cloud.datastream.v1.SqlServerColumn + * @instance + */ + SqlServerColumn.prototype.primaryKey = false; + + /** + * SqlServerColumn nullable. + * @member {boolean} nullable + * @memberof google.cloud.datastream.v1.SqlServerColumn + * @instance + */ + SqlServerColumn.prototype.nullable = false; + + /** + * SqlServerColumn ordinalPosition. + * @member {number} ordinalPosition + * @memberof google.cloud.datastream.v1.SqlServerColumn + * @instance + */ + SqlServerColumn.prototype.ordinalPosition = 0; + + /** + * Creates a new SqlServerColumn instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.AvroFileFormat + * @memberof google.cloud.datastream.v1.SqlServerColumn * @static - * @param {google.cloud.datastream.v1.IAvroFileFormat=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat instance + * @param {google.cloud.datastream.v1.ISqlServerColumn=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SqlServerColumn} SqlServerColumn instance */ - AvroFileFormat.create = function create(properties) { - return new AvroFileFormat(properties); + SqlServerColumn.create = function create(properties) { + return new SqlServerColumn(properties); }; /** - * Encodes the specified AvroFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. + * Encodes the specified SqlServerColumn message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerColumn.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.AvroFileFormat + * @memberof google.cloud.datastream.v1.SqlServerColumn * @static - * @param {google.cloud.datastream.v1.IAvroFileFormat} message AvroFileFormat message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerColumn} message SqlServerColumn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AvroFileFormat.encode = function encode(message, writer) { + SqlServerColumn.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); + if (message.length != null && Object.hasOwnProperty.call(message, "length")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); + if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.precision); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scale); + if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.primaryKey); + if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.nullable); + if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.ordinalPosition); return writer; }; /** - * Encodes the specified AvroFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. + * Encodes the specified SqlServerColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerColumn.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.AvroFileFormat + * @memberof google.cloud.datastream.v1.SqlServerColumn * @static - * @param {google.cloud.datastream.v1.IAvroFileFormat} message AvroFileFormat message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerColumn} message SqlServerColumn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AvroFileFormat.encodeDelimited = function encodeDelimited(message, writer) { + SqlServerColumn.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AvroFileFormat message from the specified reader or buffer. + * Decodes a SqlServerColumn message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.AvroFileFormat + * @memberof google.cloud.datastream.v1.SqlServerColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat + * @returns {google.cloud.datastream.v1.SqlServerColumn} SqlServerColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AvroFileFormat.decode = function decode(reader, length) { + SqlServerColumn.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.datastream.v1.AvroFileFormat(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerColumn(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.column = reader.string(); + break; + } + case 2: { + message.dataType = reader.string(); + break; + } + case 3: { + message.length = reader.int32(); + break; + } + case 4: { + message.precision = reader.int32(); + break; + } + case 5: { + message.scale = reader.int32(); + break; + } + case 6: { + message.primaryKey = reader.bool(); + break; + } + case 7: { + message.nullable = reader.bool(); + break; + } + case 8: { + message.ordinalPosition = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -19360,110 +20064,181 @@ }; /** - * Decodes an AvroFileFormat message from the specified reader or buffer, length delimited. + * Decodes a SqlServerColumn message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.AvroFileFormat + * @memberof google.cloud.datastream.v1.SqlServerColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat + * @returns {google.cloud.datastream.v1.SqlServerColumn} SqlServerColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AvroFileFormat.decodeDelimited = function decodeDelimited(reader) { + SqlServerColumn.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AvroFileFormat message. + * Verifies a SqlServerColumn message. * @function verify - * @memberof google.cloud.datastream.v1.AvroFileFormat + * @memberof google.cloud.datastream.v1.SqlServerColumn * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AvroFileFormat.verify = function verify(message) { + SqlServerColumn.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.dataType != null && message.hasOwnProperty("dataType")) + if (!$util.isString(message.dataType)) + return "dataType: string expected"; + if (message.length != null && message.hasOwnProperty("length")) + if (!$util.isInteger(message.length)) + return "length: integer expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (!$util.isInteger(message.precision)) + return "precision: integer expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (!$util.isInteger(message.scale)) + return "scale: integer expected"; + if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) + if (typeof message.primaryKey !== "boolean") + return "primaryKey: boolean expected"; + if (message.nullable != null && message.hasOwnProperty("nullable")) + if (typeof message.nullable !== "boolean") + return "nullable: boolean expected"; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + if (!$util.isInteger(message.ordinalPosition)) + return "ordinalPosition: integer expected"; return null; }; /** - * Creates an AvroFileFormat message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerColumn message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.AvroFileFormat + * @memberof google.cloud.datastream.v1.SqlServerColumn * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat + * @returns {google.cloud.datastream.v1.SqlServerColumn} SqlServerColumn */ - AvroFileFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.AvroFileFormat) + SqlServerColumn.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SqlServerColumn) return object; - return new $root.google.cloud.datastream.v1.AvroFileFormat(); + var message = new $root.google.cloud.datastream.v1.SqlServerColumn(); + if (object.column != null) + message.column = String(object.column); + if (object.dataType != null) + message.dataType = String(object.dataType); + if (object.length != null) + message.length = object.length | 0; + if (object.precision != null) + message.precision = object.precision | 0; + if (object.scale != null) + message.scale = object.scale | 0; + if (object.primaryKey != null) + message.primaryKey = Boolean(object.primaryKey); + if (object.nullable != null) + message.nullable = Boolean(object.nullable); + if (object.ordinalPosition != null) + message.ordinalPosition = object.ordinalPosition | 0; + return message; }; /** - * Creates a plain object from an AvroFileFormat message. Also converts values to other types if specified. + * Creates a plain object from a SqlServerColumn message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.AvroFileFormat + * @memberof google.cloud.datastream.v1.SqlServerColumn * @static - * @param {google.cloud.datastream.v1.AvroFileFormat} message AvroFileFormat + * @param {google.cloud.datastream.v1.SqlServerColumn} message SqlServerColumn * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AvroFileFormat.toObject = function toObject() { - return {}; + SqlServerColumn.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.column = ""; + object.dataType = ""; + object.length = 0; + object.precision = 0; + object.scale = 0; + object.primaryKey = false; + object.nullable = false; + object.ordinalPosition = 0; + } + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.dataType != null && message.hasOwnProperty("dataType")) + object.dataType = message.dataType; + if (message.length != null && message.hasOwnProperty("length")) + object.length = message.length; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = message.precision; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = message.scale; + if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) + object.primaryKey = message.primaryKey; + if (message.nullable != null && message.hasOwnProperty("nullable")) + object.nullable = message.nullable; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + object.ordinalPosition = message.ordinalPosition; + return object; }; /** - * Converts this AvroFileFormat to JSON. + * Converts this SqlServerColumn to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.AvroFileFormat + * @memberof google.cloud.datastream.v1.SqlServerColumn * @instance * @returns {Object.} JSON object */ - AvroFileFormat.prototype.toJSON = function toJSON() { + SqlServerColumn.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AvroFileFormat + * Gets the default type url for SqlServerColumn * @function getTypeUrl - * @memberof google.cloud.datastream.v1.AvroFileFormat + * @memberof google.cloud.datastream.v1.SqlServerColumn * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AvroFileFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SqlServerColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.AvroFileFormat"; + return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerColumn"; }; - return AvroFileFormat; + return SqlServerColumn; })(); - v1.JsonFileFormat = (function() { + v1.SqlServerTable = (function() { /** - * Properties of a JsonFileFormat. + * Properties of a SqlServerTable. * @memberof google.cloud.datastream.v1 - * @interface IJsonFileFormat - * @property {google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|null} [schemaFileFormat] JsonFileFormat schemaFileFormat - * @property {google.cloud.datastream.v1.JsonFileFormat.JsonCompression|null} [compression] JsonFileFormat compression + * @interface ISqlServerTable + * @property {string|null} [table] SqlServerTable table + * @property {Array.|null} [columns] SqlServerTable columns */ /** - * Constructs a new JsonFileFormat. + * Constructs a new SqlServerTable. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a JsonFileFormat. - * @implements IJsonFileFormat + * @classdesc Represents a SqlServerTable. + * @implements ISqlServerTable * @constructor - * @param {google.cloud.datastream.v1.IJsonFileFormat=} [properties] Properties to set + * @param {google.cloud.datastream.v1.ISqlServerTable=} [properties] Properties to set */ - function JsonFileFormat(properties) { + function SqlServerTable(properties) { + this.columns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19471,89 +20246,92 @@ } /** - * JsonFileFormat schemaFileFormat. - * @member {google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat} schemaFileFormat - * @memberof google.cloud.datastream.v1.JsonFileFormat + * SqlServerTable table. + * @member {string} table + * @memberof google.cloud.datastream.v1.SqlServerTable * @instance */ - JsonFileFormat.prototype.schemaFileFormat = 0; + SqlServerTable.prototype.table = ""; /** - * JsonFileFormat compression. - * @member {google.cloud.datastream.v1.JsonFileFormat.JsonCompression} compression - * @memberof google.cloud.datastream.v1.JsonFileFormat + * SqlServerTable columns. + * @member {Array.} columns + * @memberof google.cloud.datastream.v1.SqlServerTable * @instance */ - JsonFileFormat.prototype.compression = 0; + SqlServerTable.prototype.columns = $util.emptyArray; /** - * Creates a new JsonFileFormat instance using the specified properties. + * Creates a new SqlServerTable instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.JsonFileFormat + * @memberof google.cloud.datastream.v1.SqlServerTable * @static - * @param {google.cloud.datastream.v1.IJsonFileFormat=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat instance + * @param {google.cloud.datastream.v1.ISqlServerTable=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SqlServerTable} SqlServerTable instance */ - JsonFileFormat.create = function create(properties) { - return new JsonFileFormat(properties); + SqlServerTable.create = function create(properties) { + return new SqlServerTable(properties); }; /** - * Encodes the specified JsonFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. + * Encodes the specified SqlServerTable message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTable.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.JsonFileFormat + * @memberof google.cloud.datastream.v1.SqlServerTable * @static - * @param {google.cloud.datastream.v1.IJsonFileFormat} message JsonFileFormat message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerTable} message SqlServerTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JsonFileFormat.encode = function encode(message, writer) { + SqlServerTable.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.schemaFileFormat != null && Object.hasOwnProperty.call(message, "schemaFileFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.schemaFileFormat); - if (message.compression != null && Object.hasOwnProperty.call(message, "compression")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compression); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.datastream.v1.SqlServerColumn.encode(message.columns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified JsonFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. + * Encodes the specified SqlServerTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTable.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.JsonFileFormat + * @memberof google.cloud.datastream.v1.SqlServerTable * @static - * @param {google.cloud.datastream.v1.IJsonFileFormat} message JsonFileFormat message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerTable} message SqlServerTable message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JsonFileFormat.encodeDelimited = function encodeDelimited(message, writer) { + SqlServerTable.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JsonFileFormat message from the specified reader or buffer. + * Decodes a SqlServerTable message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.JsonFileFormat + * @memberof google.cloud.datastream.v1.SqlServerTable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat + * @returns {google.cloud.datastream.v1.SqlServerTable} SqlServerTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JsonFileFormat.decode = function decode(reader, length) { + SqlServerTable.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.datastream.v1.JsonFileFormat(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerTable(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.schemaFileFormat = reader.int32(); + message.table = reader.string(); break; } case 2: { - message.compression = reader.int32(); + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.datastream.v1.SqlServerColumn.decode(reader, reader.uint32())); break; } default: @@ -19565,215 +20343,150 @@ }; /** - * Decodes a JsonFileFormat message from the specified reader or buffer, length delimited. + * Decodes a SqlServerTable message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.JsonFileFormat + * @memberof google.cloud.datastream.v1.SqlServerTable * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat + * @returns {google.cloud.datastream.v1.SqlServerTable} SqlServerTable * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JsonFileFormat.decodeDelimited = function decodeDelimited(reader) { + SqlServerTable.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a JsonFileFormat message. + * Verifies a SqlServerTable message. * @function verify - * @memberof google.cloud.datastream.v1.JsonFileFormat + * @memberof google.cloud.datastream.v1.SqlServerTable * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - JsonFileFormat.verify = function verify(message) { + SqlServerTable.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schemaFileFormat != null && message.hasOwnProperty("schemaFileFormat")) - switch (message.schemaFileFormat) { - default: - return "schemaFileFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.compression != null && message.hasOwnProperty("compression")) - switch (message.compression) { - default: - return "compression: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.datastream.v1.SqlServerColumn.verify(message.columns[i]); + if (error) + return "columns." + error; } + } return null; }; /** - * Creates a JsonFileFormat message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerTable message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.JsonFileFormat + * @memberof google.cloud.datastream.v1.SqlServerTable * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat + * @returns {google.cloud.datastream.v1.SqlServerTable} SqlServerTable */ - JsonFileFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.JsonFileFormat) + SqlServerTable.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SqlServerTable) return object; - var message = new $root.google.cloud.datastream.v1.JsonFileFormat(); - switch (object.schemaFileFormat) { - default: - if (typeof object.schemaFileFormat === "number") { - message.schemaFileFormat = object.schemaFileFormat; - break; - } - break; - case "SCHEMA_FILE_FORMAT_UNSPECIFIED": - case 0: - message.schemaFileFormat = 0; - break; - case "NO_SCHEMA_FILE": - case 1: - message.schemaFileFormat = 1; - break; - case "AVRO_SCHEMA_FILE": - case 2: - message.schemaFileFormat = 2; - break; - } - switch (object.compression) { - default: - if (typeof object.compression === "number") { - message.compression = object.compression; - break; + var message = new $root.google.cloud.datastream.v1.SqlServerTable(); + if (object.table != null) + message.table = String(object.table); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.datastream.v1.SqlServerTable.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.SqlServerTable.columns: object expected"); + message.columns[i] = $root.google.cloud.datastream.v1.SqlServerColumn.fromObject(object.columns[i]); } - break; - case "JSON_COMPRESSION_UNSPECIFIED": - case 0: - message.compression = 0; - break; - case "NO_COMPRESSION": - case 1: - message.compression = 1; - break; - case "GZIP": - case 2: - message.compression = 2; - break; } return message; }; /** - * Creates a plain object from a JsonFileFormat message. Also converts values to other types if specified. + * Creates a plain object from a SqlServerTable message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.JsonFileFormat + * @memberof google.cloud.datastream.v1.SqlServerTable * @static - * @param {google.cloud.datastream.v1.JsonFileFormat} message JsonFileFormat + * @param {google.cloud.datastream.v1.SqlServerTable} message SqlServerTable * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JsonFileFormat.toObject = function toObject(message, options) { + SqlServerTable.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.schemaFileFormat = options.enums === String ? "SCHEMA_FILE_FORMAT_UNSPECIFIED" : 0; - object.compression = options.enums === String ? "JSON_COMPRESSION_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) + object.columns = []; + if (options.defaults) + object.table = ""; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.datastream.v1.SqlServerColumn.toObject(message.columns[j], options); } - if (message.schemaFileFormat != null && message.hasOwnProperty("schemaFileFormat")) - object.schemaFileFormat = options.enums === String ? $root.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat[message.schemaFileFormat] === undefined ? message.schemaFileFormat : $root.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat[message.schemaFileFormat] : message.schemaFileFormat; - if (message.compression != null && message.hasOwnProperty("compression")) - object.compression = options.enums === String ? $root.google.cloud.datastream.v1.JsonFileFormat.JsonCompression[message.compression] === undefined ? message.compression : $root.google.cloud.datastream.v1.JsonFileFormat.JsonCompression[message.compression] : message.compression; return object; }; /** - * Converts this JsonFileFormat to JSON. + * Converts this SqlServerTable to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.JsonFileFormat + * @memberof google.cloud.datastream.v1.SqlServerTable * @instance * @returns {Object.} JSON object */ - JsonFileFormat.prototype.toJSON = function toJSON() { + SqlServerTable.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for JsonFileFormat + * Gets the default type url for SqlServerTable * @function getTypeUrl - * @memberof google.cloud.datastream.v1.JsonFileFormat + * @memberof google.cloud.datastream.v1.SqlServerTable * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - JsonFileFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SqlServerTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.JsonFileFormat"; + return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerTable"; }; - /** - * SchemaFileFormat enum. - * @name google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat - * @enum {number} - * @property {number} SCHEMA_FILE_FORMAT_UNSPECIFIED=0 SCHEMA_FILE_FORMAT_UNSPECIFIED value - * @property {number} NO_SCHEMA_FILE=1 NO_SCHEMA_FILE value - * @property {number} AVRO_SCHEMA_FILE=2 AVRO_SCHEMA_FILE value - */ - JsonFileFormat.SchemaFileFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCHEMA_FILE_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_SCHEMA_FILE"] = 1; - values[valuesById[2] = "AVRO_SCHEMA_FILE"] = 2; - return values; - })(); - - /** - * JsonCompression enum. - * @name google.cloud.datastream.v1.JsonFileFormat.JsonCompression - * @enum {number} - * @property {number} JSON_COMPRESSION_UNSPECIFIED=0 JSON_COMPRESSION_UNSPECIFIED value - * @property {number} NO_COMPRESSION=1 NO_COMPRESSION value - * @property {number} GZIP=2 GZIP value - */ - JsonFileFormat.JsonCompression = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_COMPRESSION_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_COMPRESSION"] = 1; - values[valuesById[2] = "GZIP"] = 2; - return values; - })(); - - return JsonFileFormat; + return SqlServerTable; })(); - v1.GcsDestinationConfig = (function() { + v1.SqlServerSchema = (function() { /** - * Properties of a GcsDestinationConfig. + * Properties of a SqlServerSchema. * @memberof google.cloud.datastream.v1 - * @interface IGcsDestinationConfig - * @property {string|null} [path] GcsDestinationConfig path - * @property {number|null} [fileRotationMb] GcsDestinationConfig fileRotationMb - * @property {google.protobuf.IDuration|null} [fileRotationInterval] GcsDestinationConfig fileRotationInterval - * @property {google.cloud.datastream.v1.IAvroFileFormat|null} [avroFileFormat] GcsDestinationConfig avroFileFormat - * @property {google.cloud.datastream.v1.IJsonFileFormat|null} [jsonFileFormat] GcsDestinationConfig jsonFileFormat + * @interface ISqlServerSchema + * @property {string|null} [schema] SqlServerSchema schema + * @property {Array.|null} [tables] SqlServerSchema tables */ /** - * Constructs a new GcsDestinationConfig. + * Constructs a new SqlServerSchema. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a GcsDestinationConfig. - * @implements IGcsDestinationConfig + * @classdesc Represents a SqlServerSchema. + * @implements ISqlServerSchema * @constructor - * @param {google.cloud.datastream.v1.IGcsDestinationConfig=} [properties] Properties to set + * @param {google.cloud.datastream.v1.ISqlServerSchema=} [properties] Properties to set */ - function GcsDestinationConfig(properties) { + function SqlServerSchema(properties) { + this.tables = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19781,145 +20494,92 @@ } /** - * GcsDestinationConfig path. - * @member {string} path - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.path = ""; - - /** - * GcsDestinationConfig fileRotationMb. - * @member {number} fileRotationMb - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.fileRotationMb = 0; - - /** - * GcsDestinationConfig fileRotationInterval. - * @member {google.protobuf.IDuration|null|undefined} fileRotationInterval - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.fileRotationInterval = null; - - /** - * GcsDestinationConfig avroFileFormat. - * @member {google.cloud.datastream.v1.IAvroFileFormat|null|undefined} avroFileFormat - * @memberof google.cloud.datastream.v1.GcsDestinationConfig - * @instance - */ - GcsDestinationConfig.prototype.avroFileFormat = null; - - /** - * GcsDestinationConfig jsonFileFormat. - * @member {google.cloud.datastream.v1.IJsonFileFormat|null|undefined} jsonFileFormat - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * SqlServerSchema schema. + * @member {string} schema + * @memberof google.cloud.datastream.v1.SqlServerSchema * @instance */ - GcsDestinationConfig.prototype.jsonFileFormat = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + SqlServerSchema.prototype.schema = ""; /** - * GcsDestinationConfig fileFormat. - * @member {"avroFileFormat"|"jsonFileFormat"|undefined} fileFormat - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * SqlServerSchema tables. + * @member {Array.} tables + * @memberof google.cloud.datastream.v1.SqlServerSchema * @instance */ - Object.defineProperty(GcsDestinationConfig.prototype, "fileFormat", { - get: $util.oneOfGetter($oneOfFields = ["avroFileFormat", "jsonFileFormat"]), - set: $util.oneOfSetter($oneOfFields) - }); + SqlServerSchema.prototype.tables = $util.emptyArray; /** - * Creates a new GcsDestinationConfig instance using the specified properties. + * Creates a new SqlServerSchema instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerSchema * @static - * @param {google.cloud.datastream.v1.IGcsDestinationConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig instance + * @param {google.cloud.datastream.v1.ISqlServerSchema=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SqlServerSchema} SqlServerSchema instance */ - GcsDestinationConfig.create = function create(properties) { - return new GcsDestinationConfig(properties); + SqlServerSchema.create = function create(properties) { + return new SqlServerSchema(properties); }; /** - * Encodes the specified GcsDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. + * Encodes the specified SqlServerSchema message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSchema.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerSchema * @static - * @param {google.cloud.datastream.v1.IGcsDestinationConfig} message GcsDestinationConfig message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerSchema} message SqlServerSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsDestinationConfig.encode = function encode(message, writer) { + SqlServerSchema.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.fileRotationMb != null && Object.hasOwnProperty.call(message, "fileRotationMb")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fileRotationMb); - if (message.fileRotationInterval != null && Object.hasOwnProperty.call(message, "fileRotationInterval")) - $root.google.protobuf.Duration.encode(message.fileRotationInterval, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.avroFileFormat != null && Object.hasOwnProperty.call(message, "avroFileFormat")) - $root.google.cloud.datastream.v1.AvroFileFormat.encode(message.avroFileFormat, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.jsonFileFormat != null && Object.hasOwnProperty.call(message, "jsonFileFormat")) - $root.google.cloud.datastream.v1.JsonFileFormat.encode(message.jsonFileFormat, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); + if (message.tables != null && message.tables.length) + for (var i = 0; i < message.tables.length; ++i) + $root.google.cloud.datastream.v1.SqlServerTable.encode(message.tables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GcsDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. + * Encodes the specified SqlServerSchema message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSchema.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerSchema * @static - * @param {google.cloud.datastream.v1.IGcsDestinationConfig} message GcsDestinationConfig message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerSchema} message SqlServerSchema message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsDestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { + SqlServerSchema.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer. + * Decodes a SqlServerSchema message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig + * @returns {google.cloud.datastream.v1.SqlServerSchema} SqlServerSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsDestinationConfig.decode = function decode(reader, length) { + SqlServerSchema.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.datastream.v1.GcsDestinationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerSchema(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.path = reader.string(); + message.schema = reader.string(); break; } case 2: { - message.fileRotationMb = reader.int32(); - break; - } - case 3: { - message.fileRotationInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 100: { - message.avroFileFormat = $root.google.cloud.datastream.v1.AvroFileFormat.decode(reader, reader.uint32()); - break; - } - case 101: { - message.jsonFileFormat = $root.google.cloud.datastream.v1.JsonFileFormat.decode(reader, reader.uint32()); + if (!(message.tables && message.tables.length)) + message.tables = []; + message.tables.push($root.google.cloud.datastream.v1.SqlServerTable.decode(reader, reader.uint32())); break; } default: @@ -19931,185 +20591,149 @@ }; /** - * Decodes a GcsDestinationConfig message from the specified reader or buffer, length delimited. + * Decodes a SqlServerSchema message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerSchema * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig + * @returns {google.cloud.datastream.v1.SqlServerSchema} SqlServerSchema * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsDestinationConfig.decodeDelimited = function decodeDelimited(reader) { + SqlServerSchema.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsDestinationConfig message. + * Verifies a SqlServerSchema message. * @function verify - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerSchema * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsDestinationConfig.verify = function verify(message) { + SqlServerSchema.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.fileRotationMb != null && message.hasOwnProperty("fileRotationMb")) - if (!$util.isInteger(message.fileRotationMb)) - return "fileRotationMb: integer expected"; - if (message.fileRotationInterval != null && message.hasOwnProperty("fileRotationInterval")) { - var error = $root.google.protobuf.Duration.verify(message.fileRotationInterval); - if (error) - return "fileRotationInterval." + error; - } - if (message.avroFileFormat != null && message.hasOwnProperty("avroFileFormat")) { - properties.fileFormat = 1; - { - var error = $root.google.cloud.datastream.v1.AvroFileFormat.verify(message.avroFileFormat); - if (error) - return "avroFileFormat." + error; - } - } - if (message.jsonFileFormat != null && message.hasOwnProperty("jsonFileFormat")) { - if (properties.fileFormat === 1) - return "fileFormat: multiple values"; - properties.fileFormat = 1; - { - var error = $root.google.cloud.datastream.v1.JsonFileFormat.verify(message.jsonFileFormat); + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.tables != null && message.hasOwnProperty("tables")) { + if (!Array.isArray(message.tables)) + return "tables: array expected"; + for (var i = 0; i < message.tables.length; ++i) { + var error = $root.google.cloud.datastream.v1.SqlServerTable.verify(message.tables[i]); if (error) - return "jsonFileFormat." + error; + return "tables." + error; } } return null; }; /** - * Creates a GcsDestinationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerSchema message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerSchema * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig + * @returns {google.cloud.datastream.v1.SqlServerSchema} SqlServerSchema */ - GcsDestinationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.GcsDestinationConfig) + SqlServerSchema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SqlServerSchema) return object; - var message = new $root.google.cloud.datastream.v1.GcsDestinationConfig(); - if (object.path != null) - message.path = String(object.path); - if (object.fileRotationMb != null) - message.fileRotationMb = object.fileRotationMb | 0; - if (object.fileRotationInterval != null) { - if (typeof object.fileRotationInterval !== "object") - throw TypeError(".google.cloud.datastream.v1.GcsDestinationConfig.fileRotationInterval: object expected"); - message.fileRotationInterval = $root.google.protobuf.Duration.fromObject(object.fileRotationInterval); - } - if (object.avroFileFormat != null) { - if (typeof object.avroFileFormat !== "object") - throw TypeError(".google.cloud.datastream.v1.GcsDestinationConfig.avroFileFormat: object expected"); - message.avroFileFormat = $root.google.cloud.datastream.v1.AvroFileFormat.fromObject(object.avroFileFormat); - } - if (object.jsonFileFormat != null) { - if (typeof object.jsonFileFormat !== "object") - throw TypeError(".google.cloud.datastream.v1.GcsDestinationConfig.jsonFileFormat: object expected"); - message.jsonFileFormat = $root.google.cloud.datastream.v1.JsonFileFormat.fromObject(object.jsonFileFormat); + var message = new $root.google.cloud.datastream.v1.SqlServerSchema(); + if (object.schema != null) + message.schema = String(object.schema); + if (object.tables) { + if (!Array.isArray(object.tables)) + throw TypeError(".google.cloud.datastream.v1.SqlServerSchema.tables: array expected"); + message.tables = []; + for (var i = 0; i < object.tables.length; ++i) { + if (typeof object.tables[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.SqlServerSchema.tables: object expected"); + message.tables[i] = $root.google.cloud.datastream.v1.SqlServerTable.fromObject(object.tables[i]); + } } return message; }; /** - * Creates a plain object from a GcsDestinationConfig message. Also converts values to other types if specified. + * Creates a plain object from a SqlServerSchema message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerSchema * @static - * @param {google.cloud.datastream.v1.GcsDestinationConfig} message GcsDestinationConfig + * @param {google.cloud.datastream.v1.SqlServerSchema} message SqlServerSchema * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsDestinationConfig.toObject = function toObject(message, options) { + SqlServerSchema.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.path = ""; - object.fileRotationMb = 0; - object.fileRotationInterval = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.fileRotationMb != null && message.hasOwnProperty("fileRotationMb")) - object.fileRotationMb = message.fileRotationMb; - if (message.fileRotationInterval != null && message.hasOwnProperty("fileRotationInterval")) - object.fileRotationInterval = $root.google.protobuf.Duration.toObject(message.fileRotationInterval, options); - if (message.avroFileFormat != null && message.hasOwnProperty("avroFileFormat")) { - object.avroFileFormat = $root.google.cloud.datastream.v1.AvroFileFormat.toObject(message.avroFileFormat, options); - if (options.oneofs) - object.fileFormat = "avroFileFormat"; - } - if (message.jsonFileFormat != null && message.hasOwnProperty("jsonFileFormat")) { - object.jsonFileFormat = $root.google.cloud.datastream.v1.JsonFileFormat.toObject(message.jsonFileFormat, options); - if (options.oneofs) - object.fileFormat = "jsonFileFormat"; + if (options.arrays || options.defaults) + object.tables = []; + if (options.defaults) + object.schema = ""; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.tables && message.tables.length) { + object.tables = []; + for (var j = 0; j < message.tables.length; ++j) + object.tables[j] = $root.google.cloud.datastream.v1.SqlServerTable.toObject(message.tables[j], options); } return object; }; /** - * Converts this GcsDestinationConfig to JSON. + * Converts this SqlServerSchema to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerSchema * @instance * @returns {Object.} JSON object */ - GcsDestinationConfig.prototype.toJSON = function toJSON() { + SqlServerSchema.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GcsDestinationConfig + * Gets the default type url for SqlServerSchema * @function getTypeUrl - * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerSchema * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GcsDestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SqlServerSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.GcsDestinationConfig"; + return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerSchema"; }; - return GcsDestinationConfig; + return SqlServerSchema; })(); - v1.BigQueryDestinationConfig = (function() { + v1.SqlServerRdbms = (function() { /** - * Properties of a BigQueryDestinationConfig. + * Properties of a SqlServerRdbms. * @memberof google.cloud.datastream.v1 - * @interface IBigQueryDestinationConfig - * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null} [singleTargetDataset] BigQueryDestinationConfig singleTargetDataset - * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null} [sourceHierarchyDatasets] BigQueryDestinationConfig sourceHierarchyDatasets - * @property {google.protobuf.IDuration|null} [dataFreshness] BigQueryDestinationConfig dataFreshness + * @interface ISqlServerRdbms + * @property {Array.|null} [schemas] SqlServerRdbms schemas */ /** - * Constructs a new BigQueryDestinationConfig. + * Constructs a new SqlServerRdbms. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a BigQueryDestinationConfig. - * @implements IBigQueryDestinationConfig + * @classdesc Represents a SqlServerRdbms. + * @implements ISqlServerRdbms * @constructor - * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig=} [properties] Properties to set + * @param {google.cloud.datastream.v1.ISqlServerRdbms=} [properties] Properties to set */ - function BigQueryDestinationConfig(properties) { + function SqlServerRdbms(properties) { + this.schemas = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20117,117 +20741,78 @@ } /** - * BigQueryDestinationConfig singleTargetDataset. - * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null|undefined} singleTargetDataset - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - */ - BigQueryDestinationConfig.prototype.singleTargetDataset = null; - - /** - * BigQueryDestinationConfig sourceHierarchyDatasets. - * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null|undefined} sourceHierarchyDatasets - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - */ - BigQueryDestinationConfig.prototype.sourceHierarchyDatasets = null; - - /** - * BigQueryDestinationConfig dataFreshness. - * @member {google.protobuf.IDuration|null|undefined} dataFreshness - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @instance - */ - BigQueryDestinationConfig.prototype.dataFreshness = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BigQueryDestinationConfig datasetConfig. - * @member {"singleTargetDataset"|"sourceHierarchyDatasets"|undefined} datasetConfig - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * SqlServerRdbms schemas. + * @member {Array.} schemas + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @instance */ - Object.defineProperty(BigQueryDestinationConfig.prototype, "datasetConfig", { - get: $util.oneOfGetter($oneOfFields = ["singleTargetDataset", "sourceHierarchyDatasets"]), - set: $util.oneOfSetter($oneOfFields) - }); + SqlServerRdbms.prototype.schemas = $util.emptyArray; /** - * Creates a new BigQueryDestinationConfig instance using the specified properties. + * Creates a new SqlServerRdbms instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @static - * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig instance + * @param {google.cloud.datastream.v1.ISqlServerRdbms=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SqlServerRdbms} SqlServerRdbms instance */ - BigQueryDestinationConfig.create = function create(properties) { - return new BigQueryDestinationConfig(properties); + SqlServerRdbms.create = function create(properties) { + return new SqlServerRdbms(properties); }; /** - * Encodes the specified BigQueryDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. + * Encodes the specified SqlServerRdbms message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerRdbms.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @static - * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig} message BigQueryDestinationConfig message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerRdbms} message SqlServerRdbms message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDestinationConfig.encode = function encode(message, writer) { + SqlServerRdbms.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.singleTargetDataset != null && Object.hasOwnProperty.call(message, "singleTargetDataset")) - $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.encode(message.singleTargetDataset, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.sourceHierarchyDatasets != null && Object.hasOwnProperty.call(message, "sourceHierarchyDatasets")) - $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.encode(message.sourceHierarchyDatasets, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); - if (message.dataFreshness != null && Object.hasOwnProperty.call(message, "dataFreshness")) - $root.google.protobuf.Duration.encode(message.dataFreshness, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); + if (message.schemas != null && message.schemas.length) + for (var i = 0; i < message.schemas.length; ++i) + $root.google.cloud.datastream.v1.SqlServerSchema.encode(message.schemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified BigQueryDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. + * Encodes the specified SqlServerRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerRdbms.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @static - * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig} message BigQueryDestinationConfig message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerRdbms} message SqlServerRdbms message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { + SqlServerRdbms.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryDestinationConfig message from the specified reader or buffer. + * Decodes a SqlServerRdbms message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig + * @returns {google.cloud.datastream.v1.SqlServerRdbms} SqlServerRdbms * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDestinationConfig.decode = function decode(reader, length) { + SqlServerRdbms.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.datastream.v1.BigQueryDestinationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerRdbms(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 201: { - message.singleTargetDataset = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.decode(reader, reader.uint32()); - break; - } - case 202: { - message.sourceHierarchyDatasets = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.decode(reader, reader.uint32()); - break; - } - case 300: { - message.dataFreshness = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + case 1: { + if (!(message.schemas && message.schemas.length)) + message.schemas = []; + message.schemas.push($root.google.cloud.datastream.v1.SqlServerSchema.decode(reader, reader.uint32())); break; } default: @@ -20239,829 +20824,504 @@ }; /** - * Decodes a BigQueryDestinationConfig message from the specified reader or buffer, length delimited. + * Decodes a SqlServerRdbms message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig + * @returns {google.cloud.datastream.v1.SqlServerRdbms} SqlServerRdbms * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDestinationConfig.decodeDelimited = function decodeDelimited(reader) { + SqlServerRdbms.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryDestinationConfig message. + * Verifies a SqlServerRdbms message. * @function verify - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryDestinationConfig.verify = function verify(message) { + SqlServerRdbms.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.singleTargetDataset != null && message.hasOwnProperty("singleTargetDataset")) { - properties.datasetConfig = 1; - { - var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify(message.singleTargetDataset); - if (error) - return "singleTargetDataset." + error; - } - } - if (message.sourceHierarchyDatasets != null && message.hasOwnProperty("sourceHierarchyDatasets")) { - if (properties.datasetConfig === 1) - return "datasetConfig: multiple values"; - properties.datasetConfig = 1; - { - var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify(message.sourceHierarchyDatasets); + if (message.schemas != null && message.hasOwnProperty("schemas")) { + if (!Array.isArray(message.schemas)) + return "schemas: array expected"; + for (var i = 0; i < message.schemas.length; ++i) { + var error = $root.google.cloud.datastream.v1.SqlServerSchema.verify(message.schemas[i]); if (error) - return "sourceHierarchyDatasets." + error; + return "schemas." + error; } } - if (message.dataFreshness != null && message.hasOwnProperty("dataFreshness")) { - var error = $root.google.protobuf.Duration.verify(message.dataFreshness); - if (error) - return "dataFreshness." + error; - } return null; }; /** - * Creates a BigQueryDestinationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerRdbms message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig + * @returns {google.cloud.datastream.v1.SqlServerRdbms} SqlServerRdbms */ - BigQueryDestinationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig) + SqlServerRdbms.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SqlServerRdbms) return object; - var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig(); - if (object.singleTargetDataset != null) { - if (typeof object.singleTargetDataset !== "object") - throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.singleTargetDataset: object expected"); - message.singleTargetDataset = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.fromObject(object.singleTargetDataset); - } - if (object.sourceHierarchyDatasets != null) { - if (typeof object.sourceHierarchyDatasets !== "object") - throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.sourceHierarchyDatasets: object expected"); - message.sourceHierarchyDatasets = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.fromObject(object.sourceHierarchyDatasets); - } - if (object.dataFreshness != null) { - if (typeof object.dataFreshness !== "object") - throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.dataFreshness: object expected"); - message.dataFreshness = $root.google.protobuf.Duration.fromObject(object.dataFreshness); + var message = new $root.google.cloud.datastream.v1.SqlServerRdbms(); + if (object.schemas) { + if (!Array.isArray(object.schemas)) + throw TypeError(".google.cloud.datastream.v1.SqlServerRdbms.schemas: array expected"); + message.schemas = []; + for (var i = 0; i < object.schemas.length; ++i) { + if (typeof object.schemas[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.SqlServerRdbms.schemas: object expected"); + message.schemas[i] = $root.google.cloud.datastream.v1.SqlServerSchema.fromObject(object.schemas[i]); + } } return message; }; /** - * Creates a plain object from a BigQueryDestinationConfig message. Also converts values to other types if specified. + * Creates a plain object from a SqlServerRdbms message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig} message BigQueryDestinationConfig + * @param {google.cloud.datastream.v1.SqlServerRdbms} message SqlServerRdbms * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryDestinationConfig.toObject = function toObject(message, options) { + SqlServerRdbms.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.dataFreshness = null; - if (message.singleTargetDataset != null && message.hasOwnProperty("singleTargetDataset")) { - object.singleTargetDataset = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.toObject(message.singleTargetDataset, options); - if (options.oneofs) - object.datasetConfig = "singleTargetDataset"; - } - if (message.sourceHierarchyDatasets != null && message.hasOwnProperty("sourceHierarchyDatasets")) { - object.sourceHierarchyDatasets = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.toObject(message.sourceHierarchyDatasets, options); - if (options.oneofs) - object.datasetConfig = "sourceHierarchyDatasets"; + if (options.arrays || options.defaults) + object.schemas = []; + if (message.schemas && message.schemas.length) { + object.schemas = []; + for (var j = 0; j < message.schemas.length; ++j) + object.schemas[j] = $root.google.cloud.datastream.v1.SqlServerSchema.toObject(message.schemas[j], options); } - if (message.dataFreshness != null && message.hasOwnProperty("dataFreshness")) - object.dataFreshness = $root.google.protobuf.Duration.toObject(message.dataFreshness, options); return object; }; /** - * Converts this BigQueryDestinationConfig to JSON. + * Converts this SqlServerRdbms to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @instance * @returns {Object.} JSON object */ - BigQueryDestinationConfig.prototype.toJSON = function toJSON() { + SqlServerRdbms.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryDestinationConfig + * Gets the default type url for SqlServerRdbms * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerRdbms * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryDestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SqlServerRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig"; + return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerRdbms"; }; - BigQueryDestinationConfig.SingleTargetDataset = (function() { + return SqlServerRdbms; + })(); - /** - * Properties of a SingleTargetDataset. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @interface ISingleTargetDataset - * @property {string|null} [datasetId] SingleTargetDataset datasetId - */ + v1.SqlServerSourceConfig = (function() { - /** - * Constructs a new SingleTargetDataset. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @classdesc Represents a SingleTargetDataset. - * @implements ISingleTargetDataset - * @constructor - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset=} [properties] Properties to set - */ - function SingleTargetDataset(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a SqlServerSourceConfig. + * @memberof google.cloud.datastream.v1 + * @interface ISqlServerSourceConfig + * @property {google.cloud.datastream.v1.ISqlServerRdbms|null} [includeObjects] SqlServerSourceConfig includeObjects + * @property {google.cloud.datastream.v1.ISqlServerRdbms|null} [excludeObjects] SqlServerSourceConfig excludeObjects + * @property {number|null} [maxConcurrentCdcTasks] SqlServerSourceConfig maxConcurrentCdcTasks + * @property {number|null} [maxConcurrentBackfillTasks] SqlServerSourceConfig maxConcurrentBackfillTasks + * @property {google.cloud.datastream.v1.ISqlServerTransactionLogs|null} [transactionLogs] SqlServerSourceConfig transactionLogs + * @property {google.cloud.datastream.v1.ISqlServerChangeTables|null} [changeTables] SqlServerSourceConfig changeTables + */ - /** - * SingleTargetDataset datasetId. - * @member {string} datasetId - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @instance - */ - SingleTargetDataset.prototype.datasetId = ""; + /** + * Constructs a new SqlServerSourceConfig. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a SqlServerSourceConfig. + * @implements ISqlServerSourceConfig + * @constructor + * @param {google.cloud.datastream.v1.ISqlServerSourceConfig=} [properties] Properties to set + */ + function SqlServerSourceConfig(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 SingleTargetDataset instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset instance - */ - SingleTargetDataset.create = function create(properties) { - return new SingleTargetDataset(properties); - }; + /** + * SqlServerSourceConfig includeObjects. + * @member {google.cloud.datastream.v1.ISqlServerRdbms|null|undefined} includeObjects + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @instance + */ + SqlServerSourceConfig.prototype.includeObjects = null; - /** - * Encodes the specified SingleTargetDataset message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset} message SingleTargetDataset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleTargetDataset.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId); - return writer; - }; + /** + * SqlServerSourceConfig excludeObjects. + * @member {google.cloud.datastream.v1.ISqlServerRdbms|null|undefined} excludeObjects + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @instance + */ + SqlServerSourceConfig.prototype.excludeObjects = null; - /** - * Encodes the specified SingleTargetDataset message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset} message SingleTargetDataset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleTargetDataset.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * SqlServerSourceConfig maxConcurrentCdcTasks. + * @member {number} maxConcurrentCdcTasks + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @instance + */ + SqlServerSourceConfig.prototype.maxConcurrentCdcTasks = 0; - /** - * Decodes a SingleTargetDataset message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleTargetDataset.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.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.datasetId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SingleTargetDataset message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleTargetDataset.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SingleTargetDataset message. - * @function verify - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SingleTargetDataset.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - if (!$util.isString(message.datasetId)) - return "datasetId: string expected"; - return null; - }; + /** + * SqlServerSourceConfig maxConcurrentBackfillTasks. + * @member {number} maxConcurrentBackfillTasks + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @instance + */ + SqlServerSourceConfig.prototype.maxConcurrentBackfillTasks = 0; - /** - * Creates a SingleTargetDataset message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset - */ - SingleTargetDataset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset) - return object; - var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset(); - if (object.datasetId != null) - message.datasetId = String(object.datasetId); - return message; - }; + /** + * SqlServerSourceConfig transactionLogs. + * @member {google.cloud.datastream.v1.ISqlServerTransactionLogs|null|undefined} transactionLogs + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @instance + */ + SqlServerSourceConfig.prototype.transactionLogs = null; - /** - * Creates a plain object from a SingleTargetDataset message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} message SingleTargetDataset - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SingleTargetDataset.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.datasetId = ""; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - object.datasetId = message.datasetId; - return object; - }; + /** + * SqlServerSourceConfig changeTables. + * @member {google.cloud.datastream.v1.ISqlServerChangeTables|null|undefined} changeTables + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @instance + */ + SqlServerSourceConfig.prototype.changeTables = null; - /** - * Converts this SingleTargetDataset to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @instance - * @returns {Object.} JSON object - */ - SingleTargetDataset.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Gets the default type url for SingleTargetDataset - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SingleTargetDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset"; - }; + /** + * SqlServerSourceConfig cdcMethod. + * @member {"transactionLogs"|"changeTables"|undefined} cdcMethod + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @instance + */ + Object.defineProperty(SqlServerSourceConfig.prototype, "cdcMethod", { + get: $util.oneOfGetter($oneOfFields = ["transactionLogs", "changeTables"]), + set: $util.oneOfSetter($oneOfFields) + }); - return SingleTargetDataset; - })(); + /** + * Creates a new SqlServerSourceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @static + * @param {google.cloud.datastream.v1.ISqlServerSourceConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SqlServerSourceConfig} SqlServerSourceConfig instance + */ + SqlServerSourceConfig.create = function create(properties) { + return new SqlServerSourceConfig(properties); + }; - BigQueryDestinationConfig.SourceHierarchyDatasets = (function() { + /** + * Encodes the specified SqlServerSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSourceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @static + * @param {google.cloud.datastream.v1.ISqlServerSourceConfig} message SqlServerSourceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlServerSourceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) + $root.google.cloud.datastream.v1.SqlServerRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) + $root.google.cloud.datastream.v1.SqlServerRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maxConcurrentCdcTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentCdcTasks")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxConcurrentCdcTasks); + if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConcurrentBackfillTasks); + if (message.transactionLogs != null && Object.hasOwnProperty.call(message, "transactionLogs")) + $root.google.cloud.datastream.v1.SqlServerTransactionLogs.encode(message.transactionLogs, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.changeTables != null && Object.hasOwnProperty.call(message, "changeTables")) + $root.google.cloud.datastream.v1.SqlServerChangeTables.encode(message.changeTables, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + return writer; + }; - /** - * Properties of a SourceHierarchyDatasets. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @interface ISourceHierarchyDatasets - * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null} [datasetTemplate] SourceHierarchyDatasets datasetTemplate - */ + /** + * Encodes the specified SqlServerSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerSourceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @static + * @param {google.cloud.datastream.v1.ISqlServerSourceConfig} message SqlServerSourceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlServerSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Constructs a new SourceHierarchyDatasets. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig - * @classdesc Represents a SourceHierarchyDatasets. - * @implements ISourceHierarchyDatasets - * @constructor - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets=} [properties] Properties to set - */ - function SourceHierarchyDatasets(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]]; + /** + * Decodes a SqlServerSourceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.SqlServerSourceConfig} SqlServerSourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlServerSourceConfig.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.datastream.v1.SqlServerSourceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.includeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.decode(reader, reader.uint32()); + break; + } + case 2: { + message.excludeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.decode(reader, reader.uint32()); + break; + } + case 3: { + message.maxConcurrentCdcTasks = reader.int32(); + break; + } + case 4: { + message.maxConcurrentBackfillTasks = reader.int32(); + break; + } + case 101: { + message.transactionLogs = $root.google.cloud.datastream.v1.SqlServerTransactionLogs.decode(reader, reader.uint32()); + break; + } + case 102: { + message.changeTables = $root.google.cloud.datastream.v1.SqlServerChangeTables.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * SourceHierarchyDatasets datasetTemplate. - * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null|undefined} datasetTemplate - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @instance - */ - SourceHierarchyDatasets.prototype.datasetTemplate = null; - - /** - * Creates a new SourceHierarchyDatasets instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets instance - */ - SourceHierarchyDatasets.create = function create(properties) { - return new SourceHierarchyDatasets(properties); - }; + /** + * Decodes a SqlServerSourceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.SqlServerSourceConfig} SqlServerSourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlServerSourceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified SourceHierarchyDatasets message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets} message SourceHierarchyDatasets message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceHierarchyDatasets.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.datasetTemplate != null && Object.hasOwnProperty.call(message, "datasetTemplate")) - $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.encode(message.datasetTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceHierarchyDatasets message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets} message SourceHierarchyDatasets message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceHierarchyDatasets.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceHierarchyDatasets message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceHierarchyDatasets.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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.datasetTemplate = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceHierarchyDatasets message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceHierarchyDatasets.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceHierarchyDatasets message. - * @function verify - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceHierarchyDatasets.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.datasetTemplate != null && message.hasOwnProperty("datasetTemplate")) { - var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify(message.datasetTemplate); + /** + * Verifies a SqlServerSourceConfig message. + * @function verify + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlServerSourceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { + var error = $root.google.cloud.datastream.v1.SqlServerRdbms.verify(message.includeObjects); + if (error) + return "includeObjects." + error; + } + if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { + var error = $root.google.cloud.datastream.v1.SqlServerRdbms.verify(message.excludeObjects); + if (error) + return "excludeObjects." + error; + } + if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) + if (!$util.isInteger(message.maxConcurrentCdcTasks)) + return "maxConcurrentCdcTasks: integer expected"; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + if (!$util.isInteger(message.maxConcurrentBackfillTasks)) + return "maxConcurrentBackfillTasks: integer expected"; + if (message.transactionLogs != null && message.hasOwnProperty("transactionLogs")) { + properties.cdcMethod = 1; + { + var error = $root.google.cloud.datastream.v1.SqlServerTransactionLogs.verify(message.transactionLogs); if (error) - return "datasetTemplate." + error; + return "transactionLogs." + error; } - return null; - }; - - /** - * Creates a SourceHierarchyDatasets message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets - */ - SourceHierarchyDatasets.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets) - return object; - var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets(); - if (object.datasetTemplate != null) { - if (typeof object.datasetTemplate !== "object") - throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.datasetTemplate: object expected"); - message.datasetTemplate = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.fromObject(object.datasetTemplate); + } + if (message.changeTables != null && message.hasOwnProperty("changeTables")) { + if (properties.cdcMethod === 1) + return "cdcMethod: multiple values"; + properties.cdcMethod = 1; + { + var error = $root.google.cloud.datastream.v1.SqlServerChangeTables.verify(message.changeTables); + if (error) + return "changeTables." + error; } - return message; - }; + } + return null; + }; - /** - * Creates a plain object from a SourceHierarchyDatasets message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} message SourceHierarchyDatasets - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceHierarchyDatasets.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.datasetTemplate = null; - if (message.datasetTemplate != null && message.hasOwnProperty("datasetTemplate")) - object.datasetTemplate = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.toObject(message.datasetTemplate, options); + /** + * Creates a SqlServerSourceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.SqlServerSourceConfig} SqlServerSourceConfig + */ + SqlServerSourceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SqlServerSourceConfig) return object; - }; + var message = new $root.google.cloud.datastream.v1.SqlServerSourceConfig(); + if (object.includeObjects != null) { + if (typeof object.includeObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.SqlServerSourceConfig.includeObjects: object expected"); + message.includeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.fromObject(object.includeObjects); + } + if (object.excludeObjects != null) { + if (typeof object.excludeObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.SqlServerSourceConfig.excludeObjects: object expected"); + message.excludeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.fromObject(object.excludeObjects); + } + if (object.maxConcurrentCdcTasks != null) + message.maxConcurrentCdcTasks = object.maxConcurrentCdcTasks | 0; + if (object.maxConcurrentBackfillTasks != null) + message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; + if (object.transactionLogs != null) { + if (typeof object.transactionLogs !== "object") + throw TypeError(".google.cloud.datastream.v1.SqlServerSourceConfig.transactionLogs: object expected"); + message.transactionLogs = $root.google.cloud.datastream.v1.SqlServerTransactionLogs.fromObject(object.transactionLogs); + } + if (object.changeTables != null) { + if (typeof object.changeTables !== "object") + throw TypeError(".google.cloud.datastream.v1.SqlServerSourceConfig.changeTables: object expected"); + message.changeTables = $root.google.cloud.datastream.v1.SqlServerChangeTables.fromObject(object.changeTables); + } + return message; + }; - /** - * Converts this SourceHierarchyDatasets to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @instance - * @returns {Object.} JSON object - */ - SourceHierarchyDatasets.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a SqlServerSourceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @static + * @param {google.cloud.datastream.v1.SqlServerSourceConfig} message SqlServerSourceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlServerSourceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.includeObjects = null; + object.excludeObjects = null; + object.maxConcurrentCdcTasks = 0; + object.maxConcurrentBackfillTasks = 0; + } + if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) + object.includeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.toObject(message.includeObjects, options); + if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) + object.excludeObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.toObject(message.excludeObjects, options); + if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) + object.maxConcurrentCdcTasks = message.maxConcurrentCdcTasks; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; + if (message.transactionLogs != null && message.hasOwnProperty("transactionLogs")) { + object.transactionLogs = $root.google.cloud.datastream.v1.SqlServerTransactionLogs.toObject(message.transactionLogs, options); + if (options.oneofs) + object.cdcMethod = "transactionLogs"; + } + if (message.changeTables != null && message.hasOwnProperty("changeTables")) { + object.changeTables = $root.google.cloud.datastream.v1.SqlServerChangeTables.toObject(message.changeTables, options); + if (options.oneofs) + object.cdcMethod = "changeTables"; + } + return object; + }; - /** - * Gets the default type url for SourceHierarchyDatasets - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceHierarchyDatasets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets"; - }; + /** + * Converts this SqlServerSourceConfig to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @instance + * @returns {Object.} JSON object + */ + SqlServerSourceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - SourceHierarchyDatasets.DatasetTemplate = (function() { + /** + * Gets the default type url for SqlServerSourceConfig + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.SqlServerSourceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlServerSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerSourceConfig"; + }; - /** - * Properties of a DatasetTemplate. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @interface IDatasetTemplate - * @property {string|null} [location] DatasetTemplate location - * @property {string|null} [datasetIdPrefix] DatasetTemplate datasetIdPrefix - * @property {string|null} [kmsKeyName] DatasetTemplate kmsKeyName - */ + return SqlServerSourceConfig; + })(); - /** - * Constructs a new DatasetTemplate. - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - * @classdesc Represents a DatasetTemplate. - * @implements IDatasetTemplate - * @constructor - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate=} [properties] Properties to set - */ - function DatasetTemplate(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]]; - } - - /** - * DatasetTemplate location. - * @member {string} location - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @instance - */ - DatasetTemplate.prototype.location = ""; - - /** - * DatasetTemplate datasetIdPrefix. - * @member {string} datasetIdPrefix - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @instance - */ - DatasetTemplate.prototype.datasetIdPrefix = ""; - - /** - * DatasetTemplate kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @instance - */ - DatasetTemplate.prototype.kmsKeyName = ""; - - /** - * Creates a new DatasetTemplate instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate instance - */ - DatasetTemplate.create = function create(properties) { - return new DatasetTemplate(properties); - }; - - /** - * Encodes the specified DatasetTemplate message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate} message DatasetTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatasetTemplate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); - if (message.datasetIdPrefix != null && Object.hasOwnProperty.call(message, "datasetIdPrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetIdPrefix); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); - return writer; - }; - - /** - * Encodes the specified DatasetTemplate message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate} message DatasetTemplate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatasetTemplate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatasetTemplate message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatasetTemplate.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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.location = reader.string(); - break; - } - case 2: { - message.datasetIdPrefix = reader.string(); - break; - } - case 3: { - message.kmsKeyName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatasetTemplate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatasetTemplate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatasetTemplate message. - * @function verify - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatasetTemplate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.datasetIdPrefix != null && message.hasOwnProperty("datasetIdPrefix")) - if (!$util.isString(message.datasetIdPrefix)) - return "datasetIdPrefix: string expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - return null; - }; - - /** - * Creates a DatasetTemplate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate - */ - DatasetTemplate.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate) - return object; - var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate(); - if (object.location != null) - message.location = String(object.location); - if (object.datasetIdPrefix != null) - message.datasetIdPrefix = String(object.datasetIdPrefix); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - return message; - }; - - /** - * Creates a plain object from a DatasetTemplate message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} message DatasetTemplate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatasetTemplate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.location = ""; - object.datasetIdPrefix = ""; - object.kmsKeyName = ""; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.datasetIdPrefix != null && message.hasOwnProperty("datasetIdPrefix")) - object.datasetIdPrefix = message.datasetIdPrefix; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - return object; - }; - - /** - * Converts this DatasetTemplate to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @instance - * @returns {Object.} JSON object - */ - DatasetTemplate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatasetTemplate - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatasetTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate"; - }; - - return DatasetTemplate; - })(); - - return SourceHierarchyDatasets; - })(); - - return BigQueryDestinationConfig; - })(); - - v1.DestinationConfig = (function() { + v1.SqlServerTransactionLogs = (function() { /** - * Properties of a DestinationConfig. + * Properties of a SqlServerTransactionLogs. * @memberof google.cloud.datastream.v1 - * @interface IDestinationConfig - * @property {string|null} [destinationConnectionProfile] DestinationConfig destinationConnectionProfile - * @property {google.cloud.datastream.v1.IGcsDestinationConfig|null} [gcsDestinationConfig] DestinationConfig gcsDestinationConfig - * @property {google.cloud.datastream.v1.IBigQueryDestinationConfig|null} [bigqueryDestinationConfig] DestinationConfig bigqueryDestinationConfig + * @interface ISqlServerTransactionLogs */ /** - * Constructs a new DestinationConfig. + * Constructs a new SqlServerTransactionLogs. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a DestinationConfig. - * @implements IDestinationConfig + * @classdesc Represents a SqlServerTransactionLogs. + * @implements ISqlServerTransactionLogs * @constructor - * @param {google.cloud.datastream.v1.IDestinationConfig=} [properties] Properties to set + * @param {google.cloud.datastream.v1.ISqlServerTransactionLogs=} [properties] Properties to set */ - function DestinationConfig(properties) { + function SqlServerTransactionLogs(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21069,119 +21329,63 @@ } /** - * DestinationConfig destinationConnectionProfile. - * @member {string} destinationConnectionProfile - * @memberof google.cloud.datastream.v1.DestinationConfig - * @instance + * Creates a new SqlServerTransactionLogs instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs + * @static + * @param {google.cloud.datastream.v1.ISqlServerTransactionLogs=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SqlServerTransactionLogs} SqlServerTransactionLogs instance */ - DestinationConfig.prototype.destinationConnectionProfile = ""; - - /** - * DestinationConfig gcsDestinationConfig. - * @member {google.cloud.datastream.v1.IGcsDestinationConfig|null|undefined} gcsDestinationConfig - * @memberof google.cloud.datastream.v1.DestinationConfig - * @instance - */ - DestinationConfig.prototype.gcsDestinationConfig = null; - - /** - * DestinationConfig bigqueryDestinationConfig. - * @member {google.cloud.datastream.v1.IBigQueryDestinationConfig|null|undefined} bigqueryDestinationConfig - * @memberof google.cloud.datastream.v1.DestinationConfig - * @instance - */ - DestinationConfig.prototype.bigqueryDestinationConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DestinationConfig destinationStreamConfig. - * @member {"gcsDestinationConfig"|"bigqueryDestinationConfig"|undefined} destinationStreamConfig - * @memberof google.cloud.datastream.v1.DestinationConfig - * @instance - */ - Object.defineProperty(DestinationConfig.prototype, "destinationStreamConfig", { - get: $util.oneOfGetter($oneOfFields = ["gcsDestinationConfig", "bigqueryDestinationConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DestinationConfig instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.DestinationConfig - * @static - * @param {google.cloud.datastream.v1.IDestinationConfig=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig instance - */ - DestinationConfig.create = function create(properties) { - return new DestinationConfig(properties); + SqlServerTransactionLogs.create = function create(properties) { + return new SqlServerTransactionLogs(properties); }; /** - * Encodes the specified DestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. + * Encodes the specified SqlServerTransactionLogs message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTransactionLogs.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.DestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs * @static - * @param {google.cloud.datastream.v1.IDestinationConfig} message DestinationConfig message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerTransactionLogs} message SqlServerTransactionLogs message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DestinationConfig.encode = function encode(message, writer) { + SqlServerTransactionLogs.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.destinationConnectionProfile != null && Object.hasOwnProperty.call(message, "destinationConnectionProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationConnectionProfile); - if (message.gcsDestinationConfig != null && Object.hasOwnProperty.call(message, "gcsDestinationConfig")) - $root.google.cloud.datastream.v1.GcsDestinationConfig.encode(message.gcsDestinationConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.bigqueryDestinationConfig != null && Object.hasOwnProperty.call(message, "bigqueryDestinationConfig")) - $root.google.cloud.datastream.v1.BigQueryDestinationConfig.encode(message.bigqueryDestinationConfig, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); return writer; }; /** - * Encodes the specified DestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. + * Encodes the specified SqlServerTransactionLogs message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerTransactionLogs.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.DestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs * @static - * @param {google.cloud.datastream.v1.IDestinationConfig} message DestinationConfig message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerTransactionLogs} message SqlServerTransactionLogs message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { + SqlServerTransactionLogs.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DestinationConfig message from the specified reader or buffer. + * Decodes a SqlServerTransactionLogs message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.DestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig + * @returns {google.cloud.datastream.v1.SqlServerTransactionLogs} SqlServerTransactionLogs * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DestinationConfig.decode = function decode(reader, length) { + SqlServerTransactionLogs.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.datastream.v1.DestinationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerTransactionLogs(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.destinationConnectionProfile = reader.string(); - break; - } - case 100: { - message.gcsDestinationConfig = $root.google.cloud.datastream.v1.GcsDestinationConfig.decode(reader, reader.uint32()); - break; - } - case 101: { - message.bigqueryDestinationConfig = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -21191,174 +21395,108 @@ }; /** - * Decodes a DestinationConfig message from the specified reader or buffer, length delimited. + * Decodes a SqlServerTransactionLogs message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.DestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig + * @returns {google.cloud.datastream.v1.SqlServerTransactionLogs} SqlServerTransactionLogs * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DestinationConfig.decodeDelimited = function decodeDelimited(reader) { + SqlServerTransactionLogs.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DestinationConfig message. + * Verifies a SqlServerTransactionLogs message. * @function verify - * @memberof google.cloud.datastream.v1.DestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DestinationConfig.verify = function verify(message) { + SqlServerTransactionLogs.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.destinationConnectionProfile != null && message.hasOwnProperty("destinationConnectionProfile")) - if (!$util.isString(message.destinationConnectionProfile)) - return "destinationConnectionProfile: string expected"; - if (message.gcsDestinationConfig != null && message.hasOwnProperty("gcsDestinationConfig")) { - properties.destinationStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.GcsDestinationConfig.verify(message.gcsDestinationConfig); - if (error) - return "gcsDestinationConfig." + error; - } - } - if (message.bigqueryDestinationConfig != null && message.hasOwnProperty("bigqueryDestinationConfig")) { - if (properties.destinationStreamConfig === 1) - return "destinationStreamConfig: multiple values"; - properties.destinationStreamConfig = 1; - { - var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.verify(message.bigqueryDestinationConfig); - if (error) - return "bigqueryDestinationConfig." + error; - } - } return null; }; /** - * Creates a DestinationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerTransactionLogs message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.DestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig + * @returns {google.cloud.datastream.v1.SqlServerTransactionLogs} SqlServerTransactionLogs */ - DestinationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.DestinationConfig) + SqlServerTransactionLogs.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SqlServerTransactionLogs) return object; - var message = new $root.google.cloud.datastream.v1.DestinationConfig(); - if (object.destinationConnectionProfile != null) - message.destinationConnectionProfile = String(object.destinationConnectionProfile); - if (object.gcsDestinationConfig != null) { - if (typeof object.gcsDestinationConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.DestinationConfig.gcsDestinationConfig: object expected"); - message.gcsDestinationConfig = $root.google.cloud.datastream.v1.GcsDestinationConfig.fromObject(object.gcsDestinationConfig); - } - if (object.bigqueryDestinationConfig != null) { - if (typeof object.bigqueryDestinationConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.DestinationConfig.bigqueryDestinationConfig: object expected"); - message.bigqueryDestinationConfig = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.fromObject(object.bigqueryDestinationConfig); - } - return message; + return new $root.google.cloud.datastream.v1.SqlServerTransactionLogs(); }; /** - * Creates a plain object from a DestinationConfig message. Also converts values to other types if specified. + * Creates a plain object from a SqlServerTransactionLogs message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.DestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs * @static - * @param {google.cloud.datastream.v1.DestinationConfig} message DestinationConfig + * @param {google.cloud.datastream.v1.SqlServerTransactionLogs} message SqlServerTransactionLogs * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DestinationConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.destinationConnectionProfile = ""; - if (message.destinationConnectionProfile != null && message.hasOwnProperty("destinationConnectionProfile")) - object.destinationConnectionProfile = message.destinationConnectionProfile; - if (message.gcsDestinationConfig != null && message.hasOwnProperty("gcsDestinationConfig")) { - object.gcsDestinationConfig = $root.google.cloud.datastream.v1.GcsDestinationConfig.toObject(message.gcsDestinationConfig, options); - if (options.oneofs) - object.destinationStreamConfig = "gcsDestinationConfig"; - } - if (message.bigqueryDestinationConfig != null && message.hasOwnProperty("bigqueryDestinationConfig")) { - object.bigqueryDestinationConfig = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.toObject(message.bigqueryDestinationConfig, options); - if (options.oneofs) - object.destinationStreamConfig = "bigqueryDestinationConfig"; - } - return object; + SqlServerTransactionLogs.toObject = function toObject() { + return {}; }; /** - * Converts this DestinationConfig to JSON. + * Converts this SqlServerTransactionLogs to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.DestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs * @instance * @returns {Object.} JSON object */ - DestinationConfig.prototype.toJSON = function toJSON() { + SqlServerTransactionLogs.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DestinationConfig + * Gets the default type url for SqlServerTransactionLogs * @function getTypeUrl - * @memberof google.cloud.datastream.v1.DestinationConfig + * @memberof google.cloud.datastream.v1.SqlServerTransactionLogs * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SqlServerTransactionLogs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.DestinationConfig"; + return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerTransactionLogs"; }; - return DestinationConfig; + return SqlServerTransactionLogs; })(); - v1.Stream = (function() { + v1.SqlServerChangeTables = (function() { /** - * Properties of a Stream. + * Properties of a SqlServerChangeTables. * @memberof google.cloud.datastream.v1 - * @interface IStream - * @property {string|null} [name] Stream name - * @property {google.protobuf.ITimestamp|null} [createTime] Stream createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Stream updateTime - * @property {Object.|null} [labels] Stream labels - * @property {string|null} [displayName] Stream displayName - * @property {google.cloud.datastream.v1.ISourceConfig|null} [sourceConfig] Stream sourceConfig - * @property {google.cloud.datastream.v1.IDestinationConfig|null} [destinationConfig] Stream destinationConfig - * @property {google.cloud.datastream.v1.Stream.State|null} [state] Stream state - * @property {google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null} [backfillAll] Stream backfillAll - * @property {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null} [backfillNone] Stream backfillNone - * @property {Array.|null} [errors] Stream errors - * @property {string|null} [customerManagedEncryptionKey] Stream customerManagedEncryptionKey + * @interface ISqlServerChangeTables */ /** - * Constructs a new Stream. + * Constructs a new SqlServerChangeTables. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a Stream. - * @implements IStream + * @classdesc Represents a SqlServerChangeTables. + * @implements ISqlServerChangeTables * @constructor - * @param {google.cloud.datastream.v1.IStream=} [properties] Properties to set + * @param {google.cloud.datastream.v1.ISqlServerChangeTables=} [properties] Properties to set */ - function Stream(properties) { - this.labels = {}; - this.errors = []; + function SqlServerChangeTables(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21366,277 +21504,371 @@ } /** - * Stream name. - * @member {string} name - * @memberof google.cloud.datastream.v1.Stream - * @instance + * Creates a new SqlServerChangeTables instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.SqlServerChangeTables + * @static + * @param {google.cloud.datastream.v1.ISqlServerChangeTables=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SqlServerChangeTables} SqlServerChangeTables instance */ - Stream.prototype.name = ""; + SqlServerChangeTables.create = function create(properties) { + return new SqlServerChangeTables(properties); + }; /** - * Stream createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.Stream - * @instance + * Encodes the specified SqlServerChangeTables message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerChangeTables.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.SqlServerChangeTables + * @static + * @param {google.cloud.datastream.v1.ISqlServerChangeTables} message SqlServerChangeTables message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Stream.prototype.createTime = null; + SqlServerChangeTables.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * Stream updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1.Stream - * @instance + * Encodes the specified SqlServerChangeTables message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerChangeTables.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.SqlServerChangeTables + * @static + * @param {google.cloud.datastream.v1.ISqlServerChangeTables} message SqlServerChangeTables message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Stream.prototype.updateTime = null; + SqlServerChangeTables.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Stream labels. - * @member {Object.} labels - * @memberof google.cloud.datastream.v1.Stream - * @instance + * Decodes a SqlServerChangeTables message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.SqlServerChangeTables + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.SqlServerChangeTables} SqlServerChangeTables + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stream.prototype.labels = $util.emptyObject; + SqlServerChangeTables.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.datastream.v1.SqlServerChangeTables(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Stream displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1.Stream - * @instance + * Decodes a SqlServerChangeTables message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.SqlServerChangeTables + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.SqlServerChangeTables} SqlServerChangeTables + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stream.prototype.displayName = ""; + SqlServerChangeTables.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Stream sourceConfig. - * @member {google.cloud.datastream.v1.ISourceConfig|null|undefined} sourceConfig - * @memberof google.cloud.datastream.v1.Stream - * @instance + * Verifies a SqlServerChangeTables message. + * @function verify + * @memberof google.cloud.datastream.v1.SqlServerChangeTables + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Stream.prototype.sourceConfig = null; + SqlServerChangeTables.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * Stream destinationConfig. - * @member {google.cloud.datastream.v1.IDestinationConfig|null|undefined} destinationConfig - * @memberof google.cloud.datastream.v1.Stream + * Creates a SqlServerChangeTables message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.SqlServerChangeTables + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.SqlServerChangeTables} SqlServerChangeTables + */ + SqlServerChangeTables.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SqlServerChangeTables) + return object; + return new $root.google.cloud.datastream.v1.SqlServerChangeTables(); + }; + + /** + * Creates a plain object from a SqlServerChangeTables message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.SqlServerChangeTables + * @static + * @param {google.cloud.datastream.v1.SqlServerChangeTables} message SqlServerChangeTables + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlServerChangeTables.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SqlServerChangeTables to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.SqlServerChangeTables * @instance + * @returns {Object.} JSON object */ - Stream.prototype.destinationConfig = null; + SqlServerChangeTables.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Stream state. - * @member {google.cloud.datastream.v1.Stream.State} state - * @memberof google.cloud.datastream.v1.Stream + * Gets the default type url for SqlServerChangeTables + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.SqlServerChangeTables + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlServerChangeTables.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerChangeTables"; + }; + + return SqlServerChangeTables; + })(); + + v1.MysqlColumn = (function() { + + /** + * Properties of a MysqlColumn. + * @memberof google.cloud.datastream.v1 + * @interface IMysqlColumn + * @property {string|null} [column] MysqlColumn column + * @property {string|null} [dataType] MysqlColumn dataType + * @property {number|null} [length] MysqlColumn length + * @property {string|null} [collation] MysqlColumn collation + * @property {boolean|null} [primaryKey] MysqlColumn primaryKey + * @property {boolean|null} [nullable] MysqlColumn nullable + * @property {number|null} [ordinalPosition] MysqlColumn ordinalPosition + * @property {number|null} [precision] MysqlColumn precision + * @property {number|null} [scale] MysqlColumn scale + */ + + /** + * Constructs a new MysqlColumn. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a MysqlColumn. + * @implements IMysqlColumn + * @constructor + * @param {google.cloud.datastream.v1.IMysqlColumn=} [properties] Properties to set + */ + function MysqlColumn(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]]; + } + + /** + * MysqlColumn column. + * @member {string} column + * @memberof google.cloud.datastream.v1.MysqlColumn * @instance */ - Stream.prototype.state = 0; + MysqlColumn.prototype.column = ""; /** - * Stream backfillAll. - * @member {google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null|undefined} backfillAll - * @memberof google.cloud.datastream.v1.Stream + * MysqlColumn dataType. + * @member {string} dataType + * @memberof google.cloud.datastream.v1.MysqlColumn * @instance */ - Stream.prototype.backfillAll = null; + MysqlColumn.prototype.dataType = ""; /** - * Stream backfillNone. - * @member {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null|undefined} backfillNone - * @memberof google.cloud.datastream.v1.Stream + * MysqlColumn length. + * @member {number} length + * @memberof google.cloud.datastream.v1.MysqlColumn * @instance */ - Stream.prototype.backfillNone = null; + MysqlColumn.prototype.length = 0; /** - * Stream errors. - * @member {Array.} errors - * @memberof google.cloud.datastream.v1.Stream + * MysqlColumn collation. + * @member {string} collation + * @memberof google.cloud.datastream.v1.MysqlColumn * @instance */ - Stream.prototype.errors = $util.emptyArray; + MysqlColumn.prototype.collation = ""; /** - * Stream customerManagedEncryptionKey. - * @member {string|null|undefined} customerManagedEncryptionKey - * @memberof google.cloud.datastream.v1.Stream + * MysqlColumn primaryKey. + * @member {boolean} primaryKey + * @memberof google.cloud.datastream.v1.MysqlColumn * @instance */ - Stream.prototype.customerManagedEncryptionKey = null; + MysqlColumn.prototype.primaryKey = false; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * MysqlColumn nullable. + * @member {boolean} nullable + * @memberof google.cloud.datastream.v1.MysqlColumn + * @instance + */ + MysqlColumn.prototype.nullable = false; /** - * Stream backfillStrategy. - * @member {"backfillAll"|"backfillNone"|undefined} backfillStrategy - * @memberof google.cloud.datastream.v1.Stream + * MysqlColumn ordinalPosition. + * @member {number} ordinalPosition + * @memberof google.cloud.datastream.v1.MysqlColumn * @instance */ - Object.defineProperty(Stream.prototype, "backfillStrategy", { - get: $util.oneOfGetter($oneOfFields = ["backfillAll", "backfillNone"]), - set: $util.oneOfSetter($oneOfFields) - }); + MysqlColumn.prototype.ordinalPosition = 0; /** - * Stream _customerManagedEncryptionKey. - * @member {"customerManagedEncryptionKey"|undefined} _customerManagedEncryptionKey - * @memberof google.cloud.datastream.v1.Stream + * MysqlColumn precision. + * @member {number} precision + * @memberof google.cloud.datastream.v1.MysqlColumn * @instance */ - Object.defineProperty(Stream.prototype, "_customerManagedEncryptionKey", { - get: $util.oneOfGetter($oneOfFields = ["customerManagedEncryptionKey"]), - set: $util.oneOfSetter($oneOfFields) - }); + MysqlColumn.prototype.precision = 0; /** - * Creates a new Stream instance using the specified properties. + * MysqlColumn scale. + * @member {number} scale + * @memberof google.cloud.datastream.v1.MysqlColumn + * @instance + */ + MysqlColumn.prototype.scale = 0; + + /** + * Creates a new MysqlColumn instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.Stream + * @memberof google.cloud.datastream.v1.MysqlColumn * @static - * @param {google.cloud.datastream.v1.IStream=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Stream} Stream instance + * @param {google.cloud.datastream.v1.IMysqlColumn=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn instance */ - Stream.create = function create(properties) { - return new Stream(properties); + MysqlColumn.create = function create(properties) { + return new MysqlColumn(properties); }; /** - * Encodes the specified Stream message. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. + * Encodes the specified MysqlColumn message. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.Stream + * @memberof google.cloud.datastream.v1.MysqlColumn * @static - * @param {google.cloud.datastream.v1.IStream} message Stream message or plain object to encode + * @param {google.cloud.datastream.v1.IMysqlColumn} message MysqlColumn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stream.encode = function encode(message, writer) { + MysqlColumn.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.sourceConfig != null && Object.hasOwnProperty.call(message, "sourceConfig")) - $root.google.cloud.datastream.v1.SourceConfig.encode(message.sourceConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.destinationConfig != null && Object.hasOwnProperty.call(message, "destinationConfig")) - $root.google.cloud.datastream.v1.DestinationConfig.encode(message.destinationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.datastream.v1.Error.encode(message.errors[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.customerManagedEncryptionKey != null && Object.hasOwnProperty.call(message, "customerManagedEncryptionKey")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.customerManagedEncryptionKey); - if (message.backfillAll != null && Object.hasOwnProperty.call(message, "backfillAll")) - $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.encode(message.backfillAll, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.backfillNone != null && Object.hasOwnProperty.call(message, "backfillNone")) - $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.encode(message.backfillNone, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.column); + if (message.dataType != null && Object.hasOwnProperty.call(message, "dataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); + if (message.length != null && Object.hasOwnProperty.call(message, "length")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.length); + if (message.collation != null && Object.hasOwnProperty.call(message, "collation")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.collation); + if (message.primaryKey != null && Object.hasOwnProperty.call(message, "primaryKey")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.primaryKey); + if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.nullable); + if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.ordinalPosition); + if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.precision); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.scale); return writer; }; /** - * Encodes the specified Stream message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. + * Encodes the specified MysqlColumn message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlColumn.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Stream + * @memberof google.cloud.datastream.v1.MysqlColumn * @static - * @param {google.cloud.datastream.v1.IStream} message Stream message or plain object to encode + * @param {google.cloud.datastream.v1.IMysqlColumn} message MysqlColumn message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Stream.encodeDelimited = function encodeDelimited(message, writer) { + MysqlColumn.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Stream message from the specified reader or buffer. + * Decodes a MysqlColumn message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.Stream + * @memberof google.cloud.datastream.v1.MysqlColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Stream} Stream + * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stream.decode = function decode(reader, length) { + MysqlColumn.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.datastream.v1.Stream(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlColumn(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.column = reader.string(); break; } case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.dataType = reader.string(); break; } case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.length = reader.int32(); break; } case 4: { - 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; + message.collation = reader.string(); break; } case 5: { - message.displayName = reader.string(); + message.primaryKey = reader.bool(); break; } case 6: { - message.sourceConfig = $root.google.cloud.datastream.v1.SourceConfig.decode(reader, reader.uint32()); + message.nullable = reader.bool(); break; } case 7: { - message.destinationConfig = $root.google.cloud.datastream.v1.DestinationConfig.decode(reader, reader.uint32()); + message.ordinalPosition = reader.int32(); break; } case 8: { - message.state = reader.int32(); - break; - } - case 101: { - message.backfillAll = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.decode(reader, reader.uint32()); - break; - } - case 102: { - message.backfillNone = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.decode(reader, reader.uint32()); + message.precision = reader.int32(); break; } case 9: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32())); - break; - } - case 10: { - message.customerManagedEncryptionKey = reader.string(); + message.scale = reader.int32(); break; } default: @@ -21648,372 +21880,6838 @@ }; /** - * Decodes a Stream message from the specified reader or buffer, length delimited. + * Decodes a MysqlColumn message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Stream + * @memberof google.cloud.datastream.v1.MysqlColumn * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Stream} Stream + * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Stream.decodeDelimited = function decodeDelimited(reader) { + MysqlColumn.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Stream message. + * Verifies a MysqlColumn message. * @function verify - * @memberof google.cloud.datastream.v1.Stream + * @memberof google.cloud.datastream.v1.MysqlColumn * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Stream.verify = function verify(message) { + MysqlColumn.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.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.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.sourceConfig != null && message.hasOwnProperty("sourceConfig")) { - var error = $root.google.cloud.datastream.v1.SourceConfig.verify(message.sourceConfig); - if (error) - return "sourceConfig." + error; - } - if (message.destinationConfig != null && message.hasOwnProperty("destinationConfig")) { - var error = $root.google.cloud.datastream.v1.DestinationConfig.verify(message.destinationConfig); - if (error) - return "destinationConfig." + 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 6: - case 7: - case 8: - break; - } - if (message.backfillAll != null && message.hasOwnProperty("backfillAll")) { - properties.backfillStrategy = 1; - { - var error = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify(message.backfillAll); - if (error) - return "backfillAll." + error; - } - } - if (message.backfillNone != null && message.hasOwnProperty("backfillNone")) { - if (properties.backfillStrategy === 1) - return "backfillStrategy: multiple values"; - properties.backfillStrategy = 1; - { - var error = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify(message.backfillNone); - if (error) - return "backfillNone." + error; - } - } - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.cloud.datastream.v1.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - if (message.customerManagedEncryptionKey != null && message.hasOwnProperty("customerManagedEncryptionKey")) { - properties._customerManagedEncryptionKey = 1; - if (!$util.isString(message.customerManagedEncryptionKey)) - return "customerManagedEncryptionKey: string expected"; - } + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.dataType != null && message.hasOwnProperty("dataType")) + if (!$util.isString(message.dataType)) + return "dataType: string expected"; + if (message.length != null && message.hasOwnProperty("length")) + if (!$util.isInteger(message.length)) + return "length: integer expected"; + if (message.collation != null && message.hasOwnProperty("collation")) + if (!$util.isString(message.collation)) + return "collation: string expected"; + if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) + if (typeof message.primaryKey !== "boolean") + return "primaryKey: boolean expected"; + if (message.nullable != null && message.hasOwnProperty("nullable")) + if (typeof message.nullable !== "boolean") + return "nullable: boolean expected"; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + if (!$util.isInteger(message.ordinalPosition)) + return "ordinalPosition: integer expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (!$util.isInteger(message.precision)) + return "precision: integer expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (!$util.isInteger(message.scale)) + return "scale: integer expected"; return null; }; /** - * Creates a Stream message from a plain object. Also converts values to their respective internal types. + * Creates a MysqlColumn message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.Stream + * @memberof google.cloud.datastream.v1.MysqlColumn * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Stream} Stream + * @returns {google.cloud.datastream.v1.MysqlColumn} MysqlColumn */ - Stream.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Stream) + MysqlColumn.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.MysqlColumn) return object; - var message = new $root.google.cloud.datastream.v1.Stream(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.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.datastream.v1.Stream.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.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]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.sourceConfig != null) { - if (typeof object.sourceConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.sourceConfig: object expected"); - message.sourceConfig = $root.google.cloud.datastream.v1.SourceConfig.fromObject(object.sourceConfig); - } - if (object.destinationConfig != null) { - if (typeof object.destinationConfig !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.destinationConfig: object expected"); - message.destinationConfig = $root.google.cloud.datastream.v1.DestinationConfig.fromObject(object.destinationConfig); + var message = new $root.google.cloud.datastream.v1.MysqlColumn(); + if (object.column != null) + message.column = String(object.column); + if (object.dataType != null) + message.dataType = String(object.dataType); + if (object.length != null) + message.length = object.length | 0; + if (object.collation != null) + message.collation = String(object.collation); + if (object.primaryKey != null) + message.primaryKey = Boolean(object.primaryKey); + if (object.nullable != null) + message.nullable = Boolean(object.nullable); + if (object.ordinalPosition != null) + message.ordinalPosition = object.ordinalPosition | 0; + if (object.precision != null) + message.precision = object.precision | 0; + if (object.scale != null) + message.scale = object.scale | 0; + return message; + }; + + /** + * Creates a plain object from a MysqlColumn message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.MysqlColumn + * @static + * @param {google.cloud.datastream.v1.MysqlColumn} message MysqlColumn + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MysqlColumn.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.column = ""; + object.dataType = ""; + object.length = 0; + object.collation = ""; + object.primaryKey = false; + object.nullable = false; + object.ordinalPosition = 0; + object.precision = 0; + object.scale = 0; } - 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 "NOT_STARTED": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "PAUSED": - case 3: - message.state = 3; - break; - case "MAINTENANCE": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "FAILED_PERMANENTLY": - case 6: - message.state = 6; - break; - case "STARTING": - case 7: - message.state = 7; - break; - case "DRAINING": - case 8: - message.state = 8; - break; + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.dataType != null && message.hasOwnProperty("dataType")) + object.dataType = message.dataType; + if (message.length != null && message.hasOwnProperty("length")) + object.length = message.length; + if (message.collation != null && message.hasOwnProperty("collation")) + object.collation = message.collation; + if (message.primaryKey != null && message.hasOwnProperty("primaryKey")) + object.primaryKey = message.primaryKey; + if (message.nullable != null && message.hasOwnProperty("nullable")) + object.nullable = message.nullable; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + object.ordinalPosition = message.ordinalPosition; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = message.precision; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = message.scale; + return object; + }; + + /** + * Converts this MysqlColumn to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.MysqlColumn + * @instance + * @returns {Object.} JSON object + */ + MysqlColumn.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MysqlColumn + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.MysqlColumn + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MysqlColumn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.backfillAll != null) { - if (typeof object.backfillAll !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.backfillAll: object expected"); - message.backfillAll = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.fromObject(object.backfillAll); + return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlColumn"; + }; + + return MysqlColumn; + })(); + + v1.MysqlTable = (function() { + + /** + * Properties of a MysqlTable. + * @memberof google.cloud.datastream.v1 + * @interface IMysqlTable + * @property {string|null} [table] MysqlTable table + * @property {Array.|null} [mysqlColumns] MysqlTable mysqlColumns + */ + + /** + * Constructs a new MysqlTable. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a MysqlTable. + * @implements IMysqlTable + * @constructor + * @param {google.cloud.datastream.v1.IMysqlTable=} [properties] Properties to set + */ + function MysqlTable(properties) { + this.mysqlColumns = []; + 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]]; + } + + /** + * MysqlTable table. + * @member {string} table + * @memberof google.cloud.datastream.v1.MysqlTable + * @instance + */ + MysqlTable.prototype.table = ""; + + /** + * MysqlTable mysqlColumns. + * @member {Array.} mysqlColumns + * @memberof google.cloud.datastream.v1.MysqlTable + * @instance + */ + MysqlTable.prototype.mysqlColumns = $util.emptyArray; + + /** + * Creates a new MysqlTable instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.MysqlTable + * @static + * @param {google.cloud.datastream.v1.IMysqlTable=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable instance + */ + MysqlTable.create = function create(properties) { + return new MysqlTable(properties); + }; + + /** + * Encodes the specified MysqlTable message. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.MysqlTable + * @static + * @param {google.cloud.datastream.v1.IMysqlTable} message MysqlTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MysqlTable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.mysqlColumns != null && message.mysqlColumns.length) + for (var i = 0; i < message.mysqlColumns.length; ++i) + $root.google.cloud.datastream.v1.MysqlColumn.encode(message.mysqlColumns[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MysqlTable message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlTable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.MysqlTable + * @static + * @param {google.cloud.datastream.v1.IMysqlTable} message MysqlTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MysqlTable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MysqlTable message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.MysqlTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MysqlTable.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.datastream.v1.MysqlTable(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.table = reader.string(); + break; + } + case 2: { + if (!(message.mysqlColumns && message.mysqlColumns.length)) + message.mysqlColumns = []; + message.mysqlColumns.push($root.google.cloud.datastream.v1.MysqlColumn.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - if (object.backfillNone != null) { - if (typeof object.backfillNone !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.backfillNone: object expected"); - message.backfillNone = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.fromObject(object.backfillNone); + return message; + }; + + /** + * Decodes a MysqlTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.MysqlTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MysqlTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MysqlTable message. + * @function verify + * @memberof google.cloud.datastream.v1.MysqlTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MysqlTable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.mysqlColumns != null && message.hasOwnProperty("mysqlColumns")) { + if (!Array.isArray(message.mysqlColumns)) + return "mysqlColumns: array expected"; + for (var i = 0; i < message.mysqlColumns.length; ++i) { + var error = $root.google.cloud.datastream.v1.MysqlColumn.verify(message.mysqlColumns[i]); + if (error) + return "mysqlColumns." + error; + } } - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.datastream.v1.Stream.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.errors: object expected"); - message.errors[i] = $root.google.cloud.datastream.v1.Error.fromObject(object.errors[i]); + return null; + }; + + /** + * Creates a MysqlTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.MysqlTable + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.MysqlTable} MysqlTable + */ + MysqlTable.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.MysqlTable) + return object; + var message = new $root.google.cloud.datastream.v1.MysqlTable(); + if (object.table != null) + message.table = String(object.table); + if (object.mysqlColumns) { + if (!Array.isArray(object.mysqlColumns)) + throw TypeError(".google.cloud.datastream.v1.MysqlTable.mysqlColumns: array expected"); + message.mysqlColumns = []; + for (var i = 0; i < object.mysqlColumns.length; ++i) { + if (typeof object.mysqlColumns[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.MysqlTable.mysqlColumns: object expected"); + message.mysqlColumns[i] = $root.google.cloud.datastream.v1.MysqlColumn.fromObject(object.mysqlColumns[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MysqlTable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.MysqlTable + * @static + * @param {google.cloud.datastream.v1.MysqlTable} message MysqlTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MysqlTable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mysqlColumns = []; + if (options.defaults) + object.table = ""; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.mysqlColumns && message.mysqlColumns.length) { + object.mysqlColumns = []; + for (var j = 0; j < message.mysqlColumns.length; ++j) + object.mysqlColumns[j] = $root.google.cloud.datastream.v1.MysqlColumn.toObject(message.mysqlColumns[j], options); + } + return object; + }; + + /** + * Converts this MysqlTable to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.MysqlTable + * @instance + * @returns {Object.} JSON object + */ + MysqlTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MysqlTable + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.MysqlTable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MysqlTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlTable"; + }; + + return MysqlTable; + })(); + + v1.MysqlDatabase = (function() { + + /** + * Properties of a MysqlDatabase. + * @memberof google.cloud.datastream.v1 + * @interface IMysqlDatabase + * @property {string|null} [database] MysqlDatabase database + * @property {Array.|null} [mysqlTables] MysqlDatabase mysqlTables + */ + + /** + * Constructs a new MysqlDatabase. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a MysqlDatabase. + * @implements IMysqlDatabase + * @constructor + * @param {google.cloud.datastream.v1.IMysqlDatabase=} [properties] Properties to set + */ + function MysqlDatabase(properties) { + this.mysqlTables = []; + 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]]; + } + + /** + * MysqlDatabase database. + * @member {string} database + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @instance + */ + MysqlDatabase.prototype.database = ""; + + /** + * MysqlDatabase mysqlTables. + * @member {Array.} mysqlTables + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @instance + */ + MysqlDatabase.prototype.mysqlTables = $util.emptyArray; + + /** + * Creates a new MysqlDatabase instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @static + * @param {google.cloud.datastream.v1.IMysqlDatabase=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase instance + */ + MysqlDatabase.create = function create(properties) { + return new MysqlDatabase(properties); + }; + + /** + * Encodes the specified MysqlDatabase message. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @static + * @param {google.cloud.datastream.v1.IMysqlDatabase} message MysqlDatabase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MysqlDatabase.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); + if (message.mysqlTables != null && message.mysqlTables.length) + for (var i = 0; i < message.mysqlTables.length; ++i) + $root.google.cloud.datastream.v1.MysqlTable.encode(message.mysqlTables[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MysqlDatabase message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlDatabase.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @static + * @param {google.cloud.datastream.v1.IMysqlDatabase} message MysqlDatabase message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MysqlDatabase.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MysqlDatabase message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MysqlDatabase.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.datastream.v1.MysqlDatabase(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.database = reader.string(); + break; + } + case 2: { + if (!(message.mysqlTables && message.mysqlTables.length)) + message.mysqlTables = []; + message.mysqlTables.push($root.google.cloud.datastream.v1.MysqlTable.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MysqlDatabase message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MysqlDatabase.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MysqlDatabase message. + * @function verify + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MysqlDatabase.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.mysqlTables != null && message.hasOwnProperty("mysqlTables")) { + if (!Array.isArray(message.mysqlTables)) + return "mysqlTables: array expected"; + for (var i = 0; i < message.mysqlTables.length; ++i) { + var error = $root.google.cloud.datastream.v1.MysqlTable.verify(message.mysqlTables[i]); + if (error) + return "mysqlTables." + error; + } + } + return null; + }; + + /** + * Creates a MysqlDatabase message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.MysqlDatabase} MysqlDatabase + */ + MysqlDatabase.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.MysqlDatabase) + return object; + var message = new $root.google.cloud.datastream.v1.MysqlDatabase(); + if (object.database != null) + message.database = String(object.database); + if (object.mysqlTables) { + if (!Array.isArray(object.mysqlTables)) + throw TypeError(".google.cloud.datastream.v1.MysqlDatabase.mysqlTables: array expected"); + message.mysqlTables = []; + for (var i = 0; i < object.mysqlTables.length; ++i) { + if (typeof object.mysqlTables[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.MysqlDatabase.mysqlTables: object expected"); + message.mysqlTables[i] = $root.google.cloud.datastream.v1.MysqlTable.fromObject(object.mysqlTables[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MysqlDatabase message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @static + * @param {google.cloud.datastream.v1.MysqlDatabase} message MysqlDatabase + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MysqlDatabase.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mysqlTables = []; + if (options.defaults) + object.database = ""; + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.mysqlTables && message.mysqlTables.length) { + object.mysqlTables = []; + for (var j = 0; j < message.mysqlTables.length; ++j) + object.mysqlTables[j] = $root.google.cloud.datastream.v1.MysqlTable.toObject(message.mysqlTables[j], options); + } + return object; + }; + + /** + * Converts this MysqlDatabase to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @instance + * @returns {Object.} JSON object + */ + MysqlDatabase.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MysqlDatabase + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.MysqlDatabase + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MysqlDatabase.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlDatabase"; + }; + + return MysqlDatabase; + })(); + + v1.MysqlRdbms = (function() { + + /** + * Properties of a MysqlRdbms. + * @memberof google.cloud.datastream.v1 + * @interface IMysqlRdbms + * @property {Array.|null} [mysqlDatabases] MysqlRdbms mysqlDatabases + */ + + /** + * Constructs a new MysqlRdbms. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a MysqlRdbms. + * @implements IMysqlRdbms + * @constructor + * @param {google.cloud.datastream.v1.IMysqlRdbms=} [properties] Properties to set + */ + function MysqlRdbms(properties) { + this.mysqlDatabases = []; + 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]]; + } + + /** + * MysqlRdbms mysqlDatabases. + * @member {Array.} mysqlDatabases + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @instance + */ + MysqlRdbms.prototype.mysqlDatabases = $util.emptyArray; + + /** + * Creates a new MysqlRdbms instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @static + * @param {google.cloud.datastream.v1.IMysqlRdbms=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms instance + */ + MysqlRdbms.create = function create(properties) { + return new MysqlRdbms(properties); + }; + + /** + * Encodes the specified MysqlRdbms message. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @static + * @param {google.cloud.datastream.v1.IMysqlRdbms} message MysqlRdbms message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MysqlRdbms.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mysqlDatabases != null && message.mysqlDatabases.length) + for (var i = 0; i < message.mysqlDatabases.length; ++i) + $root.google.cloud.datastream.v1.MysqlDatabase.encode(message.mysqlDatabases[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MysqlRdbms message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlRdbms.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @static + * @param {google.cloud.datastream.v1.IMysqlRdbms} message MysqlRdbms message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MysqlRdbms.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MysqlRdbms message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MysqlRdbms.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.datastream.v1.MysqlRdbms(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.mysqlDatabases && message.mysqlDatabases.length)) + message.mysqlDatabases = []; + message.mysqlDatabases.push($root.google.cloud.datastream.v1.MysqlDatabase.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MysqlRdbms message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MysqlRdbms.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MysqlRdbms message. + * @function verify + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MysqlRdbms.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mysqlDatabases != null && message.hasOwnProperty("mysqlDatabases")) { + if (!Array.isArray(message.mysqlDatabases)) + return "mysqlDatabases: array expected"; + for (var i = 0; i < message.mysqlDatabases.length; ++i) { + var error = $root.google.cloud.datastream.v1.MysqlDatabase.verify(message.mysqlDatabases[i]); + if (error) + return "mysqlDatabases." + error; + } + } + return null; + }; + + /** + * Creates a MysqlRdbms message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.MysqlRdbms} MysqlRdbms + */ + MysqlRdbms.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.MysqlRdbms) + return object; + var message = new $root.google.cloud.datastream.v1.MysqlRdbms(); + if (object.mysqlDatabases) { + if (!Array.isArray(object.mysqlDatabases)) + throw TypeError(".google.cloud.datastream.v1.MysqlRdbms.mysqlDatabases: array expected"); + message.mysqlDatabases = []; + for (var i = 0; i < object.mysqlDatabases.length; ++i) { + if (typeof object.mysqlDatabases[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.MysqlRdbms.mysqlDatabases: object expected"); + message.mysqlDatabases[i] = $root.google.cloud.datastream.v1.MysqlDatabase.fromObject(object.mysqlDatabases[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MysqlRdbms message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @static + * @param {google.cloud.datastream.v1.MysqlRdbms} message MysqlRdbms + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MysqlRdbms.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mysqlDatabases = []; + if (message.mysqlDatabases && message.mysqlDatabases.length) { + object.mysqlDatabases = []; + for (var j = 0; j < message.mysqlDatabases.length; ++j) + object.mysqlDatabases[j] = $root.google.cloud.datastream.v1.MysqlDatabase.toObject(message.mysqlDatabases[j], options); + } + return object; + }; + + /** + * Converts this MysqlRdbms to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @instance + * @returns {Object.} JSON object + */ + MysqlRdbms.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MysqlRdbms + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.MysqlRdbms + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MysqlRdbms.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlRdbms"; + }; + + return MysqlRdbms; + })(); + + v1.MysqlSourceConfig = (function() { + + /** + * Properties of a MysqlSourceConfig. + * @memberof google.cloud.datastream.v1 + * @interface IMysqlSourceConfig + * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [includeObjects] MysqlSourceConfig includeObjects + * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [excludeObjects] MysqlSourceConfig excludeObjects + * @property {number|null} [maxConcurrentCdcTasks] MysqlSourceConfig maxConcurrentCdcTasks + * @property {number|null} [maxConcurrentBackfillTasks] MysqlSourceConfig maxConcurrentBackfillTasks + * @property {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition|null} [binaryLogPosition] MysqlSourceConfig binaryLogPosition + * @property {google.cloud.datastream.v1.MysqlSourceConfig.IGtid|null} [gtid] MysqlSourceConfig gtid + */ + + /** + * Constructs a new MysqlSourceConfig. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a MysqlSourceConfig. + * @implements IMysqlSourceConfig + * @constructor + * @param {google.cloud.datastream.v1.IMysqlSourceConfig=} [properties] Properties to set + */ + function MysqlSourceConfig(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]]; + } + + /** + * MysqlSourceConfig includeObjects. + * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} includeObjects + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @instance + */ + MysqlSourceConfig.prototype.includeObjects = null; + + /** + * MysqlSourceConfig excludeObjects. + * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} excludeObjects + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @instance + */ + MysqlSourceConfig.prototype.excludeObjects = null; + + /** + * MysqlSourceConfig maxConcurrentCdcTasks. + * @member {number} maxConcurrentCdcTasks + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @instance + */ + MysqlSourceConfig.prototype.maxConcurrentCdcTasks = 0; + + /** + * MysqlSourceConfig maxConcurrentBackfillTasks. + * @member {number} maxConcurrentBackfillTasks + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @instance + */ + MysqlSourceConfig.prototype.maxConcurrentBackfillTasks = 0; + + /** + * MysqlSourceConfig binaryLogPosition. + * @member {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition|null|undefined} binaryLogPosition + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @instance + */ + MysqlSourceConfig.prototype.binaryLogPosition = null; + + /** + * MysqlSourceConfig gtid. + * @member {google.cloud.datastream.v1.MysqlSourceConfig.IGtid|null|undefined} gtid + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @instance + */ + MysqlSourceConfig.prototype.gtid = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MysqlSourceConfig cdcMethod. + * @member {"binaryLogPosition"|"gtid"|undefined} cdcMethod + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @instance + */ + Object.defineProperty(MysqlSourceConfig.prototype, "cdcMethod", { + get: $util.oneOfGetter($oneOfFields = ["binaryLogPosition", "gtid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MysqlSourceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @static + * @param {google.cloud.datastream.v1.IMysqlSourceConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig instance + */ + MysqlSourceConfig.create = function create(properties) { + return new MysqlSourceConfig(properties); + }; + + /** + * Encodes the specified MysqlSourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @static + * @param {google.cloud.datastream.v1.IMysqlSourceConfig} message MysqlSourceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MysqlSourceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeObjects != null && Object.hasOwnProperty.call(message, "includeObjects")) + $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.includeObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.excludeObjects != null && Object.hasOwnProperty.call(message, "excludeObjects")) + $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maxConcurrentCdcTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentCdcTasks")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxConcurrentCdcTasks); + if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConcurrentBackfillTasks); + if (message.binaryLogPosition != null && Object.hasOwnProperty.call(message, "binaryLogPosition")) + $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.encode(message.binaryLogPosition, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.gtid != null && Object.hasOwnProperty.call(message, "gtid")) + $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid.encode(message.gtid, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MysqlSourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @static + * @param {google.cloud.datastream.v1.IMysqlSourceConfig} message MysqlSourceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MysqlSourceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MysqlSourceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MysqlSourceConfig.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.datastream.v1.MysqlSourceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.includeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); + break; + } + case 2: { + message.excludeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); + break; + } + case 3: { + message.maxConcurrentCdcTasks = reader.int32(); + break; + } + case 4: { + message.maxConcurrentBackfillTasks = reader.int32(); + break; + } + case 101: { + message.binaryLogPosition = $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.decode(reader, reader.uint32()); + break; + } + case 102: { + message.gtid = $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MysqlSourceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MysqlSourceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MysqlSourceConfig message. + * @function verify + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MysqlSourceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) { + var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.includeObjects); + if (error) + return "includeObjects." + error; + } + if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) { + var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.excludeObjects); + if (error) + return "excludeObjects." + error; + } + if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) + if (!$util.isInteger(message.maxConcurrentCdcTasks)) + return "maxConcurrentCdcTasks: integer expected"; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + if (!$util.isInteger(message.maxConcurrentBackfillTasks)) + return "maxConcurrentBackfillTasks: integer expected"; + if (message.binaryLogPosition != null && message.hasOwnProperty("binaryLogPosition")) { + properties.cdcMethod = 1; + { + var error = $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.verify(message.binaryLogPosition); + if (error) + return "binaryLogPosition." + error; + } + } + if (message.gtid != null && message.hasOwnProperty("gtid")) { + if (properties.cdcMethod === 1) + return "cdcMethod: multiple values"; + properties.cdcMethod = 1; + { + var error = $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid.verify(message.gtid); + if (error) + return "gtid." + error; + } + } + return null; + }; + + /** + * Creates a MysqlSourceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.MysqlSourceConfig} MysqlSourceConfig + */ + MysqlSourceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.MysqlSourceConfig) + return object; + var message = new $root.google.cloud.datastream.v1.MysqlSourceConfig(); + if (object.includeObjects != null) { + if (typeof object.includeObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.MysqlSourceConfig.includeObjects: object expected"); + message.includeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.includeObjects); + } + if (object.excludeObjects != null) { + if (typeof object.excludeObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.MysqlSourceConfig.excludeObjects: object expected"); + message.excludeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.excludeObjects); + } + if (object.maxConcurrentCdcTasks != null) + message.maxConcurrentCdcTasks = object.maxConcurrentCdcTasks | 0; + if (object.maxConcurrentBackfillTasks != null) + message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; + if (object.binaryLogPosition != null) { + if (typeof object.binaryLogPosition !== "object") + throw TypeError(".google.cloud.datastream.v1.MysqlSourceConfig.binaryLogPosition: object expected"); + message.binaryLogPosition = $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.fromObject(object.binaryLogPosition); + } + if (object.gtid != null) { + if (typeof object.gtid !== "object") + throw TypeError(".google.cloud.datastream.v1.MysqlSourceConfig.gtid: object expected"); + message.gtid = $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid.fromObject(object.gtid); + } + return message; + }; + + /** + * Creates a plain object from a MysqlSourceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @static + * @param {google.cloud.datastream.v1.MysqlSourceConfig} message MysqlSourceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MysqlSourceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.includeObjects = null; + object.excludeObjects = null; + object.maxConcurrentCdcTasks = 0; + object.maxConcurrentBackfillTasks = 0; + } + if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) + object.includeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.includeObjects, options); + if (message.excludeObjects != null && message.hasOwnProperty("excludeObjects")) + object.excludeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.excludeObjects, options); + if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) + object.maxConcurrentCdcTasks = message.maxConcurrentCdcTasks; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; + if (message.binaryLogPosition != null && message.hasOwnProperty("binaryLogPosition")) { + object.binaryLogPosition = $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.toObject(message.binaryLogPosition, options); + if (options.oneofs) + object.cdcMethod = "binaryLogPosition"; + } + if (message.gtid != null && message.hasOwnProperty("gtid")) { + object.gtid = $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid.toObject(message.gtid, options); + if (options.oneofs) + object.cdcMethod = "gtid"; + } + return object; + }; + + /** + * Converts this MysqlSourceConfig to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @instance + * @returns {Object.} JSON object + */ + MysqlSourceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MysqlSourceConfig + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MysqlSourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlSourceConfig"; + }; + + MysqlSourceConfig.BinaryLogPosition = (function() { + + /** + * Properties of a BinaryLogPosition. + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @interface IBinaryLogPosition + */ + + /** + * Constructs a new BinaryLogPosition. + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @classdesc Represents a BinaryLogPosition. + * @implements IBinaryLogPosition + * @constructor + * @param {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition=} [properties] Properties to set + */ + function BinaryLogPosition(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 BinaryLogPosition instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + * @static + * @param {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition} BinaryLogPosition instance + */ + BinaryLogPosition.create = function create(properties) { + return new BinaryLogPosition(properties); + }; + + /** + * Encodes the specified BinaryLogPosition message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + * @static + * @param {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition} message BinaryLogPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryLogPosition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BinaryLogPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + * @static + * @param {google.cloud.datastream.v1.MysqlSourceConfig.IBinaryLogPosition} message BinaryLogPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BinaryLogPosition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BinaryLogPosition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition} BinaryLogPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryLogPosition.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.datastream.v1.MysqlSourceConfig.BinaryLogPosition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BinaryLogPosition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition} BinaryLogPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BinaryLogPosition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BinaryLogPosition message. + * @function verify + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BinaryLogPosition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BinaryLogPosition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition} BinaryLogPosition + */ + BinaryLogPosition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition) + return object; + return new $root.google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition(); + }; + + /** + * Creates a plain object from a BinaryLogPosition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + * @static + * @param {google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition} message BinaryLogPosition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BinaryLogPosition.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BinaryLogPosition to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + * @instance + * @returns {Object.} JSON object + */ + BinaryLogPosition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BinaryLogPosition + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BinaryLogPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition"; + }; + + return BinaryLogPosition; + })(); + + MysqlSourceConfig.Gtid = (function() { + + /** + * Properties of a Gtid. + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @interface IGtid + */ + + /** + * Constructs a new Gtid. + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @classdesc Represents a Gtid. + * @implements IGtid + * @constructor + * @param {google.cloud.datastream.v1.MysqlSourceConfig.IGtid=} [properties] Properties to set + */ + function Gtid(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 Gtid instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid + * @static + * @param {google.cloud.datastream.v1.MysqlSourceConfig.IGtid=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.MysqlSourceConfig.Gtid} Gtid instance + */ + Gtid.create = function create(properties) { + return new Gtid(properties); + }; + + /** + * Encodes the specified Gtid message. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.Gtid.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid + * @static + * @param {google.cloud.datastream.v1.MysqlSourceConfig.IGtid} message Gtid message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gtid.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Gtid message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlSourceConfig.Gtid.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid + * @static + * @param {google.cloud.datastream.v1.MysqlSourceConfig.IGtid} message Gtid message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Gtid.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Gtid message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.MysqlSourceConfig.Gtid} Gtid + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gtid.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.datastream.v1.MysqlSourceConfig.Gtid(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Gtid message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.MysqlSourceConfig.Gtid} Gtid + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Gtid.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Gtid message. + * @function verify + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Gtid.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Gtid message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.MysqlSourceConfig.Gtid} Gtid + */ + Gtid.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid) + return object; + return new $root.google.cloud.datastream.v1.MysqlSourceConfig.Gtid(); + }; + + /** + * Creates a plain object from a Gtid message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid + * @static + * @param {google.cloud.datastream.v1.MysqlSourceConfig.Gtid} message Gtid + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Gtid.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Gtid to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid + * @instance + * @returns {Object.} JSON object + */ + Gtid.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Gtid + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.MysqlSourceConfig.Gtid + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Gtid.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlSourceConfig.Gtid"; + }; + + return Gtid; + })(); + + return MysqlSourceConfig; + })(); + + v1.SourceConfig = (function() { + + /** + * Properties of a SourceConfig. + * @memberof google.cloud.datastream.v1 + * @interface ISourceConfig + * @property {string|null} [sourceConnectionProfile] SourceConfig sourceConnectionProfile + * @property {google.cloud.datastream.v1.IOracleSourceConfig|null} [oracleSourceConfig] SourceConfig oracleSourceConfig + * @property {google.cloud.datastream.v1.IMysqlSourceConfig|null} [mysqlSourceConfig] SourceConfig mysqlSourceConfig + * @property {google.cloud.datastream.v1.IPostgresqlSourceConfig|null} [postgresqlSourceConfig] SourceConfig postgresqlSourceConfig + * @property {google.cloud.datastream.v1.ISqlServerSourceConfig|null} [sqlServerSourceConfig] SourceConfig sqlServerSourceConfig + */ + + /** + * Constructs a new SourceConfig. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a SourceConfig. + * @implements ISourceConfig + * @constructor + * @param {google.cloud.datastream.v1.ISourceConfig=} [properties] Properties to set + */ + function SourceConfig(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]]; + } + + /** + * SourceConfig sourceConnectionProfile. + * @member {string} sourceConnectionProfile + * @memberof google.cloud.datastream.v1.SourceConfig + * @instance + */ + SourceConfig.prototype.sourceConnectionProfile = ""; + + /** + * SourceConfig oracleSourceConfig. + * @member {google.cloud.datastream.v1.IOracleSourceConfig|null|undefined} oracleSourceConfig + * @memberof google.cloud.datastream.v1.SourceConfig + * @instance + */ + SourceConfig.prototype.oracleSourceConfig = null; + + /** + * SourceConfig mysqlSourceConfig. + * @member {google.cloud.datastream.v1.IMysqlSourceConfig|null|undefined} mysqlSourceConfig + * @memberof google.cloud.datastream.v1.SourceConfig + * @instance + */ + SourceConfig.prototype.mysqlSourceConfig = null; + + /** + * SourceConfig postgresqlSourceConfig. + * @member {google.cloud.datastream.v1.IPostgresqlSourceConfig|null|undefined} postgresqlSourceConfig + * @memberof google.cloud.datastream.v1.SourceConfig + * @instance + */ + SourceConfig.prototype.postgresqlSourceConfig = null; + + /** + * SourceConfig sqlServerSourceConfig. + * @member {google.cloud.datastream.v1.ISqlServerSourceConfig|null|undefined} sqlServerSourceConfig + * @memberof google.cloud.datastream.v1.SourceConfig + * @instance + */ + SourceConfig.prototype.sqlServerSourceConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SourceConfig sourceStreamConfig. + * @member {"oracleSourceConfig"|"mysqlSourceConfig"|"postgresqlSourceConfig"|"sqlServerSourceConfig"|undefined} sourceStreamConfig + * @memberof google.cloud.datastream.v1.SourceConfig + * @instance + */ + Object.defineProperty(SourceConfig.prototype, "sourceStreamConfig", { + get: $util.oneOfGetter($oneOfFields = ["oracleSourceConfig", "mysqlSourceConfig", "postgresqlSourceConfig", "sqlServerSourceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SourceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.SourceConfig + * @static + * @param {google.cloud.datastream.v1.ISourceConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig instance + */ + SourceConfig.create = function create(properties) { + return new SourceConfig(properties); + }; + + /** + * Encodes the specified SourceConfig message. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.SourceConfig + * @static + * @param {google.cloud.datastream.v1.ISourceConfig} message SourceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceConnectionProfile != null && Object.hasOwnProperty.call(message, "sourceConnectionProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceConnectionProfile); + if (message.oracleSourceConfig != null && Object.hasOwnProperty.call(message, "oracleSourceConfig")) + $root.google.cloud.datastream.v1.OracleSourceConfig.encode(message.oracleSourceConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.mysqlSourceConfig != null && Object.hasOwnProperty.call(message, "mysqlSourceConfig")) + $root.google.cloud.datastream.v1.MysqlSourceConfig.encode(message.mysqlSourceConfig, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.postgresqlSourceConfig != null && Object.hasOwnProperty.call(message, "postgresqlSourceConfig")) + $root.google.cloud.datastream.v1.PostgresqlSourceConfig.encode(message.postgresqlSourceConfig, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.sqlServerSourceConfig != null && Object.hasOwnProperty.call(message, "sqlServerSourceConfig")) + $root.google.cloud.datastream.v1.SqlServerSourceConfig.encode(message.sqlServerSourceConfig, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.SourceConfig + * @static + * @param {google.cloud.datastream.v1.ISourceConfig} message SourceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.SourceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceConfig.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.datastream.v1.SourceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceConnectionProfile = reader.string(); + break; + } + case 100: { + message.oracleSourceConfig = $root.google.cloud.datastream.v1.OracleSourceConfig.decode(reader, reader.uint32()); + break; + } + case 101: { + message.mysqlSourceConfig = $root.google.cloud.datastream.v1.MysqlSourceConfig.decode(reader, reader.uint32()); + break; + } + case 102: { + message.postgresqlSourceConfig = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.decode(reader, reader.uint32()); + break; + } + case 103: { + message.sqlServerSourceConfig = $root.google.cloud.datastream.v1.SqlServerSourceConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.SourceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceConfig message. + * @function verify + * @memberof google.cloud.datastream.v1.SourceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sourceConnectionProfile != null && message.hasOwnProperty("sourceConnectionProfile")) + if (!$util.isString(message.sourceConnectionProfile)) + return "sourceConnectionProfile: string expected"; + if (message.oracleSourceConfig != null && message.hasOwnProperty("oracleSourceConfig")) { + properties.sourceStreamConfig = 1; + { + var error = $root.google.cloud.datastream.v1.OracleSourceConfig.verify(message.oracleSourceConfig); + if (error) + return "oracleSourceConfig." + error; + } + } + if (message.mysqlSourceConfig != null && message.hasOwnProperty("mysqlSourceConfig")) { + if (properties.sourceStreamConfig === 1) + return "sourceStreamConfig: multiple values"; + properties.sourceStreamConfig = 1; + { + var error = $root.google.cloud.datastream.v1.MysqlSourceConfig.verify(message.mysqlSourceConfig); + if (error) + return "mysqlSourceConfig." + error; + } + } + if (message.postgresqlSourceConfig != null && message.hasOwnProperty("postgresqlSourceConfig")) { + if (properties.sourceStreamConfig === 1) + return "sourceStreamConfig: multiple values"; + properties.sourceStreamConfig = 1; + { + var error = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.verify(message.postgresqlSourceConfig); + if (error) + return "postgresqlSourceConfig." + error; + } + } + if (message.sqlServerSourceConfig != null && message.hasOwnProperty("sqlServerSourceConfig")) { + if (properties.sourceStreamConfig === 1) + return "sourceStreamConfig: multiple values"; + properties.sourceStreamConfig = 1; + { + var error = $root.google.cloud.datastream.v1.SqlServerSourceConfig.verify(message.sqlServerSourceConfig); + if (error) + return "sqlServerSourceConfig." + error; + } + } + return null; + }; + + /** + * Creates a SourceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.SourceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.SourceConfig} SourceConfig + */ + SourceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SourceConfig) + return object; + var message = new $root.google.cloud.datastream.v1.SourceConfig(); + if (object.sourceConnectionProfile != null) + message.sourceConnectionProfile = String(object.sourceConnectionProfile); + if (object.oracleSourceConfig != null) { + if (typeof object.oracleSourceConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.SourceConfig.oracleSourceConfig: object expected"); + message.oracleSourceConfig = $root.google.cloud.datastream.v1.OracleSourceConfig.fromObject(object.oracleSourceConfig); + } + if (object.mysqlSourceConfig != null) { + if (typeof object.mysqlSourceConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.SourceConfig.mysqlSourceConfig: object expected"); + message.mysqlSourceConfig = $root.google.cloud.datastream.v1.MysqlSourceConfig.fromObject(object.mysqlSourceConfig); + } + if (object.postgresqlSourceConfig != null) { + if (typeof object.postgresqlSourceConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.SourceConfig.postgresqlSourceConfig: object expected"); + message.postgresqlSourceConfig = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.fromObject(object.postgresqlSourceConfig); + } + if (object.sqlServerSourceConfig != null) { + if (typeof object.sqlServerSourceConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.SourceConfig.sqlServerSourceConfig: object expected"); + message.sqlServerSourceConfig = $root.google.cloud.datastream.v1.SqlServerSourceConfig.fromObject(object.sqlServerSourceConfig); + } + return message; + }; + + /** + * Creates a plain object from a SourceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.SourceConfig + * @static + * @param {google.cloud.datastream.v1.SourceConfig} message SourceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sourceConnectionProfile = ""; + if (message.sourceConnectionProfile != null && message.hasOwnProperty("sourceConnectionProfile")) + object.sourceConnectionProfile = message.sourceConnectionProfile; + if (message.oracleSourceConfig != null && message.hasOwnProperty("oracleSourceConfig")) { + object.oracleSourceConfig = $root.google.cloud.datastream.v1.OracleSourceConfig.toObject(message.oracleSourceConfig, options); + if (options.oneofs) + object.sourceStreamConfig = "oracleSourceConfig"; + } + if (message.mysqlSourceConfig != null && message.hasOwnProperty("mysqlSourceConfig")) { + object.mysqlSourceConfig = $root.google.cloud.datastream.v1.MysqlSourceConfig.toObject(message.mysqlSourceConfig, options); + if (options.oneofs) + object.sourceStreamConfig = "mysqlSourceConfig"; + } + if (message.postgresqlSourceConfig != null && message.hasOwnProperty("postgresqlSourceConfig")) { + object.postgresqlSourceConfig = $root.google.cloud.datastream.v1.PostgresqlSourceConfig.toObject(message.postgresqlSourceConfig, options); + if (options.oneofs) + object.sourceStreamConfig = "postgresqlSourceConfig"; + } + if (message.sqlServerSourceConfig != null && message.hasOwnProperty("sqlServerSourceConfig")) { + object.sqlServerSourceConfig = $root.google.cloud.datastream.v1.SqlServerSourceConfig.toObject(message.sqlServerSourceConfig, options); + if (options.oneofs) + object.sourceStreamConfig = "sqlServerSourceConfig"; + } + return object; + }; + + /** + * Converts this SourceConfig to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.SourceConfig + * @instance + * @returns {Object.} JSON object + */ + SourceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceConfig + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.SourceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.SourceConfig"; + }; + + return SourceConfig; + })(); + + v1.AvroFileFormat = (function() { + + /** + * Properties of an AvroFileFormat. + * @memberof google.cloud.datastream.v1 + * @interface IAvroFileFormat + */ + + /** + * Constructs a new AvroFileFormat. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents an AvroFileFormat. + * @implements IAvroFileFormat + * @constructor + * @param {google.cloud.datastream.v1.IAvroFileFormat=} [properties] Properties to set + */ + function AvroFileFormat(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 AvroFileFormat instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.AvroFileFormat + * @static + * @param {google.cloud.datastream.v1.IAvroFileFormat=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat instance + */ + AvroFileFormat.create = function create(properties) { + return new AvroFileFormat(properties); + }; + + /** + * Encodes the specified AvroFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.AvroFileFormat + * @static + * @param {google.cloud.datastream.v1.IAvroFileFormat} message AvroFileFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvroFileFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AvroFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.AvroFileFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.AvroFileFormat + * @static + * @param {google.cloud.datastream.v1.IAvroFileFormat} message AvroFileFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvroFileFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AvroFileFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.AvroFileFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvroFileFormat.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.datastream.v1.AvroFileFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AvroFileFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.AvroFileFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvroFileFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AvroFileFormat message. + * @function verify + * @memberof google.cloud.datastream.v1.AvroFileFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AvroFileFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AvroFileFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.AvroFileFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.AvroFileFormat} AvroFileFormat + */ + AvroFileFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.AvroFileFormat) + return object; + return new $root.google.cloud.datastream.v1.AvroFileFormat(); + }; + + /** + * Creates a plain object from an AvroFileFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.AvroFileFormat + * @static + * @param {google.cloud.datastream.v1.AvroFileFormat} message AvroFileFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AvroFileFormat.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AvroFileFormat to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.AvroFileFormat + * @instance + * @returns {Object.} JSON object + */ + AvroFileFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AvroFileFormat + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.AvroFileFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AvroFileFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.AvroFileFormat"; + }; + + return AvroFileFormat; + })(); + + v1.JsonFileFormat = (function() { + + /** + * Properties of a JsonFileFormat. + * @memberof google.cloud.datastream.v1 + * @interface IJsonFileFormat + * @property {google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat|null} [schemaFileFormat] JsonFileFormat schemaFileFormat + * @property {google.cloud.datastream.v1.JsonFileFormat.JsonCompression|null} [compression] JsonFileFormat compression + */ + + /** + * Constructs a new JsonFileFormat. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a JsonFileFormat. + * @implements IJsonFileFormat + * @constructor + * @param {google.cloud.datastream.v1.IJsonFileFormat=} [properties] Properties to set + */ + function JsonFileFormat(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]]; + } + + /** + * JsonFileFormat schemaFileFormat. + * @member {google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat} schemaFileFormat + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @instance + */ + JsonFileFormat.prototype.schemaFileFormat = 0; + + /** + * JsonFileFormat compression. + * @member {google.cloud.datastream.v1.JsonFileFormat.JsonCompression} compression + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @instance + */ + JsonFileFormat.prototype.compression = 0; + + /** + * Creates a new JsonFileFormat instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @static + * @param {google.cloud.datastream.v1.IJsonFileFormat=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat instance + */ + JsonFileFormat.create = function create(properties) { + return new JsonFileFormat(properties); + }; + + /** + * Encodes the specified JsonFileFormat message. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @static + * @param {google.cloud.datastream.v1.IJsonFileFormat} message JsonFileFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonFileFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schemaFileFormat != null && Object.hasOwnProperty.call(message, "schemaFileFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.schemaFileFormat); + if (message.compression != null && Object.hasOwnProperty.call(message, "compression")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compression); + return writer; + }; + + /** + * Encodes the specified JsonFileFormat message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.JsonFileFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @static + * @param {google.cloud.datastream.v1.IJsonFileFormat} message JsonFileFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonFileFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonFileFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonFileFormat.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.datastream.v1.JsonFileFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.schemaFileFormat = reader.int32(); + break; + } + case 2: { + message.compression = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonFileFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonFileFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonFileFormat message. + * @function verify + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonFileFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schemaFileFormat != null && message.hasOwnProperty("schemaFileFormat")) + switch (message.schemaFileFormat) { + default: + return "schemaFileFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.compression != null && message.hasOwnProperty("compression")) + switch (message.compression) { + default: + return "compression: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a JsonFileFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.JsonFileFormat} JsonFileFormat + */ + JsonFileFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.JsonFileFormat) + return object; + var message = new $root.google.cloud.datastream.v1.JsonFileFormat(); + switch (object.schemaFileFormat) { + default: + if (typeof object.schemaFileFormat === "number") { + message.schemaFileFormat = object.schemaFileFormat; + break; + } + break; + case "SCHEMA_FILE_FORMAT_UNSPECIFIED": + case 0: + message.schemaFileFormat = 0; + break; + case "NO_SCHEMA_FILE": + case 1: + message.schemaFileFormat = 1; + break; + case "AVRO_SCHEMA_FILE": + case 2: + message.schemaFileFormat = 2; + break; + } + switch (object.compression) { + default: + if (typeof object.compression === "number") { + message.compression = object.compression; + break; + } + break; + case "JSON_COMPRESSION_UNSPECIFIED": + case 0: + message.compression = 0; + break; + case "NO_COMPRESSION": + case 1: + message.compression = 1; + break; + case "GZIP": + case 2: + message.compression = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a JsonFileFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @static + * @param {google.cloud.datastream.v1.JsonFileFormat} message JsonFileFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonFileFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.schemaFileFormat = options.enums === String ? "SCHEMA_FILE_FORMAT_UNSPECIFIED" : 0; + object.compression = options.enums === String ? "JSON_COMPRESSION_UNSPECIFIED" : 0; + } + if (message.schemaFileFormat != null && message.hasOwnProperty("schemaFileFormat")) + object.schemaFileFormat = options.enums === String ? $root.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat[message.schemaFileFormat] === undefined ? message.schemaFileFormat : $root.google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat[message.schemaFileFormat] : message.schemaFileFormat; + if (message.compression != null && message.hasOwnProperty("compression")) + object.compression = options.enums === String ? $root.google.cloud.datastream.v1.JsonFileFormat.JsonCompression[message.compression] === undefined ? message.compression : $root.google.cloud.datastream.v1.JsonFileFormat.JsonCompression[message.compression] : message.compression; + return object; + }; + + /** + * Converts this JsonFileFormat to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @instance + * @returns {Object.} JSON object + */ + JsonFileFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JsonFileFormat + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.JsonFileFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JsonFileFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.JsonFileFormat"; + }; + + /** + * SchemaFileFormat enum. + * @name google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat + * @enum {number} + * @property {number} SCHEMA_FILE_FORMAT_UNSPECIFIED=0 SCHEMA_FILE_FORMAT_UNSPECIFIED value + * @property {number} NO_SCHEMA_FILE=1 NO_SCHEMA_FILE value + * @property {number} AVRO_SCHEMA_FILE=2 AVRO_SCHEMA_FILE value + */ + JsonFileFormat.SchemaFileFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCHEMA_FILE_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_SCHEMA_FILE"] = 1; + values[valuesById[2] = "AVRO_SCHEMA_FILE"] = 2; + return values; + })(); + + /** + * JsonCompression enum. + * @name google.cloud.datastream.v1.JsonFileFormat.JsonCompression + * @enum {number} + * @property {number} JSON_COMPRESSION_UNSPECIFIED=0 JSON_COMPRESSION_UNSPECIFIED value + * @property {number} NO_COMPRESSION=1 NO_COMPRESSION value + * @property {number} GZIP=2 GZIP value + */ + JsonFileFormat.JsonCompression = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_COMPRESSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_COMPRESSION"] = 1; + values[valuesById[2] = "GZIP"] = 2; + return values; + })(); + + return JsonFileFormat; + })(); + + v1.GcsDestinationConfig = (function() { + + /** + * Properties of a GcsDestinationConfig. + * @memberof google.cloud.datastream.v1 + * @interface IGcsDestinationConfig + * @property {string|null} [path] GcsDestinationConfig path + * @property {number|null} [fileRotationMb] GcsDestinationConfig fileRotationMb + * @property {google.protobuf.IDuration|null} [fileRotationInterval] GcsDestinationConfig fileRotationInterval + * @property {google.cloud.datastream.v1.IAvroFileFormat|null} [avroFileFormat] GcsDestinationConfig avroFileFormat + * @property {google.cloud.datastream.v1.IJsonFileFormat|null} [jsonFileFormat] GcsDestinationConfig jsonFileFormat + */ + + /** + * Constructs a new GcsDestinationConfig. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a GcsDestinationConfig. + * @implements IGcsDestinationConfig + * @constructor + * @param {google.cloud.datastream.v1.IGcsDestinationConfig=} [properties] Properties to set + */ + function GcsDestinationConfig(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]]; + } + + /** + * GcsDestinationConfig path. + * @member {string} path + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @instance + */ + GcsDestinationConfig.prototype.path = ""; + + /** + * GcsDestinationConfig fileRotationMb. + * @member {number} fileRotationMb + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @instance + */ + GcsDestinationConfig.prototype.fileRotationMb = 0; + + /** + * GcsDestinationConfig fileRotationInterval. + * @member {google.protobuf.IDuration|null|undefined} fileRotationInterval + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @instance + */ + GcsDestinationConfig.prototype.fileRotationInterval = null; + + /** + * GcsDestinationConfig avroFileFormat. + * @member {google.cloud.datastream.v1.IAvroFileFormat|null|undefined} avroFileFormat + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @instance + */ + GcsDestinationConfig.prototype.avroFileFormat = null; + + /** + * GcsDestinationConfig jsonFileFormat. + * @member {google.cloud.datastream.v1.IJsonFileFormat|null|undefined} jsonFileFormat + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @instance + */ + GcsDestinationConfig.prototype.jsonFileFormat = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GcsDestinationConfig fileFormat. + * @member {"avroFileFormat"|"jsonFileFormat"|undefined} fileFormat + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @instance + */ + Object.defineProperty(GcsDestinationConfig.prototype, "fileFormat", { + get: $util.oneOfGetter($oneOfFields = ["avroFileFormat", "jsonFileFormat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GcsDestinationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @static + * @param {google.cloud.datastream.v1.IGcsDestinationConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig instance + */ + GcsDestinationConfig.create = function create(properties) { + return new GcsDestinationConfig(properties); + }; + + /** + * Encodes the specified GcsDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @static + * @param {google.cloud.datastream.v1.IGcsDestinationConfig} message GcsDestinationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestinationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.fileRotationMb != null && Object.hasOwnProperty.call(message, "fileRotationMb")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fileRotationMb); + if (message.fileRotationInterval != null && Object.hasOwnProperty.call(message, "fileRotationInterval")) + $root.google.protobuf.Duration.encode(message.fileRotationInterval, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.avroFileFormat != null && Object.hasOwnProperty.call(message, "avroFileFormat")) + $root.google.cloud.datastream.v1.AvroFileFormat.encode(message.avroFileFormat, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.jsonFileFormat != null && Object.hasOwnProperty.call(message, "jsonFileFormat")) + $root.google.cloud.datastream.v1.JsonFileFormat.encode(message.jsonFileFormat, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GcsDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.GcsDestinationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @static + * @param {google.cloud.datastream.v1.IGcsDestinationConfig} message GcsDestinationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsDestinationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsDestinationConfig.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.datastream.v1.GcsDestinationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.path = reader.string(); + break; + } + case 2: { + message.fileRotationMb = reader.int32(); + break; + } + case 3: { + message.fileRotationInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 100: { + message.avroFileFormat = $root.google.cloud.datastream.v1.AvroFileFormat.decode(reader, reader.uint32()); + break; + } + case 101: { + message.jsonFileFormat = $root.google.cloud.datastream.v1.JsonFileFormat.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsDestinationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsDestinationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsDestinationConfig message. + * @function verify + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsDestinationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.fileRotationMb != null && message.hasOwnProperty("fileRotationMb")) + if (!$util.isInteger(message.fileRotationMb)) + return "fileRotationMb: integer expected"; + if (message.fileRotationInterval != null && message.hasOwnProperty("fileRotationInterval")) { + var error = $root.google.protobuf.Duration.verify(message.fileRotationInterval); + if (error) + return "fileRotationInterval." + error; + } + if (message.avroFileFormat != null && message.hasOwnProperty("avroFileFormat")) { + properties.fileFormat = 1; + { + var error = $root.google.cloud.datastream.v1.AvroFileFormat.verify(message.avroFileFormat); + if (error) + return "avroFileFormat." + error; + } + } + if (message.jsonFileFormat != null && message.hasOwnProperty("jsonFileFormat")) { + if (properties.fileFormat === 1) + return "fileFormat: multiple values"; + properties.fileFormat = 1; + { + var error = $root.google.cloud.datastream.v1.JsonFileFormat.verify(message.jsonFileFormat); + if (error) + return "jsonFileFormat." + error; + } + } + return null; + }; + + /** + * Creates a GcsDestinationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.GcsDestinationConfig} GcsDestinationConfig + */ + GcsDestinationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.GcsDestinationConfig) + return object; + var message = new $root.google.cloud.datastream.v1.GcsDestinationConfig(); + if (object.path != null) + message.path = String(object.path); + if (object.fileRotationMb != null) + message.fileRotationMb = object.fileRotationMb | 0; + if (object.fileRotationInterval != null) { + if (typeof object.fileRotationInterval !== "object") + throw TypeError(".google.cloud.datastream.v1.GcsDestinationConfig.fileRotationInterval: object expected"); + message.fileRotationInterval = $root.google.protobuf.Duration.fromObject(object.fileRotationInterval); + } + if (object.avroFileFormat != null) { + if (typeof object.avroFileFormat !== "object") + throw TypeError(".google.cloud.datastream.v1.GcsDestinationConfig.avroFileFormat: object expected"); + message.avroFileFormat = $root.google.cloud.datastream.v1.AvroFileFormat.fromObject(object.avroFileFormat); + } + if (object.jsonFileFormat != null) { + if (typeof object.jsonFileFormat !== "object") + throw TypeError(".google.cloud.datastream.v1.GcsDestinationConfig.jsonFileFormat: object expected"); + message.jsonFileFormat = $root.google.cloud.datastream.v1.JsonFileFormat.fromObject(object.jsonFileFormat); + } + return message; + }; + + /** + * Creates a plain object from a GcsDestinationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @static + * @param {google.cloud.datastream.v1.GcsDestinationConfig} message GcsDestinationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsDestinationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.fileRotationMb = 0; + object.fileRotationInterval = null; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.fileRotationMb != null && message.hasOwnProperty("fileRotationMb")) + object.fileRotationMb = message.fileRotationMb; + if (message.fileRotationInterval != null && message.hasOwnProperty("fileRotationInterval")) + object.fileRotationInterval = $root.google.protobuf.Duration.toObject(message.fileRotationInterval, options); + if (message.avroFileFormat != null && message.hasOwnProperty("avroFileFormat")) { + object.avroFileFormat = $root.google.cloud.datastream.v1.AvroFileFormat.toObject(message.avroFileFormat, options); + if (options.oneofs) + object.fileFormat = "avroFileFormat"; + } + if (message.jsonFileFormat != null && message.hasOwnProperty("jsonFileFormat")) { + object.jsonFileFormat = $root.google.cloud.datastream.v1.JsonFileFormat.toObject(message.jsonFileFormat, options); + if (options.oneofs) + object.fileFormat = "jsonFileFormat"; + } + return object; + }; + + /** + * Converts this GcsDestinationConfig to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @instance + * @returns {Object.} JSON object + */ + GcsDestinationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsDestinationConfig + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.GcsDestinationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsDestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.GcsDestinationConfig"; + }; + + return GcsDestinationConfig; + })(); + + v1.BigQueryDestinationConfig = (function() { + + /** + * Properties of a BigQueryDestinationConfig. + * @memberof google.cloud.datastream.v1 + * @interface IBigQueryDestinationConfig + * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null} [singleTargetDataset] BigQueryDestinationConfig singleTargetDataset + * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null} [sourceHierarchyDatasets] BigQueryDestinationConfig sourceHierarchyDatasets + * @property {google.protobuf.IDuration|null} [dataFreshness] BigQueryDestinationConfig dataFreshness + * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge|null} [merge] BigQueryDestinationConfig merge + * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly|null} [appendOnly] BigQueryDestinationConfig appendOnly + */ + + /** + * Constructs a new BigQueryDestinationConfig. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a BigQueryDestinationConfig. + * @implements IBigQueryDestinationConfig + * @constructor + * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig=} [properties] Properties to set + */ + function BigQueryDestinationConfig(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]]; + } + + /** + * BigQueryDestinationConfig singleTargetDataset. + * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset|null|undefined} singleTargetDataset + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @instance + */ + BigQueryDestinationConfig.prototype.singleTargetDataset = null; + + /** + * BigQueryDestinationConfig sourceHierarchyDatasets. + * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets|null|undefined} sourceHierarchyDatasets + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @instance + */ + BigQueryDestinationConfig.prototype.sourceHierarchyDatasets = null; + + /** + * BigQueryDestinationConfig dataFreshness. + * @member {google.protobuf.IDuration|null|undefined} dataFreshness + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @instance + */ + BigQueryDestinationConfig.prototype.dataFreshness = null; + + /** + * BigQueryDestinationConfig merge. + * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge|null|undefined} merge + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @instance + */ + BigQueryDestinationConfig.prototype.merge = null; + + /** + * BigQueryDestinationConfig appendOnly. + * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly|null|undefined} appendOnly + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @instance + */ + BigQueryDestinationConfig.prototype.appendOnly = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BigQueryDestinationConfig datasetConfig. + * @member {"singleTargetDataset"|"sourceHierarchyDatasets"|undefined} datasetConfig + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @instance + */ + Object.defineProperty(BigQueryDestinationConfig.prototype, "datasetConfig", { + get: $util.oneOfGetter($oneOfFields = ["singleTargetDataset", "sourceHierarchyDatasets"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BigQueryDestinationConfig writeMode. + * @member {"merge"|"appendOnly"|undefined} writeMode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @instance + */ + Object.defineProperty(BigQueryDestinationConfig.prototype, "writeMode", { + get: $util.oneOfGetter($oneOfFields = ["merge", "appendOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BigQueryDestinationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @static + * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig instance + */ + BigQueryDestinationConfig.create = function create(properties) { + return new BigQueryDestinationConfig(properties); + }; + + /** + * Encodes the specified BigQueryDestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @static + * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig} message BigQueryDestinationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDestinationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.singleTargetDataset != null && Object.hasOwnProperty.call(message, "singleTargetDataset")) + $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.encode(message.singleTargetDataset, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.sourceHierarchyDatasets != null && Object.hasOwnProperty.call(message, "sourceHierarchyDatasets")) + $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.encode(message.sourceHierarchyDatasets, writer.uint32(/* id 202, wireType 2 =*/1618).fork()).ldelim(); + if (message.dataFreshness != null && Object.hasOwnProperty.call(message, "dataFreshness")) + $root.google.protobuf.Duration.encode(message.dataFreshness, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); + if (message.merge != null && Object.hasOwnProperty.call(message, "merge")) + $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.encode(message.merge, writer.uint32(/* id 301, wireType 2 =*/2410).fork()).ldelim(); + if (message.appendOnly != null && Object.hasOwnProperty.call(message, "appendOnly")) + $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.encode(message.appendOnly, writer.uint32(/* id 302, wireType 2 =*/2418).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryDestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @static + * @param {google.cloud.datastream.v1.IBigQueryDestinationConfig} message BigQueryDestinationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryDestinationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDestinationConfig.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.datastream.v1.BigQueryDestinationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 201: { + message.singleTargetDataset = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.decode(reader, reader.uint32()); + break; + } + case 202: { + message.sourceHierarchyDatasets = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.decode(reader, reader.uint32()); + break; + } + case 300: { + message.dataFreshness = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 301: { + message.merge = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.decode(reader, reader.uint32()); + break; + } + case 302: { + message.appendOnly = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryDestinationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDestinationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryDestinationConfig message. + * @function verify + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryDestinationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.singleTargetDataset != null && message.hasOwnProperty("singleTargetDataset")) { + properties.datasetConfig = 1; + { + var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify(message.singleTargetDataset); + if (error) + return "singleTargetDataset." + error; + } + } + if (message.sourceHierarchyDatasets != null && message.hasOwnProperty("sourceHierarchyDatasets")) { + if (properties.datasetConfig === 1) + return "datasetConfig: multiple values"; + properties.datasetConfig = 1; + { + var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify(message.sourceHierarchyDatasets); + if (error) + return "sourceHierarchyDatasets." + error; + } + } + if (message.dataFreshness != null && message.hasOwnProperty("dataFreshness")) { + var error = $root.google.protobuf.Duration.verify(message.dataFreshness); + if (error) + return "dataFreshness." + error; + } + if (message.merge != null && message.hasOwnProperty("merge")) { + properties.writeMode = 1; + { + var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.verify(message.merge); + if (error) + return "merge." + error; + } + } + if (message.appendOnly != null && message.hasOwnProperty("appendOnly")) { + if (properties.writeMode === 1) + return "writeMode: multiple values"; + properties.writeMode = 1; + { + var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.verify(message.appendOnly); + if (error) + return "appendOnly." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryDestinationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig} BigQueryDestinationConfig + */ + BigQueryDestinationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig) + return object; + var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig(); + if (object.singleTargetDataset != null) { + if (typeof object.singleTargetDataset !== "object") + throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.singleTargetDataset: object expected"); + message.singleTargetDataset = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.fromObject(object.singleTargetDataset); + } + if (object.sourceHierarchyDatasets != null) { + if (typeof object.sourceHierarchyDatasets !== "object") + throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.sourceHierarchyDatasets: object expected"); + message.sourceHierarchyDatasets = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.fromObject(object.sourceHierarchyDatasets); + } + if (object.dataFreshness != null) { + if (typeof object.dataFreshness !== "object") + throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.dataFreshness: object expected"); + message.dataFreshness = $root.google.protobuf.Duration.fromObject(object.dataFreshness); + } + if (object.merge != null) { + if (typeof object.merge !== "object") + throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.merge: object expected"); + message.merge = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.fromObject(object.merge); + } + if (object.appendOnly != null) { + if (typeof object.appendOnly !== "object") + throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.appendOnly: object expected"); + message.appendOnly = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.fromObject(object.appendOnly); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryDestinationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig} message BigQueryDestinationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryDestinationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dataFreshness = null; + if (message.singleTargetDataset != null && message.hasOwnProperty("singleTargetDataset")) { + object.singleTargetDataset = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.toObject(message.singleTargetDataset, options); + if (options.oneofs) + object.datasetConfig = "singleTargetDataset"; + } + if (message.sourceHierarchyDatasets != null && message.hasOwnProperty("sourceHierarchyDatasets")) { + object.sourceHierarchyDatasets = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.toObject(message.sourceHierarchyDatasets, options); + if (options.oneofs) + object.datasetConfig = "sourceHierarchyDatasets"; + } + if (message.dataFreshness != null && message.hasOwnProperty("dataFreshness")) + object.dataFreshness = $root.google.protobuf.Duration.toObject(message.dataFreshness, options); + if (message.merge != null && message.hasOwnProperty("merge")) { + object.merge = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.toObject(message.merge, options); + if (options.oneofs) + object.writeMode = "merge"; + } + if (message.appendOnly != null && message.hasOwnProperty("appendOnly")) { + object.appendOnly = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.toObject(message.appendOnly, options); + if (options.oneofs) + object.writeMode = "appendOnly"; + } + return object; + }; + + /** + * Converts this BigQueryDestinationConfig to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @instance + * @returns {Object.} JSON object + */ + BigQueryDestinationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryDestinationConfig + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryDestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig"; + }; + + BigQueryDestinationConfig.SingleTargetDataset = (function() { + + /** + * Properties of a SingleTargetDataset. + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @interface ISingleTargetDataset + * @property {string|null} [datasetId] SingleTargetDataset datasetId + */ + + /** + * Constructs a new SingleTargetDataset. + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @classdesc Represents a SingleTargetDataset. + * @implements ISingleTargetDataset + * @constructor + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset=} [properties] Properties to set + */ + function SingleTargetDataset(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]]; + } + + /** + * SingleTargetDataset datasetId. + * @member {string} datasetId + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @instance + */ + SingleTargetDataset.prototype.datasetId = ""; + + /** + * Creates a new SingleTargetDataset instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset instance + */ + SingleTargetDataset.create = function create(properties) { + return new SingleTargetDataset(properties); + }; + + /** + * Encodes the specified SingleTargetDataset message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset} message SingleTargetDataset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleTargetDataset.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId); + return writer; + }; + + /** + * Encodes the specified SingleTargetDataset message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISingleTargetDataset} message SingleTargetDataset message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleTargetDataset.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SingleTargetDataset message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleTargetDataset.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.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.datasetId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SingleTargetDataset message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleTargetDataset.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SingleTargetDataset message. + * @function verify + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SingleTargetDataset.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + return null; + }; + + /** + * Creates a SingleTargetDataset message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} SingleTargetDataset + */ + SingleTargetDataset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset) + return object; + var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset(); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + return message; + }; + + /** + * Creates a plain object from a SingleTargetDataset message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset} message SingleTargetDataset + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SingleTargetDataset.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.datasetId = ""; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + return object; + }; + + /** + * Converts this SingleTargetDataset to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @instance + * @returns {Object.} JSON object + */ + SingleTargetDataset.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SingleTargetDataset + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SingleTargetDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset"; + }; + + return SingleTargetDataset; + })(); + + BigQueryDestinationConfig.SourceHierarchyDatasets = (function() { + + /** + * Properties of a SourceHierarchyDatasets. + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @interface ISourceHierarchyDatasets + * @property {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null} [datasetTemplate] SourceHierarchyDatasets datasetTemplate + */ + + /** + * Constructs a new SourceHierarchyDatasets. + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @classdesc Represents a SourceHierarchyDatasets. + * @implements ISourceHierarchyDatasets + * @constructor + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets=} [properties] Properties to set + */ + function SourceHierarchyDatasets(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]]; + } + + /** + * SourceHierarchyDatasets datasetTemplate. + * @member {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate|null|undefined} datasetTemplate + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @instance + */ + SourceHierarchyDatasets.prototype.datasetTemplate = null; + + /** + * Creates a new SourceHierarchyDatasets instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets instance + */ + SourceHierarchyDatasets.create = function create(properties) { + return new SourceHierarchyDatasets(properties); + }; + + /** + * Encodes the specified SourceHierarchyDatasets message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets} message SourceHierarchyDatasets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceHierarchyDatasets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasetTemplate != null && Object.hasOwnProperty.call(message, "datasetTemplate")) + $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.encode(message.datasetTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceHierarchyDatasets message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.ISourceHierarchyDatasets} message SourceHierarchyDatasets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceHierarchyDatasets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceHierarchyDatasets message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceHierarchyDatasets.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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.datasetTemplate = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceHierarchyDatasets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceHierarchyDatasets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceHierarchyDatasets message. + * @function verify + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceHierarchyDatasets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datasetTemplate != null && message.hasOwnProperty("datasetTemplate")) { + var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify(message.datasetTemplate); + if (error) + return "datasetTemplate." + error; + } + return null; + }; + + /** + * Creates a SourceHierarchyDatasets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} SourceHierarchyDatasets + */ + SourceHierarchyDatasets.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets) + return object; + var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets(); + if (object.datasetTemplate != null) { + if (typeof object.datasetTemplate !== "object") + throw TypeError(".google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.datasetTemplate: object expected"); + message.datasetTemplate = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.fromObject(object.datasetTemplate); + } + return message; + }; + + /** + * Creates a plain object from a SourceHierarchyDatasets message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets} message SourceHierarchyDatasets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceHierarchyDatasets.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.datasetTemplate = null; + if (message.datasetTemplate != null && message.hasOwnProperty("datasetTemplate")) + object.datasetTemplate = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.toObject(message.datasetTemplate, options); + return object; + }; + + /** + * Converts this SourceHierarchyDatasets to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @instance + * @returns {Object.} JSON object + */ + SourceHierarchyDatasets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceHierarchyDatasets + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceHierarchyDatasets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets"; + }; + + SourceHierarchyDatasets.DatasetTemplate = (function() { + + /** + * Properties of a DatasetTemplate. + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @interface IDatasetTemplate + * @property {string|null} [location] DatasetTemplate location + * @property {string|null} [datasetIdPrefix] DatasetTemplate datasetIdPrefix + * @property {string|null} [kmsKeyName] DatasetTemplate kmsKeyName + */ + + /** + * Constructs a new DatasetTemplate. + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + * @classdesc Represents a DatasetTemplate. + * @implements IDatasetTemplate + * @constructor + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate=} [properties] Properties to set + */ + function DatasetTemplate(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]]; + } + + /** + * DatasetTemplate location. + * @member {string} location + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @instance + */ + DatasetTemplate.prototype.location = ""; + + /** + * DatasetTemplate datasetIdPrefix. + * @member {string} datasetIdPrefix + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @instance + */ + DatasetTemplate.prototype.datasetIdPrefix = ""; + + /** + * DatasetTemplate kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @instance + */ + DatasetTemplate.prototype.kmsKeyName = ""; + + /** + * Creates a new DatasetTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate instance + */ + DatasetTemplate.create = function create(properties) { + return new DatasetTemplate(properties); + }; + + /** + * Encodes the specified DatasetTemplate message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate} message DatasetTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasetTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.datasetIdPrefix != null && Object.hasOwnProperty.call(message, "datasetIdPrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetIdPrefix); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified DatasetTemplate message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.IDatasetTemplate} message DatasetTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasetTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatasetTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasetTemplate.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.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.location = reader.string(); + break; + } + case 2: { + message.datasetIdPrefix = reader.string(); + break; + } + case 3: { + message.kmsKeyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatasetTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasetTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatasetTemplate message. + * @function verify + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatasetTemplate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.datasetIdPrefix != null && message.hasOwnProperty("datasetIdPrefix")) + if (!$util.isString(message.datasetIdPrefix)) + return "datasetIdPrefix: string expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates a DatasetTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} DatasetTemplate + */ + DatasetTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate) + return object; + var message = new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate(); + if (object.location != null) + message.location = String(object.location); + if (object.datasetIdPrefix != null) + message.datasetIdPrefix = String(object.datasetIdPrefix); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from a DatasetTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate} message DatasetTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatasetTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = ""; + object.datasetIdPrefix = ""; + object.kmsKeyName = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.datasetIdPrefix != null && message.hasOwnProperty("datasetIdPrefix")) + object.datasetIdPrefix = message.datasetIdPrefix; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + return object; + }; + + /** + * Converts this DatasetTemplate to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @instance + * @returns {Object.} JSON object + */ + DatasetTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatasetTemplate + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatasetTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate"; + }; + + return DatasetTemplate; + })(); + + return SourceHierarchyDatasets; + })(); + + BigQueryDestinationConfig.AppendOnly = (function() { + + /** + * Properties of an AppendOnly. + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @interface IAppendOnly + */ + + /** + * Constructs a new AppendOnly. + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @classdesc Represents an AppendOnly. + * @implements IAppendOnly + * @constructor + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly=} [properties] Properties to set + */ + function AppendOnly(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 AppendOnly instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly} AppendOnly instance + */ + AppendOnly.create = function create(properties) { + return new AppendOnly(properties); + }; + + /** + * Encodes the specified AppendOnly message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly} message AppendOnly message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppendOnly.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AppendOnly message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IAppendOnly} message AppendOnly message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppendOnly.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppendOnly message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly} AppendOnly + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppendOnly.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.datastream.v1.BigQueryDestinationConfig.AppendOnly(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppendOnly message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly} AppendOnly + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppendOnly.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppendOnly message. + * @function verify + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppendOnly.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AppendOnly message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly} AppendOnly + */ + AppendOnly.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly) + return object; + return new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly(); + }; + + /** + * Creates a plain object from an AppendOnly message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly} message AppendOnly + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppendOnly.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AppendOnly to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + * @instance + * @returns {Object.} JSON object + */ + AppendOnly.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppendOnly + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppendOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly"; + }; + + return AppendOnly; + })(); + + BigQueryDestinationConfig.Merge = (function() { + + /** + * Properties of a Merge. + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @interface IMerge + */ + + /** + * Constructs a new Merge. + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig + * @classdesc Represents a Merge. + * @implements IMerge + * @constructor + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge=} [properties] Properties to set + */ + function Merge(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 Merge instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.Merge} Merge instance + */ + Merge.create = function create(properties) { + return new Merge(properties); + }; + + /** + * Encodes the specified Merge message. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge} message Merge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Merge.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Merge message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BigQueryDestinationConfig.Merge.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.IMerge} message Merge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Merge.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Merge message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.Merge} Merge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Merge.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.datastream.v1.BigQueryDestinationConfig.Merge(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Merge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.Merge} Merge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Merge.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Merge message. + * @function verify + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Merge.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Merge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.BigQueryDestinationConfig.Merge} Merge + */ + Merge.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge) + return object; + return new $root.google.cloud.datastream.v1.BigQueryDestinationConfig.Merge(); + }; + + /** + * Creates a plain object from a Merge message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + * @static + * @param {google.cloud.datastream.v1.BigQueryDestinationConfig.Merge} message Merge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Merge.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Merge to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + * @instance + * @returns {Object.} JSON object + */ + Merge.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Merge + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Merge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.BigQueryDestinationConfig.Merge"; + }; + + return Merge; + })(); + + return BigQueryDestinationConfig; + })(); + + v1.DestinationConfig = (function() { + + /** + * Properties of a DestinationConfig. + * @memberof google.cloud.datastream.v1 + * @interface IDestinationConfig + * @property {string|null} [destinationConnectionProfile] DestinationConfig destinationConnectionProfile + * @property {google.cloud.datastream.v1.IGcsDestinationConfig|null} [gcsDestinationConfig] DestinationConfig gcsDestinationConfig + * @property {google.cloud.datastream.v1.IBigQueryDestinationConfig|null} [bigqueryDestinationConfig] DestinationConfig bigqueryDestinationConfig + */ + + /** + * Constructs a new DestinationConfig. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a DestinationConfig. + * @implements IDestinationConfig + * @constructor + * @param {google.cloud.datastream.v1.IDestinationConfig=} [properties] Properties to set + */ + function DestinationConfig(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]]; + } + + /** + * DestinationConfig destinationConnectionProfile. + * @member {string} destinationConnectionProfile + * @memberof google.cloud.datastream.v1.DestinationConfig + * @instance + */ + DestinationConfig.prototype.destinationConnectionProfile = ""; + + /** + * DestinationConfig gcsDestinationConfig. + * @member {google.cloud.datastream.v1.IGcsDestinationConfig|null|undefined} gcsDestinationConfig + * @memberof google.cloud.datastream.v1.DestinationConfig + * @instance + */ + DestinationConfig.prototype.gcsDestinationConfig = null; + + /** + * DestinationConfig bigqueryDestinationConfig. + * @member {google.cloud.datastream.v1.IBigQueryDestinationConfig|null|undefined} bigqueryDestinationConfig + * @memberof google.cloud.datastream.v1.DestinationConfig + * @instance + */ + DestinationConfig.prototype.bigqueryDestinationConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DestinationConfig destinationStreamConfig. + * @member {"gcsDestinationConfig"|"bigqueryDestinationConfig"|undefined} destinationStreamConfig + * @memberof google.cloud.datastream.v1.DestinationConfig + * @instance + */ + Object.defineProperty(DestinationConfig.prototype, "destinationStreamConfig", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestinationConfig", "bigqueryDestinationConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DestinationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.DestinationConfig + * @static + * @param {google.cloud.datastream.v1.IDestinationConfig=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig instance + */ + DestinationConfig.create = function create(properties) { + return new DestinationConfig(properties); + }; + + /** + * Encodes the specified DestinationConfig message. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.DestinationConfig + * @static + * @param {google.cloud.datastream.v1.IDestinationConfig} message DestinationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DestinationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinationConnectionProfile != null && Object.hasOwnProperty.call(message, "destinationConnectionProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationConnectionProfile); + if (message.gcsDestinationConfig != null && Object.hasOwnProperty.call(message, "gcsDestinationConfig")) + $root.google.cloud.datastream.v1.GcsDestinationConfig.encode(message.gcsDestinationConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.bigqueryDestinationConfig != null && Object.hasOwnProperty.call(message, "bigqueryDestinationConfig")) + $root.google.cloud.datastream.v1.BigQueryDestinationConfig.encode(message.bigqueryDestinationConfig, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DestinationConfig message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.DestinationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.DestinationConfig + * @static + * @param {google.cloud.datastream.v1.IDestinationConfig} message DestinationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DestinationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DestinationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.DestinationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DestinationConfig.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.datastream.v1.DestinationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.destinationConnectionProfile = reader.string(); + break; + } + case 100: { + message.gcsDestinationConfig = $root.google.cloud.datastream.v1.GcsDestinationConfig.decode(reader, reader.uint32()); + break; + } + case 101: { + message.bigqueryDestinationConfig = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DestinationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.DestinationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DestinationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DestinationConfig message. + * @function verify + * @memberof google.cloud.datastream.v1.DestinationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DestinationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.destinationConnectionProfile != null && message.hasOwnProperty("destinationConnectionProfile")) + if (!$util.isString(message.destinationConnectionProfile)) + return "destinationConnectionProfile: string expected"; + if (message.gcsDestinationConfig != null && message.hasOwnProperty("gcsDestinationConfig")) { + properties.destinationStreamConfig = 1; + { + var error = $root.google.cloud.datastream.v1.GcsDestinationConfig.verify(message.gcsDestinationConfig); + if (error) + return "gcsDestinationConfig." + error; + } + } + if (message.bigqueryDestinationConfig != null && message.hasOwnProperty("bigqueryDestinationConfig")) { + if (properties.destinationStreamConfig === 1) + return "destinationStreamConfig: multiple values"; + properties.destinationStreamConfig = 1; + { + var error = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.verify(message.bigqueryDestinationConfig); + if (error) + return "bigqueryDestinationConfig." + error; + } + } + return null; + }; + + /** + * Creates a DestinationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.DestinationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.DestinationConfig} DestinationConfig + */ + DestinationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.DestinationConfig) + return object; + var message = new $root.google.cloud.datastream.v1.DestinationConfig(); + if (object.destinationConnectionProfile != null) + message.destinationConnectionProfile = String(object.destinationConnectionProfile); + if (object.gcsDestinationConfig != null) { + if (typeof object.gcsDestinationConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.DestinationConfig.gcsDestinationConfig: object expected"); + message.gcsDestinationConfig = $root.google.cloud.datastream.v1.GcsDestinationConfig.fromObject(object.gcsDestinationConfig); + } + if (object.bigqueryDestinationConfig != null) { + if (typeof object.bigqueryDestinationConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.DestinationConfig.bigqueryDestinationConfig: object expected"); + message.bigqueryDestinationConfig = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.fromObject(object.bigqueryDestinationConfig); + } + return message; + }; + + /** + * Creates a plain object from a DestinationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.DestinationConfig + * @static + * @param {google.cloud.datastream.v1.DestinationConfig} message DestinationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DestinationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.destinationConnectionProfile = ""; + if (message.destinationConnectionProfile != null && message.hasOwnProperty("destinationConnectionProfile")) + object.destinationConnectionProfile = message.destinationConnectionProfile; + if (message.gcsDestinationConfig != null && message.hasOwnProperty("gcsDestinationConfig")) { + object.gcsDestinationConfig = $root.google.cloud.datastream.v1.GcsDestinationConfig.toObject(message.gcsDestinationConfig, options); + if (options.oneofs) + object.destinationStreamConfig = "gcsDestinationConfig"; + } + if (message.bigqueryDestinationConfig != null && message.hasOwnProperty("bigqueryDestinationConfig")) { + object.bigqueryDestinationConfig = $root.google.cloud.datastream.v1.BigQueryDestinationConfig.toObject(message.bigqueryDestinationConfig, options); + if (options.oneofs) + object.destinationStreamConfig = "bigqueryDestinationConfig"; + } + return object; + }; + + /** + * Converts this DestinationConfig to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.DestinationConfig + * @instance + * @returns {Object.} JSON object + */ + DestinationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DestinationConfig + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.DestinationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DestinationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.DestinationConfig"; + }; + + return DestinationConfig; + })(); + + v1.Stream = (function() { + + /** + * Properties of a Stream. + * @memberof google.cloud.datastream.v1 + * @interface IStream + * @property {string|null} [name] Stream name + * @property {google.protobuf.ITimestamp|null} [createTime] Stream createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Stream updateTime + * @property {Object.|null} [labels] Stream labels + * @property {string|null} [displayName] Stream displayName + * @property {google.cloud.datastream.v1.ISourceConfig|null} [sourceConfig] Stream sourceConfig + * @property {google.cloud.datastream.v1.IDestinationConfig|null} [destinationConfig] Stream destinationConfig + * @property {google.cloud.datastream.v1.Stream.State|null} [state] Stream state + * @property {google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null} [backfillAll] Stream backfillAll + * @property {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null} [backfillNone] Stream backfillNone + * @property {Array.|null} [errors] Stream errors + * @property {string|null} [customerManagedEncryptionKey] Stream customerManagedEncryptionKey + * @property {google.protobuf.ITimestamp|null} [lastRecoveryTime] Stream lastRecoveryTime + */ + + /** + * Constructs a new Stream. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a Stream. + * @implements IStream + * @constructor + * @param {google.cloud.datastream.v1.IStream=} [properties] Properties to set + */ + function Stream(properties) { + this.labels = {}; + this.errors = []; + 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]]; + } + + /** + * Stream name. + * @member {string} name + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.name = ""; + + /** + * Stream createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.createTime = null; + + /** + * Stream updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.updateTime = null; + + /** + * Stream labels. + * @member {Object.} labels + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.labels = $util.emptyObject; + + /** + * Stream displayName. + * @member {string} displayName + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.displayName = ""; + + /** + * Stream sourceConfig. + * @member {google.cloud.datastream.v1.ISourceConfig|null|undefined} sourceConfig + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.sourceConfig = null; + + /** + * Stream destinationConfig. + * @member {google.cloud.datastream.v1.IDestinationConfig|null|undefined} destinationConfig + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.destinationConfig = null; + + /** + * Stream state. + * @member {google.cloud.datastream.v1.Stream.State} state + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.state = 0; + + /** + * Stream backfillAll. + * @member {google.cloud.datastream.v1.Stream.IBackfillAllStrategy|null|undefined} backfillAll + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.backfillAll = null; + + /** + * Stream backfillNone. + * @member {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy|null|undefined} backfillNone + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.backfillNone = null; + + /** + * Stream errors. + * @member {Array.} errors + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.errors = $util.emptyArray; + + /** + * Stream customerManagedEncryptionKey. + * @member {string|null|undefined} customerManagedEncryptionKey + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.customerManagedEncryptionKey = null; + + /** + * Stream lastRecoveryTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastRecoveryTime + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Stream.prototype.lastRecoveryTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Stream backfillStrategy. + * @member {"backfillAll"|"backfillNone"|undefined} backfillStrategy + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Object.defineProperty(Stream.prototype, "backfillStrategy", { + get: $util.oneOfGetter($oneOfFields = ["backfillAll", "backfillNone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Stream _customerManagedEncryptionKey. + * @member {"customerManagedEncryptionKey"|undefined} _customerManagedEncryptionKey + * @memberof google.cloud.datastream.v1.Stream + * @instance + */ + Object.defineProperty(Stream.prototype, "_customerManagedEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["customerManagedEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Stream instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.Stream + * @static + * @param {google.cloud.datastream.v1.IStream=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.Stream} Stream instance + */ + Stream.create = function create(properties) { + return new Stream(properties); + }; + + /** + * Encodes the specified Stream message. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.Stream + * @static + * @param {google.cloud.datastream.v1.IStream} message Stream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stream.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.sourceConfig != null && Object.hasOwnProperty.call(message, "sourceConfig")) + $root.google.cloud.datastream.v1.SourceConfig.encode(message.sourceConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.destinationConfig != null && Object.hasOwnProperty.call(message, "destinationConfig")) + $root.google.cloud.datastream.v1.DestinationConfig.encode(message.destinationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.datastream.v1.Error.encode(message.errors[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.customerManagedEncryptionKey != null && Object.hasOwnProperty.call(message, "customerManagedEncryptionKey")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.customerManagedEncryptionKey); + if (message.lastRecoveryTime != null && Object.hasOwnProperty.call(message, "lastRecoveryTime")) + $root.google.protobuf.Timestamp.encode(message.lastRecoveryTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.backfillAll != null && Object.hasOwnProperty.call(message, "backfillAll")) + $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.encode(message.backfillAll, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.backfillNone != null && Object.hasOwnProperty.call(message, "backfillNone")) + $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.encode(message.backfillNone, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Stream message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.Stream + * @static + * @param {google.cloud.datastream.v1.IStream} message Stream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Stream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Stream message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.Stream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.Stream} Stream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stream.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.datastream.v1.Stream(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + 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 5: { + message.displayName = reader.string(); + break; + } + case 6: { + message.sourceConfig = $root.google.cloud.datastream.v1.SourceConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.destinationConfig = $root.google.cloud.datastream.v1.DestinationConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 101: { + message.backfillAll = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.decode(reader, reader.uint32()); + break; + } + case 102: { + message.backfillNone = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32())); + break; + } + case 10: { + message.customerManagedEncryptionKey = reader.string(); + break; + } + case 13: { + message.lastRecoveryTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Stream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.Stream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.Stream} Stream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Stream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Stream message. + * @function verify + * @memberof google.cloud.datastream.v1.Stream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Stream.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.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.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.sourceConfig != null && message.hasOwnProperty("sourceConfig")) { + var error = $root.google.cloud.datastream.v1.SourceConfig.verify(message.sourceConfig); + if (error) + return "sourceConfig." + error; + } + if (message.destinationConfig != null && message.hasOwnProperty("destinationConfig")) { + var error = $root.google.cloud.datastream.v1.DestinationConfig.verify(message.destinationConfig); + if (error) + return "destinationConfig." + 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 6: + case 7: + case 8: + break; + } + if (message.backfillAll != null && message.hasOwnProperty("backfillAll")) { + properties.backfillStrategy = 1; + { + var error = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify(message.backfillAll); + if (error) + return "backfillAll." + error; + } + } + if (message.backfillNone != null && message.hasOwnProperty("backfillNone")) { + if (properties.backfillStrategy === 1) + return "backfillStrategy: multiple values"; + properties.backfillStrategy = 1; + { + var error = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify(message.backfillNone); + if (error) + return "backfillNone." + error; + } + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.datastream.v1.Error.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + if (message.customerManagedEncryptionKey != null && message.hasOwnProperty("customerManagedEncryptionKey")) { + properties._customerManagedEncryptionKey = 1; + if (!$util.isString(message.customerManagedEncryptionKey)) + return "customerManagedEncryptionKey: string expected"; + } + if (message.lastRecoveryTime != null && message.hasOwnProperty("lastRecoveryTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastRecoveryTime); + if (error) + return "lastRecoveryTime." + error; + } + return null; + }; + + /** + * Creates a Stream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.Stream + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.Stream} Stream + */ + Stream.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.Stream) + return object; + var message = new $root.google.cloud.datastream.v1.Stream(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.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.datastream.v1.Stream.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.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]]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.sourceConfig != null) { + if (typeof object.sourceConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.sourceConfig: object expected"); + message.sourceConfig = $root.google.cloud.datastream.v1.SourceConfig.fromObject(object.sourceConfig); + } + if (object.destinationConfig != null) { + if (typeof object.destinationConfig !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.destinationConfig: object expected"); + message.destinationConfig = $root.google.cloud.datastream.v1.DestinationConfig.fromObject(object.destinationConfig); + } + 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 "NOT_STARTED": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "PAUSED": + case 3: + message.state = 3; + break; + case "MAINTENANCE": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "FAILED_PERMANENTLY": + case 6: + message.state = 6; + break; + case "STARTING": + case 7: + message.state = 7; + break; + case "DRAINING": + case 8: + message.state = 8; + break; + } + if (object.backfillAll != null) { + if (typeof object.backfillAll !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.backfillAll: object expected"); + message.backfillAll = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.fromObject(object.backfillAll); + } + if (object.backfillNone != null) { + if (typeof object.backfillNone !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.backfillNone: object expected"); + message.backfillNone = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.fromObject(object.backfillNone); + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.datastream.v1.Stream.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.errors: object expected"); + message.errors[i] = $root.google.cloud.datastream.v1.Error.fromObject(object.errors[i]); + } + } + if (object.customerManagedEncryptionKey != null) + message.customerManagedEncryptionKey = String(object.customerManagedEncryptionKey); + if (object.lastRecoveryTime != null) { + if (typeof object.lastRecoveryTime !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.lastRecoveryTime: object expected"); + message.lastRecoveryTime = $root.google.protobuf.Timestamp.fromObject(object.lastRecoveryTime); + } + return message; + }; + + /** + * Creates a plain object from a Stream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.Stream + * @static + * @param {google.cloud.datastream.v1.Stream} message Stream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Stream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.sourceConfig = null; + object.destinationConfig = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.lastRecoveryTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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); + 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.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.sourceConfig != null && message.hasOwnProperty("sourceConfig")) + object.sourceConfig = $root.google.cloud.datastream.v1.SourceConfig.toObject(message.sourceConfig, options); + if (message.destinationConfig != null && message.hasOwnProperty("destinationConfig")) + object.destinationConfig = $root.google.cloud.datastream.v1.DestinationConfig.toObject(message.destinationConfig, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.datastream.v1.Stream.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.Stream.State[message.state] : message.state; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.datastream.v1.Error.toObject(message.errors[j], options); + } + if (message.customerManagedEncryptionKey != null && message.hasOwnProperty("customerManagedEncryptionKey")) { + object.customerManagedEncryptionKey = message.customerManagedEncryptionKey; + if (options.oneofs) + object._customerManagedEncryptionKey = "customerManagedEncryptionKey"; + } + if (message.lastRecoveryTime != null && message.hasOwnProperty("lastRecoveryTime")) + object.lastRecoveryTime = $root.google.protobuf.Timestamp.toObject(message.lastRecoveryTime, options); + if (message.backfillAll != null && message.hasOwnProperty("backfillAll")) { + object.backfillAll = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.toObject(message.backfillAll, options); + if (options.oneofs) + object.backfillStrategy = "backfillAll"; + } + if (message.backfillNone != null && message.hasOwnProperty("backfillNone")) { + object.backfillNone = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.toObject(message.backfillNone, options); + if (options.oneofs) + object.backfillStrategy = "backfillNone"; + } + return object; + }; + + /** + * Converts this Stream to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.Stream + * @instance + * @returns {Object.} JSON object + */ + Stream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Stream + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.Stream + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Stream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.Stream"; + }; + + /** + * State enum. + * @name google.cloud.datastream.v1.Stream.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} NOT_STARTED=1 NOT_STARTED value + * @property {number} RUNNING=2 RUNNING value + * @property {number} PAUSED=3 PAUSED value + * @property {number} MAINTENANCE=4 MAINTENANCE value + * @property {number} FAILED=5 FAILED value + * @property {number} FAILED_PERMANENTLY=6 FAILED_PERMANENTLY value + * @property {number} STARTING=7 STARTING value + * @property {number} DRAINING=8 DRAINING value + */ + Stream.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_STARTED"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "PAUSED"] = 3; + values[valuesById[4] = "MAINTENANCE"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "FAILED_PERMANENTLY"] = 6; + values[valuesById[7] = "STARTING"] = 7; + values[valuesById[8] = "DRAINING"] = 8; + return values; + })(); + + Stream.BackfillAllStrategy = (function() { + + /** + * Properties of a BackfillAllStrategy. + * @memberof google.cloud.datastream.v1.Stream + * @interface IBackfillAllStrategy + * @property {google.cloud.datastream.v1.IOracleRdbms|null} [oracleExcludedObjects] BackfillAllStrategy oracleExcludedObjects + * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [mysqlExcludedObjects] BackfillAllStrategy mysqlExcludedObjects + * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [postgresqlExcludedObjects] BackfillAllStrategy postgresqlExcludedObjects + * @property {google.cloud.datastream.v1.ISqlServerRdbms|null} [sqlServerExcludedObjects] BackfillAllStrategy sqlServerExcludedObjects + */ + + /** + * Constructs a new BackfillAllStrategy. + * @memberof google.cloud.datastream.v1.Stream + * @classdesc Represents a BackfillAllStrategy. + * @implements IBackfillAllStrategy + * @constructor + * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy=} [properties] Properties to set + */ + function BackfillAllStrategy(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]]; + } + + /** + * BackfillAllStrategy oracleExcludedObjects. + * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} oracleExcludedObjects + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @instance + */ + BackfillAllStrategy.prototype.oracleExcludedObjects = null; + + /** + * BackfillAllStrategy mysqlExcludedObjects. + * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} mysqlExcludedObjects + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @instance + */ + BackfillAllStrategy.prototype.mysqlExcludedObjects = null; + + /** + * BackfillAllStrategy postgresqlExcludedObjects. + * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} postgresqlExcludedObjects + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @instance + */ + BackfillAllStrategy.prototype.postgresqlExcludedObjects = null; + + /** + * BackfillAllStrategy sqlServerExcludedObjects. + * @member {google.cloud.datastream.v1.ISqlServerRdbms|null|undefined} sqlServerExcludedObjects + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @instance + */ + BackfillAllStrategy.prototype.sqlServerExcludedObjects = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackfillAllStrategy excludedObjects. + * @member {"oracleExcludedObjects"|"mysqlExcludedObjects"|"postgresqlExcludedObjects"|"sqlServerExcludedObjects"|undefined} excludedObjects + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @instance + */ + Object.defineProperty(BackfillAllStrategy.prototype, "excludedObjects", { + get: $util.oneOfGetter($oneOfFields = ["oracleExcludedObjects", "mysqlExcludedObjects", "postgresqlExcludedObjects", "sqlServerExcludedObjects"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackfillAllStrategy instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @static + * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy instance + */ + BackfillAllStrategy.create = function create(properties) { + return new BackfillAllStrategy(properties); + }; + + /** + * Encodes the specified BackfillAllStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @static + * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy} message BackfillAllStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackfillAllStrategy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oracleExcludedObjects != null && Object.hasOwnProperty.call(message, "oracleExcludedObjects")) + $root.google.cloud.datastream.v1.OracleRdbms.encode(message.oracleExcludedObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mysqlExcludedObjects != null && Object.hasOwnProperty.call(message, "mysqlExcludedObjects")) + $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.mysqlExcludedObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.postgresqlExcludedObjects != null && Object.hasOwnProperty.call(message, "postgresqlExcludedObjects")) + $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.postgresqlExcludedObjects, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sqlServerExcludedObjects != null && Object.hasOwnProperty.call(message, "sqlServerExcludedObjects")) + $root.google.cloud.datastream.v1.SqlServerRdbms.encode(message.sqlServerExcludedObjects, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackfillAllStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @static + * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy} message BackfillAllStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackfillAllStrategy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackfillAllStrategy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackfillAllStrategy.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.datastream.v1.Stream.BackfillAllStrategy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.oracleExcludedObjects = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); + break; + } + case 2: { + message.mysqlExcludedObjects = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); + break; + } + case 3: { + message.postgresqlExcludedObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); + break; + } + case 4: { + message.sqlServerExcludedObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackfillAllStrategy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackfillAllStrategy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackfillAllStrategy message. + * @function verify + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackfillAllStrategy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.oracleExcludedObjects != null && message.hasOwnProperty("oracleExcludedObjects")) { + properties.excludedObjects = 1; + { + var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.oracleExcludedObjects); + if (error) + return "oracleExcludedObjects." + error; + } + } + if (message.mysqlExcludedObjects != null && message.hasOwnProperty("mysqlExcludedObjects")) { + if (properties.excludedObjects === 1) + return "excludedObjects: multiple values"; + properties.excludedObjects = 1; + { + var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.mysqlExcludedObjects); + if (error) + return "mysqlExcludedObjects." + error; + } + } + if (message.postgresqlExcludedObjects != null && message.hasOwnProperty("postgresqlExcludedObjects")) { + if (properties.excludedObjects === 1) + return "excludedObjects: multiple values"; + properties.excludedObjects = 1; + { + var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.postgresqlExcludedObjects); + if (error) + return "postgresqlExcludedObjects." + error; + } + } + if (message.sqlServerExcludedObjects != null && message.hasOwnProperty("sqlServerExcludedObjects")) { + if (properties.excludedObjects === 1) + return "excludedObjects: multiple values"; + properties.excludedObjects = 1; + { + var error = $root.google.cloud.datastream.v1.SqlServerRdbms.verify(message.sqlServerExcludedObjects); + if (error) + return "sqlServerExcludedObjects." + error; + } + } + return null; + }; + + /** + * Creates a BackfillAllStrategy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy + */ + BackfillAllStrategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy) + return object; + var message = new $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy(); + if (object.oracleExcludedObjects != null) { + if (typeof object.oracleExcludedObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.oracleExcludedObjects: object expected"); + message.oracleExcludedObjects = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.oracleExcludedObjects); + } + if (object.mysqlExcludedObjects != null) { + if (typeof object.mysqlExcludedObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.mysqlExcludedObjects: object expected"); + message.mysqlExcludedObjects = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.mysqlExcludedObjects); + } + if (object.postgresqlExcludedObjects != null) { + if (typeof object.postgresqlExcludedObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.postgresqlExcludedObjects: object expected"); + message.postgresqlExcludedObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.postgresqlExcludedObjects); + } + if (object.sqlServerExcludedObjects != null) { + if (typeof object.sqlServerExcludedObjects !== "object") + throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.sqlServerExcludedObjects: object expected"); + message.sqlServerExcludedObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.fromObject(object.sqlServerExcludedObjects); + } + return message; + }; + + /** + * Creates a plain object from a BackfillAllStrategy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @static + * @param {google.cloud.datastream.v1.Stream.BackfillAllStrategy} message BackfillAllStrategy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackfillAllStrategy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.oracleExcludedObjects != null && message.hasOwnProperty("oracleExcludedObjects")) { + object.oracleExcludedObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.oracleExcludedObjects, options); + if (options.oneofs) + object.excludedObjects = "oracleExcludedObjects"; + } + if (message.mysqlExcludedObjects != null && message.hasOwnProperty("mysqlExcludedObjects")) { + object.mysqlExcludedObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.mysqlExcludedObjects, options); + if (options.oneofs) + object.excludedObjects = "mysqlExcludedObjects"; + } + if (message.postgresqlExcludedObjects != null && message.hasOwnProperty("postgresqlExcludedObjects")) { + object.postgresqlExcludedObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.postgresqlExcludedObjects, options); + if (options.oneofs) + object.excludedObjects = "postgresqlExcludedObjects"; + } + if (message.sqlServerExcludedObjects != null && message.hasOwnProperty("sqlServerExcludedObjects")) { + object.sqlServerExcludedObjects = $root.google.cloud.datastream.v1.SqlServerRdbms.toObject(message.sqlServerExcludedObjects, options); + if (options.oneofs) + object.excludedObjects = "sqlServerExcludedObjects"; + } + return object; + }; + + /** + * Converts this BackfillAllStrategy to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @instance + * @returns {Object.} JSON object + */ + BackfillAllStrategy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackfillAllStrategy + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackfillAllStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.Stream.BackfillAllStrategy"; + }; + + return BackfillAllStrategy; + })(); + + Stream.BackfillNoneStrategy = (function() { + + /** + * Properties of a BackfillNoneStrategy. + * @memberof google.cloud.datastream.v1.Stream + * @interface IBackfillNoneStrategy + */ + + /** + * Constructs a new BackfillNoneStrategy. + * @memberof google.cloud.datastream.v1.Stream + * @classdesc Represents a BackfillNoneStrategy. + * @implements IBackfillNoneStrategy + * @constructor + * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy=} [properties] Properties to set + */ + function BackfillNoneStrategy(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 BackfillNoneStrategy instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @static + * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy instance + */ + BackfillNoneStrategy.create = function create(properties) { + return new BackfillNoneStrategy(properties); + }; + + /** + * Encodes the specified BackfillNoneStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @static + * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy} message BackfillNoneStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackfillNoneStrategy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BackfillNoneStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @static + * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy} message BackfillNoneStrategy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackfillNoneStrategy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackfillNoneStrategy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackfillNoneStrategy.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.datastream.v1.Stream.BackfillNoneStrategy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackfillNoneStrategy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackfillNoneStrategy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackfillNoneStrategy message. + * @function verify + * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackfillNoneStrategy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BackfillNoneStrategy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy + */ + BackfillNoneStrategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) + return object; + return new $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy(); + }; + + /** + * Creates a plain object from a BackfillNoneStrategy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @static + * @param {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} message BackfillNoneStrategy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackfillNoneStrategy.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BackfillNoneStrategy to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @instance + * @returns {Object.} JSON object + */ + BackfillNoneStrategy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackfillNoneStrategy + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackfillNoneStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.Stream.BackfillNoneStrategy"; + }; + + return BackfillNoneStrategy; + })(); + + return Stream; + })(); + + v1.StreamObject = (function() { + + /** + * Properties of a StreamObject. + * @memberof google.cloud.datastream.v1 + * @interface IStreamObject + * @property {string|null} [name] StreamObject name + * @property {google.protobuf.ITimestamp|null} [createTime] StreamObject createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] StreamObject updateTime + * @property {string|null} [displayName] StreamObject displayName + * @property {Array.|null} [errors] StreamObject errors + * @property {google.cloud.datastream.v1.IBackfillJob|null} [backfillJob] StreamObject backfillJob + * @property {google.cloud.datastream.v1.ISourceObjectIdentifier|null} [sourceObject] StreamObject sourceObject + */ + + /** + * Constructs a new StreamObject. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a StreamObject. + * @implements IStreamObject + * @constructor + * @param {google.cloud.datastream.v1.IStreamObject=} [properties] Properties to set + */ + function StreamObject(properties) { + this.errors = []; + 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]]; + } + + /** + * StreamObject name. + * @member {string} name + * @memberof google.cloud.datastream.v1.StreamObject + * @instance + */ + StreamObject.prototype.name = ""; + + /** + * StreamObject createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.datastream.v1.StreamObject + * @instance + */ + StreamObject.prototype.createTime = null; + + /** + * StreamObject updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.datastream.v1.StreamObject + * @instance + */ + StreamObject.prototype.updateTime = null; + + /** + * StreamObject displayName. + * @member {string} displayName + * @memberof google.cloud.datastream.v1.StreamObject + * @instance + */ + StreamObject.prototype.displayName = ""; + + /** + * StreamObject errors. + * @member {Array.} errors + * @memberof google.cloud.datastream.v1.StreamObject + * @instance + */ + StreamObject.prototype.errors = $util.emptyArray; + + /** + * StreamObject backfillJob. + * @member {google.cloud.datastream.v1.IBackfillJob|null|undefined} backfillJob + * @memberof google.cloud.datastream.v1.StreamObject + * @instance + */ + StreamObject.prototype.backfillJob = null; + + /** + * StreamObject sourceObject. + * @member {google.cloud.datastream.v1.ISourceObjectIdentifier|null|undefined} sourceObject + * @memberof google.cloud.datastream.v1.StreamObject + * @instance + */ + StreamObject.prototype.sourceObject = null; + + /** + * Creates a new StreamObject instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.StreamObject + * @static + * @param {google.cloud.datastream.v1.IStreamObject=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.StreamObject} StreamObject instance + */ + StreamObject.create = function create(properties) { + return new StreamObject(properties); + }; + + /** + * Encodes the specified StreamObject message. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.StreamObject + * @static + * @param {google.cloud.datastream.v1.IStreamObject} message StreamObject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamObject.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.datastream.v1.Error.encode(message.errors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.backfillJob != null && Object.hasOwnProperty.call(message, "backfillJob")) + $root.google.cloud.datastream.v1.BackfillJob.encode(message.backfillJob, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.sourceObject != null && Object.hasOwnProperty.call(message, "sourceObject")) + $root.google.cloud.datastream.v1.SourceObjectIdentifier.encode(message.sourceObject, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StreamObject message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.StreamObject + * @static + * @param {google.cloud.datastream.v1.IStreamObject} message StreamObject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StreamObject.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StreamObject message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.StreamObject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.StreamObject} StreamObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamObject.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.datastream.v1.StreamObject(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32())); + break; + } + case 7: { + message.backfillJob = $root.google.cloud.datastream.v1.BackfillJob.decode(reader, reader.uint32()); + break; + } + case 8: { + message.sourceObject = $root.google.cloud.datastream.v1.SourceObjectIdentifier.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StreamObject message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.StreamObject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.StreamObject} StreamObject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StreamObject.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StreamObject message. + * @function verify + * @memberof google.cloud.datastream.v1.StreamObject + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StreamObject.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.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.datastream.v1.Error.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + if (message.backfillJob != null && message.hasOwnProperty("backfillJob")) { + var error = $root.google.cloud.datastream.v1.BackfillJob.verify(message.backfillJob); + if (error) + return "backfillJob." + error; + } + if (message.sourceObject != null && message.hasOwnProperty("sourceObject")) { + var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.verify(message.sourceObject); + if (error) + return "sourceObject." + error; + } + return null; + }; + + /** + * Creates a StreamObject message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.StreamObject + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.StreamObject} StreamObject + */ + StreamObject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.StreamObject) + return object; + var message = new $root.google.cloud.datastream.v1.StreamObject(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.datastream.v1.StreamObject.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.datastream.v1.StreamObject.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.datastream.v1.StreamObject.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.StreamObject.errors: object expected"); + message.errors[i] = $root.google.cloud.datastream.v1.Error.fromObject(object.errors[i]); + } + } + if (object.backfillJob != null) { + if (typeof object.backfillJob !== "object") + throw TypeError(".google.cloud.datastream.v1.StreamObject.backfillJob: object expected"); + message.backfillJob = $root.google.cloud.datastream.v1.BackfillJob.fromObject(object.backfillJob); + } + if (object.sourceObject != null) { + if (typeof object.sourceObject !== "object") + throw TypeError(".google.cloud.datastream.v1.StreamObject.sourceObject: object expected"); + message.sourceObject = $root.google.cloud.datastream.v1.SourceObjectIdentifier.fromObject(object.sourceObject); + } + return message; + }; + + /** + * Creates a plain object from a StreamObject message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.StreamObject + * @static + * @param {google.cloud.datastream.v1.StreamObject} message StreamObject + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StreamObject.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.backfillJob = null; + object.sourceObject = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.datastream.v1.Error.toObject(message.errors[j], options); + } + if (message.backfillJob != null && message.hasOwnProperty("backfillJob")) + object.backfillJob = $root.google.cloud.datastream.v1.BackfillJob.toObject(message.backfillJob, options); + if (message.sourceObject != null && message.hasOwnProperty("sourceObject")) + object.sourceObject = $root.google.cloud.datastream.v1.SourceObjectIdentifier.toObject(message.sourceObject, options); + return object; + }; + + /** + * Converts this StreamObject to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.StreamObject + * @instance + * @returns {Object.} JSON object + */ + StreamObject.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StreamObject + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.StreamObject + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StreamObject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.StreamObject"; + }; + + return StreamObject; + })(); + + v1.SourceObjectIdentifier = (function() { + + /** + * Properties of a SourceObjectIdentifier. + * @memberof google.cloud.datastream.v1 + * @interface ISourceObjectIdentifier + * @property {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null} [oracleIdentifier] SourceObjectIdentifier oracleIdentifier + * @property {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null} [mysqlIdentifier] SourceObjectIdentifier mysqlIdentifier + * @property {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null} [postgresqlIdentifier] SourceObjectIdentifier postgresqlIdentifier + * @property {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier|null} [sqlServerIdentifier] SourceObjectIdentifier sqlServerIdentifier + */ + + /** + * Constructs a new SourceObjectIdentifier. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a SourceObjectIdentifier. + * @implements ISourceObjectIdentifier + * @constructor + * @param {google.cloud.datastream.v1.ISourceObjectIdentifier=} [properties] Properties to set + */ + function SourceObjectIdentifier(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]]; + } + + /** + * SourceObjectIdentifier oracleIdentifier. + * @member {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null|undefined} oracleIdentifier + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @instance + */ + SourceObjectIdentifier.prototype.oracleIdentifier = null; + + /** + * SourceObjectIdentifier mysqlIdentifier. + * @member {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null|undefined} mysqlIdentifier + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @instance + */ + SourceObjectIdentifier.prototype.mysqlIdentifier = null; + + /** + * SourceObjectIdentifier postgresqlIdentifier. + * @member {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null|undefined} postgresqlIdentifier + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @instance + */ + SourceObjectIdentifier.prototype.postgresqlIdentifier = null; + + /** + * SourceObjectIdentifier sqlServerIdentifier. + * @member {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier|null|undefined} sqlServerIdentifier + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @instance + */ + SourceObjectIdentifier.prototype.sqlServerIdentifier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SourceObjectIdentifier sourceIdentifier. + * @member {"oracleIdentifier"|"mysqlIdentifier"|"postgresqlIdentifier"|"sqlServerIdentifier"|undefined} sourceIdentifier + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @instance + */ + Object.defineProperty(SourceObjectIdentifier.prototype, "sourceIdentifier", { + get: $util.oneOfGetter($oneOfFields = ["oracleIdentifier", "mysqlIdentifier", "postgresqlIdentifier", "sqlServerIdentifier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SourceObjectIdentifier instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.ISourceObjectIdentifier=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier instance + */ + SourceObjectIdentifier.create = function create(properties) { + return new SourceObjectIdentifier(properties); + }; + + /** + * Encodes the specified SourceObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.ISourceObjectIdentifier} message SourceObjectIdentifier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceObjectIdentifier.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oracleIdentifier != null && Object.hasOwnProperty.call(message, "oracleIdentifier")) + $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.encode(message.oracleIdentifier, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mysqlIdentifier != null && Object.hasOwnProperty.call(message, "mysqlIdentifier")) + $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.encode(message.mysqlIdentifier, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.postgresqlIdentifier != null && Object.hasOwnProperty.call(message, "postgresqlIdentifier")) + $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.encode(message.postgresqlIdentifier, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sqlServerIdentifier != null && Object.hasOwnProperty.call(message, "sqlServerIdentifier")) + $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.encode(message.sqlServerIdentifier, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.ISourceObjectIdentifier} message SourceObjectIdentifier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceObjectIdentifier message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceObjectIdentifier.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.datastream.v1.SourceObjectIdentifier(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.oracleIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.decode(reader, reader.uint32()); + break; + } + case 2: { + message.mysqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.decode(reader, reader.uint32()); + break; + } + case 3: { + message.postgresqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.decode(reader, reader.uint32()); + break; + } + case 4: { + message.sqlServerIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceObjectIdentifier message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceObjectIdentifier message. + * @function verify + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceObjectIdentifier.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.oracleIdentifier != null && message.hasOwnProperty("oracleIdentifier")) { + properties.sourceIdentifier = 1; + { + var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify(message.oracleIdentifier); + if (error) + return "oracleIdentifier." + error; + } + } + if (message.mysqlIdentifier != null && message.hasOwnProperty("mysqlIdentifier")) { + if (properties.sourceIdentifier === 1) + return "sourceIdentifier: multiple values"; + properties.sourceIdentifier = 1; + { + var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify(message.mysqlIdentifier); + if (error) + return "mysqlIdentifier." + error; + } + } + if (message.postgresqlIdentifier != null && message.hasOwnProperty("postgresqlIdentifier")) { + if (properties.sourceIdentifier === 1) + return "sourceIdentifier: multiple values"; + properties.sourceIdentifier = 1; + { + var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify(message.postgresqlIdentifier); + if (error) + return "postgresqlIdentifier." + error; + } + } + if (message.sqlServerIdentifier != null && message.hasOwnProperty("sqlServerIdentifier")) { + if (properties.sourceIdentifier === 1) + return "sourceIdentifier: multiple values"; + properties.sourceIdentifier = 1; + { + var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.verify(message.sqlServerIdentifier); + if (error) + return "sqlServerIdentifier." + error; + } + } + return null; + }; + + /** + * Creates a SourceObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier + */ + SourceObjectIdentifier.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier) + return object; + var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier(); + if (object.oracleIdentifier != null) { + if (typeof object.oracleIdentifier !== "object") + throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.oracleIdentifier: object expected"); + message.oracleIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.fromObject(object.oracleIdentifier); + } + if (object.mysqlIdentifier != null) { + if (typeof object.mysqlIdentifier !== "object") + throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.mysqlIdentifier: object expected"); + message.mysqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.fromObject(object.mysqlIdentifier); + } + if (object.postgresqlIdentifier != null) { + if (typeof object.postgresqlIdentifier !== "object") + throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.postgresqlIdentifier: object expected"); + message.postgresqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.fromObject(object.postgresqlIdentifier); + } + if (object.sqlServerIdentifier != null) { + if (typeof object.sqlServerIdentifier !== "object") + throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.sqlServerIdentifier: object expected"); + message.sqlServerIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.fromObject(object.sqlServerIdentifier); + } + return message; + }; + + /** + * Creates a plain object from a SourceObjectIdentifier message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.SourceObjectIdentifier} message SourceObjectIdentifier + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceObjectIdentifier.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.oracleIdentifier != null && message.hasOwnProperty("oracleIdentifier")) { + object.oracleIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.toObject(message.oracleIdentifier, options); + if (options.oneofs) + object.sourceIdentifier = "oracleIdentifier"; + } + if (message.mysqlIdentifier != null && message.hasOwnProperty("mysqlIdentifier")) { + object.mysqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.toObject(message.mysqlIdentifier, options); + if (options.oneofs) + object.sourceIdentifier = "mysqlIdentifier"; + } + if (message.postgresqlIdentifier != null && message.hasOwnProperty("postgresqlIdentifier")) { + object.postgresqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.toObject(message.postgresqlIdentifier, options); + if (options.oneofs) + object.sourceIdentifier = "postgresqlIdentifier"; + } + if (message.sqlServerIdentifier != null && message.hasOwnProperty("sqlServerIdentifier")) { + object.sqlServerIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.toObject(message.sqlServerIdentifier, options); + if (options.oneofs) + object.sourceIdentifier = "sqlServerIdentifier"; + } + return object; + }; + + /** + * Converts this SourceObjectIdentifier to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @instance + * @returns {Object.} JSON object + */ + SourceObjectIdentifier.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceObjectIdentifier + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier"; + }; + + SourceObjectIdentifier.OracleObjectIdentifier = (function() { + + /** + * Properties of an OracleObjectIdentifier. + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @interface IOracleObjectIdentifier + * @property {string|null} [schema] OracleObjectIdentifier schema + * @property {string|null} [table] OracleObjectIdentifier table + */ + + /** + * Constructs a new OracleObjectIdentifier. + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @classdesc Represents an OracleObjectIdentifier. + * @implements IOracleObjectIdentifier + * @constructor + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier=} [properties] Properties to set + */ + function OracleObjectIdentifier(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]]; + } + + /** + * OracleObjectIdentifier schema. + * @member {string} schema + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @instance + */ + OracleObjectIdentifier.prototype.schema = ""; + + /** + * OracleObjectIdentifier table. + * @member {string} table + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @instance + */ + OracleObjectIdentifier.prototype.table = ""; + + /** + * Creates a new OracleObjectIdentifier instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier instance + */ + OracleObjectIdentifier.create = function create(properties) { + return new OracleObjectIdentifier(properties); + }; + + /** + * Encodes the specified OracleObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier} message OracleObjectIdentifier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OracleObjectIdentifier.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); + return writer; + }; + + /** + * Encodes the specified OracleObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier} message OracleObjectIdentifier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OracleObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OracleObjectIdentifier message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OracleObjectIdentifier.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.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.schema = reader.string(); + break; + } + case 2: { + message.table = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OracleObjectIdentifier message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OracleObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OracleObjectIdentifier message. + * @function verify + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OracleObjectIdentifier.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + return null; + }; + + /** + * Creates an OracleObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier + */ + OracleObjectIdentifier.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier) + return object; + var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier(); + if (object.schema != null) + message.schema = String(object.schema); + if (object.table != null) + message.table = String(object.table); + return message; + }; + + /** + * Creates a plain object from an OracleObjectIdentifier message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} message OracleObjectIdentifier + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OracleObjectIdentifier.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.schema = ""; + object.table = ""; + } + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + return object; + }; + + /** + * Converts this OracleObjectIdentifier to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @instance + * @returns {Object.} JSON object + */ + OracleObjectIdentifier.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OracleObjectIdentifier + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OracleObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier"; + }; + + return OracleObjectIdentifier; + })(); + + SourceObjectIdentifier.PostgresqlObjectIdentifier = (function() { + + /** + * Properties of a PostgresqlObjectIdentifier. + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @interface IPostgresqlObjectIdentifier + * @property {string|null} [schema] PostgresqlObjectIdentifier schema + * @property {string|null} [table] PostgresqlObjectIdentifier table + */ + + /** + * Constructs a new PostgresqlObjectIdentifier. + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @classdesc Represents a PostgresqlObjectIdentifier. + * @implements IPostgresqlObjectIdentifier + * @constructor + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier=} [properties] Properties to set + */ + function PostgresqlObjectIdentifier(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]]; + } + + /** + * PostgresqlObjectIdentifier schema. + * @member {string} schema + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @instance + */ + PostgresqlObjectIdentifier.prototype.schema = ""; + + /** + * PostgresqlObjectIdentifier table. + * @member {string} table + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @instance + */ + PostgresqlObjectIdentifier.prototype.table = ""; + + /** + * Creates a new PostgresqlObjectIdentifier instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier instance + */ + PostgresqlObjectIdentifier.create = function create(properties) { + return new PostgresqlObjectIdentifier(properties); + }; + + /** + * Encodes the specified PostgresqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier} message PostgresqlObjectIdentifier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostgresqlObjectIdentifier.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); + return writer; + }; + + /** + * Encodes the specified PostgresqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier} message PostgresqlObjectIdentifier message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostgresqlObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostgresqlObjectIdentifier.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.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.schema = reader.string(); + break; + } + case 2: { + message.table = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - } - if (object.customerManagedEncryptionKey != null) - message.customerManagedEncryptionKey = String(object.customerManagedEncryptionKey); - return message; - }; + return message; + }; - /** - * Creates a plain object from a Stream message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {google.cloud.datastream.v1.Stream} message Stream - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Stream.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.sourceConfig = null; - object.destinationConfig = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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); - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.sourceConfig != null && message.hasOwnProperty("sourceConfig")) - object.sourceConfig = $root.google.cloud.datastream.v1.SourceConfig.toObject(message.sourceConfig, options); - if (message.destinationConfig != null && message.hasOwnProperty("destinationConfig")) - object.destinationConfig = $root.google.cloud.datastream.v1.DestinationConfig.toObject(message.destinationConfig, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datastream.v1.Stream.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.Stream.State[message.state] : message.state; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.datastream.v1.Error.toObject(message.errors[j], options); - } - if (message.customerManagedEncryptionKey != null && message.hasOwnProperty("customerManagedEncryptionKey")) { - object.customerManagedEncryptionKey = message.customerManagedEncryptionKey; - if (options.oneofs) - object._customerManagedEncryptionKey = "customerManagedEncryptionKey"; - } - if (message.backfillAll != null && message.hasOwnProperty("backfillAll")) { - object.backfillAll = $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy.toObject(message.backfillAll, options); - if (options.oneofs) - object.backfillStrategy = "backfillAll"; - } - if (message.backfillNone != null && message.hasOwnProperty("backfillNone")) { - object.backfillNone = $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy.toObject(message.backfillNone, options); - if (options.oneofs) - object.backfillStrategy = "backfillNone"; - } - return object; - }; + /** + * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostgresqlObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this Stream to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.Stream - * @instance - * @returns {Object.} JSON object - */ - Stream.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a PostgresqlObjectIdentifier message. + * @function verify + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PostgresqlObjectIdentifier.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + return null; + }; - /** - * Gets the default type url for Stream - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Stream - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Stream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.Stream"; - }; + /** + * Creates a PostgresqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier + */ + PostgresqlObjectIdentifier.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier) + return object; + var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier(); + if (object.schema != null) + message.schema = String(object.schema); + if (object.table != null) + message.table = String(object.table); + return message; + }; - /** - * State enum. - * @name google.cloud.datastream.v1.Stream.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} NOT_STARTED=1 NOT_STARTED value - * @property {number} RUNNING=2 RUNNING value - * @property {number} PAUSED=3 PAUSED value - * @property {number} MAINTENANCE=4 MAINTENANCE value - * @property {number} FAILED=5 FAILED value - * @property {number} FAILED_PERMANENTLY=6 FAILED_PERMANENTLY value - * @property {number} STARTING=7 STARTING value - * @property {number} DRAINING=8 DRAINING value - */ - Stream.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NOT_STARTED"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "PAUSED"] = 3; - values[valuesById[4] = "MAINTENANCE"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "FAILED_PERMANENTLY"] = 6; - values[valuesById[7] = "STARTING"] = 7; - values[valuesById[8] = "DRAINING"] = 8; - return values; + /** + * Creates a plain object from a PostgresqlObjectIdentifier message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @static + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} message PostgresqlObjectIdentifier + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PostgresqlObjectIdentifier.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.schema = ""; + object.table = ""; + } + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + return object; + }; + + /** + * Converts this PostgresqlObjectIdentifier to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @instance + * @returns {Object.} JSON object + */ + PostgresqlObjectIdentifier.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PostgresqlObjectIdentifier + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PostgresqlObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier"; + }; + + return PostgresqlObjectIdentifier; })(); - Stream.BackfillAllStrategy = (function() { + SourceObjectIdentifier.MysqlObjectIdentifier = (function() { /** - * Properties of a BackfillAllStrategy. - * @memberof google.cloud.datastream.v1.Stream - * @interface IBackfillAllStrategy - * @property {google.cloud.datastream.v1.IOracleRdbms|null} [oracleExcludedObjects] BackfillAllStrategy oracleExcludedObjects - * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [mysqlExcludedObjects] BackfillAllStrategy mysqlExcludedObjects - * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [postgresqlExcludedObjects] BackfillAllStrategy postgresqlExcludedObjects + * Properties of a MysqlObjectIdentifier. + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @interface IMysqlObjectIdentifier + * @property {string|null} [database] MysqlObjectIdentifier database + * @property {string|null} [table] MysqlObjectIdentifier table */ /** - * Constructs a new BackfillAllStrategy. - * @memberof google.cloud.datastream.v1.Stream - * @classdesc Represents a BackfillAllStrategy. - * @implements IBackfillAllStrategy + * Constructs a new MysqlObjectIdentifier. + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @classdesc Represents a MysqlObjectIdentifier. + * @implements IMysqlObjectIdentifier * @constructor - * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy=} [properties] Properties to set + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier=} [properties] Properties to set */ - function BackfillAllStrategy(properties) { + function MysqlObjectIdentifier(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22021,117 +28719,89 @@ } /** - * BackfillAllStrategy oracleExcludedObjects. - * @member {google.cloud.datastream.v1.IOracleRdbms|null|undefined} oracleExcludedObjects - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @instance - */ - BackfillAllStrategy.prototype.oracleExcludedObjects = null; - - /** - * BackfillAllStrategy mysqlExcludedObjects. - * @member {google.cloud.datastream.v1.IMysqlRdbms|null|undefined} mysqlExcludedObjects - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy - * @instance - */ - BackfillAllStrategy.prototype.mysqlExcludedObjects = null; - - /** - * BackfillAllStrategy postgresqlExcludedObjects. - * @member {google.cloud.datastream.v1.IPostgresqlRdbms|null|undefined} postgresqlExcludedObjects - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * MysqlObjectIdentifier database. + * @member {string} database + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @instance */ - BackfillAllStrategy.prototype.postgresqlExcludedObjects = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + MysqlObjectIdentifier.prototype.database = ""; /** - * BackfillAllStrategy excludedObjects. - * @member {"oracleExcludedObjects"|"mysqlExcludedObjects"|"postgresqlExcludedObjects"|undefined} excludedObjects - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * MysqlObjectIdentifier table. + * @member {string} table + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @instance */ - Object.defineProperty(BackfillAllStrategy.prototype, "excludedObjects", { - get: $util.oneOfGetter($oneOfFields = ["oracleExcludedObjects", "mysqlExcludedObjects", "postgresqlExcludedObjects"]), - set: $util.oneOfSetter($oneOfFields) - }); + MysqlObjectIdentifier.prototype.table = ""; /** - * Creates a new BackfillAllStrategy instance using the specified properties. + * Creates a new MysqlObjectIdentifier instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy instance + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier instance */ - BackfillAllStrategy.create = function create(properties) { - return new BackfillAllStrategy(properties); + MysqlObjectIdentifier.create = function create(properties) { + return new MysqlObjectIdentifier(properties); }; /** - * Encodes the specified BackfillAllStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. + * Encodes the specified MysqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy} message BackfillAllStrategy message or plain object to encode + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier} message MysqlObjectIdentifier message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackfillAllStrategy.encode = function encode(message, writer) { + MysqlObjectIdentifier.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.oracleExcludedObjects != null && Object.hasOwnProperty.call(message, "oracleExcludedObjects")) - $root.google.cloud.datastream.v1.OracleRdbms.encode(message.oracleExcludedObjects, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mysqlExcludedObjects != null && Object.hasOwnProperty.call(message, "mysqlExcludedObjects")) - $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.mysqlExcludedObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.postgresqlExcludedObjects != null && Object.hasOwnProperty.call(message, "postgresqlExcludedObjects")) - $root.google.cloud.datastream.v1.PostgresqlRdbms.encode(message.postgresqlExcludedObjects, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); return writer; }; /** - * Encodes the specified BackfillAllStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillAllStrategy.verify|verify} messages. + * Encodes the specified MysqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillAllStrategy} message BackfillAllStrategy message or plain object to encode + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier} message MysqlObjectIdentifier message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackfillAllStrategy.encodeDelimited = function encodeDelimited(message, writer) { + MysqlObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer. + * Decodes a MysqlObjectIdentifier message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackfillAllStrategy.decode = function decode(reader, length) { + MysqlObjectIdentifier.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.datastream.v1.Stream.BackfillAllStrategy(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.oracleExcludedObjects = $root.google.cloud.datastream.v1.OracleRdbms.decode(reader, reader.uint32()); + message.database = reader.string(); break; } case 2: { - message.mysqlExcludedObjects = $root.google.cloud.datastream.v1.MysqlRdbms.decode(reader, reader.uint32()); - break; - } - case 3: { - message.postgresqlExcludedObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.decode(reader, reader.uint32()); + message.table = reader.string(); break; } default: @@ -22143,235 +28813,224 @@ }; /** - * Decodes a BackfillAllStrategy message from the specified reader or buffer, length delimited. + * Decodes a MysqlObjectIdentifier message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackfillAllStrategy.decodeDelimited = function decodeDelimited(reader) { + MysqlObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackfillAllStrategy message. + * Verifies a MysqlObjectIdentifier message. * @function verify - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackfillAllStrategy.verify = function verify(message) { + MysqlObjectIdentifier.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.oracleExcludedObjects != null && message.hasOwnProperty("oracleExcludedObjects")) { - properties.excludedObjects = 1; - { - var error = $root.google.cloud.datastream.v1.OracleRdbms.verify(message.oracleExcludedObjects); - if (error) - return "oracleExcludedObjects." + error; - } - } - if (message.mysqlExcludedObjects != null && message.hasOwnProperty("mysqlExcludedObjects")) { - if (properties.excludedObjects === 1) - return "excludedObjects: multiple values"; - properties.excludedObjects = 1; - { - var error = $root.google.cloud.datastream.v1.MysqlRdbms.verify(message.mysqlExcludedObjects); - if (error) - return "mysqlExcludedObjects." + error; - } - } - if (message.postgresqlExcludedObjects != null && message.hasOwnProperty("postgresqlExcludedObjects")) { - if (properties.excludedObjects === 1) - return "excludedObjects: multiple values"; - properties.excludedObjects = 1; - { - var error = $root.google.cloud.datastream.v1.PostgresqlRdbms.verify(message.postgresqlExcludedObjects); - if (error) - return "postgresqlExcludedObjects." + error; - } - } + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; return null; }; /** - * Creates a BackfillAllStrategy message from a plain object. Also converts values to their respective internal types. + * Creates a MysqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Stream.BackfillAllStrategy} BackfillAllStrategy + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier */ - BackfillAllStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy) + MysqlObjectIdentifier.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier) return object; - var message = new $root.google.cloud.datastream.v1.Stream.BackfillAllStrategy(); - if (object.oracleExcludedObjects != null) { - if (typeof object.oracleExcludedObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.oracleExcludedObjects: object expected"); - message.oracleExcludedObjects = $root.google.cloud.datastream.v1.OracleRdbms.fromObject(object.oracleExcludedObjects); - } - if (object.mysqlExcludedObjects != null) { - if (typeof object.mysqlExcludedObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.mysqlExcludedObjects: object expected"); - message.mysqlExcludedObjects = $root.google.cloud.datastream.v1.MysqlRdbms.fromObject(object.mysqlExcludedObjects); - } - if (object.postgresqlExcludedObjects != null) { - if (typeof object.postgresqlExcludedObjects !== "object") - throw TypeError(".google.cloud.datastream.v1.Stream.BackfillAllStrategy.postgresqlExcludedObjects: object expected"); - message.postgresqlExcludedObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.fromObject(object.postgresqlExcludedObjects); - } + var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier(); + if (object.database != null) + message.database = String(object.database); + if (object.table != null) + message.table = String(object.table); return message; }; /** - * Creates a plain object from a BackfillAllStrategy message. Also converts values to other types if specified. + * Creates a plain object from a MysqlObjectIdentifier message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @static - * @param {google.cloud.datastream.v1.Stream.BackfillAllStrategy} message BackfillAllStrategy + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} message MysqlObjectIdentifier * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackfillAllStrategy.toObject = function toObject(message, options) { + MysqlObjectIdentifier.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.oracleExcludedObjects != null && message.hasOwnProperty("oracleExcludedObjects")) { - object.oracleExcludedObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.oracleExcludedObjects, options); - if (options.oneofs) - object.excludedObjects = "oracleExcludedObjects"; - } - if (message.mysqlExcludedObjects != null && message.hasOwnProperty("mysqlExcludedObjects")) { - object.mysqlExcludedObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.mysqlExcludedObjects, options); - if (options.oneofs) - object.excludedObjects = "mysqlExcludedObjects"; - } - if (message.postgresqlExcludedObjects != null && message.hasOwnProperty("postgresqlExcludedObjects")) { - object.postgresqlExcludedObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.postgresqlExcludedObjects, options); - if (options.oneofs) - object.excludedObjects = "postgresqlExcludedObjects"; + if (options.defaults) { + object.database = ""; + object.table = ""; } + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; return object; }; /** - * Converts this BackfillAllStrategy to JSON. + * Converts this MysqlObjectIdentifier to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @instance * @returns {Object.} JSON object */ - BackfillAllStrategy.prototype.toJSON = function toJSON() { + MysqlObjectIdentifier.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BackfillAllStrategy + * Gets the default type url for MysqlObjectIdentifier * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Stream.BackfillAllStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BackfillAllStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MysqlObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.Stream.BackfillAllStrategy"; + return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier"; }; - return BackfillAllStrategy; + return MysqlObjectIdentifier; })(); - Stream.BackfillNoneStrategy = (function() { + SourceObjectIdentifier.SqlServerObjectIdentifier = (function() { /** - * Properties of a BackfillNoneStrategy. - * @memberof google.cloud.datastream.v1.Stream - * @interface IBackfillNoneStrategy + * Properties of a SqlServerObjectIdentifier. + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @interface ISqlServerObjectIdentifier + * @property {string|null} [schema] SqlServerObjectIdentifier schema + * @property {string|null} [table] SqlServerObjectIdentifier table */ /** - * Constructs a new BackfillNoneStrategy. - * @memberof google.cloud.datastream.v1.Stream - * @classdesc Represents a BackfillNoneStrategy. - * @implements IBackfillNoneStrategy + * Constructs a new SqlServerObjectIdentifier. + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @classdesc Represents a SqlServerObjectIdentifier. + * @implements ISqlServerObjectIdentifier * @constructor - * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy=} [properties] Properties to set + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier=} [properties] Properties to set + */ + function SqlServerObjectIdentifier(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]]; + } + + /** + * SqlServerObjectIdentifier schema. + * @member {string} schema + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier + * @instance + */ + SqlServerObjectIdentifier.prototype.schema = ""; + + /** + * SqlServerObjectIdentifier table. + * @member {string} table + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier + * @instance */ - function BackfillNoneStrategy(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]]; - } + SqlServerObjectIdentifier.prototype.table = ""; /** - * Creates a new BackfillNoneStrategy instance using the specified properties. + * Creates a new SqlServerObjectIdentifier instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy instance + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier} SqlServerObjectIdentifier instance */ - BackfillNoneStrategy.create = function create(properties) { - return new BackfillNoneStrategy(properties); + SqlServerObjectIdentifier.create = function create(properties) { + return new SqlServerObjectIdentifier(properties); }; /** - * Encodes the specified BackfillNoneStrategy message. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. + * Encodes the specified SqlServerObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy} message BackfillNoneStrategy message or plain object to encode + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier} message SqlServerObjectIdentifier message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackfillNoneStrategy.encode = function encode(message, writer) { + SqlServerObjectIdentifier.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); return writer; }; /** - * Encodes the specified BackfillNoneStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Stream.BackfillNoneStrategy.verify|verify} messages. + * Encodes the specified SqlServerObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier * @static - * @param {google.cloud.datastream.v1.Stream.IBackfillNoneStrategy} message BackfillNoneStrategy message or plain object to encode + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.ISqlServerObjectIdentifier} message SqlServerObjectIdentifier message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackfillNoneStrategy.encodeDelimited = function encodeDelimited(message, writer) { + SqlServerObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer. + * Decodes a SqlServerObjectIdentifier message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier} SqlServerObjectIdentifier * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackfillNoneStrategy.decode = function decode(reader, length) { + SqlServerObjectIdentifier.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.datastream.v1.Stream.BackfillNoneStrategy(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.schema = reader.string(); + break; + } + case 2: { + message.table = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -22381,118 +29040,138 @@ }; /** - * Decodes a BackfillNoneStrategy message from the specified reader or buffer, length delimited. + * Decodes a SqlServerObjectIdentifier message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier} SqlServerObjectIdentifier * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackfillNoneStrategy.decodeDelimited = function decodeDelimited(reader) { + SqlServerObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackfillNoneStrategy message. + * Verifies a SqlServerObjectIdentifier message. * @function verify - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackfillNoneStrategy.verify = function verify(message) { + SqlServerObjectIdentifier.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; return null; }; /** - * Creates a BackfillNoneStrategy message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerObjectIdentifier message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} BackfillNoneStrategy + * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier} SqlServerObjectIdentifier */ - BackfillNoneStrategy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy) + SqlServerObjectIdentifier.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier) return object; - return new $root.google.cloud.datastream.v1.Stream.BackfillNoneStrategy(); + var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier(); + if (object.schema != null) + message.schema = String(object.schema); + if (object.table != null) + message.table = String(object.table); + return message; }; /** - * Creates a plain object from a BackfillNoneStrategy message. Also converts values to other types if specified. + * Creates a plain object from a SqlServerObjectIdentifier message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier * @static - * @param {google.cloud.datastream.v1.Stream.BackfillNoneStrategy} message BackfillNoneStrategy + * @param {google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier} message SqlServerObjectIdentifier * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackfillNoneStrategy.toObject = function toObject() { - return {}; + SqlServerObjectIdentifier.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.schema = ""; + object.table = ""; + } + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + return object; }; /** - * Converts this BackfillNoneStrategy to JSON. + * Converts this SqlServerObjectIdentifier to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier * @instance * @returns {Object.} JSON object */ - BackfillNoneStrategy.prototype.toJSON = function toJSON() { + SqlServerObjectIdentifier.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BackfillNoneStrategy + * Gets the default type url for SqlServerObjectIdentifier * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Stream.BackfillNoneStrategy + * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BackfillNoneStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SqlServerObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.Stream.BackfillNoneStrategy"; + return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier"; }; - return BackfillNoneStrategy; + return SqlServerObjectIdentifier; })(); - return Stream; + return SourceObjectIdentifier; })(); - v1.StreamObject = (function() { + v1.BackfillJob = (function() { /** - * Properties of a StreamObject. + * Properties of a BackfillJob. * @memberof google.cloud.datastream.v1 - * @interface IStreamObject - * @property {string|null} [name] StreamObject name - * @property {google.protobuf.ITimestamp|null} [createTime] StreamObject createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] StreamObject updateTime - * @property {string|null} [displayName] StreamObject displayName - * @property {Array.|null} [errors] StreamObject errors - * @property {google.cloud.datastream.v1.IBackfillJob|null} [backfillJob] StreamObject backfillJob - * @property {google.cloud.datastream.v1.ISourceObjectIdentifier|null} [sourceObject] StreamObject sourceObject + * @interface IBackfillJob + * @property {google.cloud.datastream.v1.BackfillJob.State|null} [state] BackfillJob state + * @property {google.cloud.datastream.v1.BackfillJob.Trigger|null} [trigger] BackfillJob trigger + * @property {google.protobuf.ITimestamp|null} [lastStartTime] BackfillJob lastStartTime + * @property {google.protobuf.ITimestamp|null} [lastEndTime] BackfillJob lastEndTime + * @property {Array.|null} [errors] BackfillJob errors */ /** - * Constructs a new StreamObject. + * Constructs a new BackfillJob. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a StreamObject. - * @implements IStreamObject + * @classdesc Represents a BackfillJob. + * @implements IBackfillJob * @constructor - * @param {google.cloud.datastream.v1.IStreamObject=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IBackfillJob=} [properties] Properties to set */ - function StreamObject(properties) { + function BackfillJob(properties) { this.errors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -22501,164 +29180,136 @@ } /** - * StreamObject name. - * @member {string} name - * @memberof google.cloud.datastream.v1.StreamObject + * BackfillJob state. + * @member {google.cloud.datastream.v1.BackfillJob.State} state + * @memberof google.cloud.datastream.v1.BackfillJob * @instance */ - StreamObject.prototype.name = ""; + BackfillJob.prototype.state = 0; /** - * StreamObject createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.datastream.v1.StreamObject + * BackfillJob trigger. + * @member {google.cloud.datastream.v1.BackfillJob.Trigger} trigger + * @memberof google.cloud.datastream.v1.BackfillJob * @instance */ - StreamObject.prototype.createTime = null; + BackfillJob.prototype.trigger = 0; /** - * StreamObject updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.datastream.v1.StreamObject + * BackfillJob lastStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastStartTime + * @memberof google.cloud.datastream.v1.BackfillJob * @instance */ - StreamObject.prototype.updateTime = null; + BackfillJob.prototype.lastStartTime = null; /** - * StreamObject displayName. - * @member {string} displayName - * @memberof google.cloud.datastream.v1.StreamObject + * BackfillJob lastEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastEndTime + * @memberof google.cloud.datastream.v1.BackfillJob * @instance */ - StreamObject.prototype.displayName = ""; + BackfillJob.prototype.lastEndTime = null; /** - * StreamObject errors. + * BackfillJob errors. * @member {Array.} errors - * @memberof google.cloud.datastream.v1.StreamObject - * @instance - */ - StreamObject.prototype.errors = $util.emptyArray; - - /** - * StreamObject backfillJob. - * @member {google.cloud.datastream.v1.IBackfillJob|null|undefined} backfillJob - * @memberof google.cloud.datastream.v1.StreamObject - * @instance - */ - StreamObject.prototype.backfillJob = null; - - /** - * StreamObject sourceObject. - * @member {google.cloud.datastream.v1.ISourceObjectIdentifier|null|undefined} sourceObject - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @instance */ - StreamObject.prototype.sourceObject = null; + BackfillJob.prototype.errors = $util.emptyArray; /** - * Creates a new StreamObject instance using the specified properties. + * Creates a new BackfillJob instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @static - * @param {google.cloud.datastream.v1.IStreamObject=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.StreamObject} StreamObject instance + * @param {google.cloud.datastream.v1.IBackfillJob=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob instance */ - StreamObject.create = function create(properties) { - return new StreamObject(properties); + BackfillJob.create = function create(properties) { + return new BackfillJob(properties); }; /** - * Encodes the specified StreamObject message. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. + * Encodes the specified BackfillJob message. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @static - * @param {google.cloud.datastream.v1.IStreamObject} message StreamObject message or plain object to encode + * @param {google.cloud.datastream.v1.IBackfillJob} message BackfillJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamObject.encode = function encode(message, writer) { + BackfillJob.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trigger); + if (message.lastStartTime != null && Object.hasOwnProperty.call(message, "lastStartTime")) + $root.google.protobuf.Timestamp.encode(message.lastStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastEndTime != null && Object.hasOwnProperty.call(message, "lastEndTime")) + $root.google.protobuf.Timestamp.encode(message.lastEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.errors != null && message.errors.length) for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.datastream.v1.Error.encode(message.errors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.backfillJob != null && Object.hasOwnProperty.call(message, "backfillJob")) - $root.google.cloud.datastream.v1.BackfillJob.encode(message.backfillJob, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.sourceObject != null && Object.hasOwnProperty.call(message, "sourceObject")) - $root.google.cloud.datastream.v1.SourceObjectIdentifier.encode(message.sourceObject, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.cloud.datastream.v1.Error.encode(message.errors[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified StreamObject message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.StreamObject.verify|verify} messages. + * Encodes the specified BackfillJob message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @static - * @param {google.cloud.datastream.v1.IStreamObject} message StreamObject message or plain object to encode + * @param {google.cloud.datastream.v1.IBackfillJob} message BackfillJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StreamObject.encodeDelimited = function encodeDelimited(message, writer) { + BackfillJob.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StreamObject message from the specified reader or buffer. + * Decodes a BackfillJob message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.StreamObject} StreamObject + * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamObject.decode = function decode(reader, length) { + BackfillJob.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.datastream.v1.StreamObject(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.BackfillJob(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.state = reader.int32(); break; } case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.trigger = reader.int32(); break; } case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.lastStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 5: { - message.displayName = reader.string(); + case 4: { + message.lastEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 6: { + case 5: { if (!(message.errors && message.errors.length)) message.errors = []; message.errors.push($root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32())); break; } - case 7: { - message.backfillJob = $root.google.cloud.datastream.v1.BackfillJob.decode(reader, reader.uint32()); - break; - } - case 8: { - message.sourceObject = $root.google.cloud.datastream.v1.SourceObjectIdentifier.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -22668,48 +29319,65 @@ }; /** - * Decodes a StreamObject message from the specified reader or buffer, length delimited. + * Decodes a BackfillJob message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.StreamObject} StreamObject + * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StreamObject.decodeDelimited = function decodeDelimited(reader) { + BackfillJob.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StreamObject message. + * Verifies a BackfillJob message. * @function verify - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StreamObject.verify = function verify(message) { + BackfillJob.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + 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 6: + case 7: + break; + } + 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.lastStartTime != null && message.hasOwnProperty("lastStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastStartTime); if (error) - return "createTime." + error; + return "lastStartTime." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.lastEndTime != null && message.hasOwnProperty("lastEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastEndTime); if (error) - return "updateTime." + error; + return "lastEndTime." + error; } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; if (message.errors != null && message.hasOwnProperty("errors")) { if (!Array.isArray(message.errors)) return "errors: array expected"; @@ -22719,160 +29387,235 @@ return "errors." + error; } } - if (message.backfillJob != null && message.hasOwnProperty("backfillJob")) { - var error = $root.google.cloud.datastream.v1.BackfillJob.verify(message.backfillJob); - if (error) - return "backfillJob." + error; - } - if (message.sourceObject != null && message.hasOwnProperty("sourceObject")) { - var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.verify(message.sourceObject); - if (error) - return "sourceObject." + error; - } return null; }; /** - * Creates a StreamObject message from a plain object. Also converts values to their respective internal types. + * Creates a BackfillJob message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.StreamObject} StreamObject + * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob */ - StreamObject.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.StreamObject) + BackfillJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.BackfillJob) return object; - var message = new $root.google.cloud.datastream.v1.StreamObject(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.datastream.v1.StreamObject.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.datastream.v1.BackfillJob(); + 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 "NOT_STARTED": + case 1: + message.state = 1; + break; + case "PENDING": + case 2: + message.state = 2; + break; + case "ACTIVE": + case 3: + message.state = 3; + break; + case "STOPPED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "COMPLETED": + case 6: + message.state = 6; + break; + case "UNSUPPORTED": + case 7: + message.state = 7; + break; } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.datastream.v1.StreamObject.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + 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 "AUTOMATIC": + case 1: + message.trigger = 1; + break; + case "MANUAL": + case 2: + message.trigger = 2; + break; + } + if (object.lastStartTime != null) { + if (typeof object.lastStartTime !== "object") + throw TypeError(".google.cloud.datastream.v1.BackfillJob.lastStartTime: object expected"); + message.lastStartTime = $root.google.protobuf.Timestamp.fromObject(object.lastStartTime); + } + if (object.lastEndTime != null) { + if (typeof object.lastEndTime !== "object") + throw TypeError(".google.cloud.datastream.v1.BackfillJob.lastEndTime: object expected"); + message.lastEndTime = $root.google.protobuf.Timestamp.fromObject(object.lastEndTime); } - if (object.displayName != null) - message.displayName = String(object.displayName); if (object.errors) { if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.datastream.v1.StreamObject.errors: array expected"); + throw TypeError(".google.cloud.datastream.v1.BackfillJob.errors: array expected"); message.errors = []; for (var i = 0; i < object.errors.length; ++i) { if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.StreamObject.errors: object expected"); + throw TypeError(".google.cloud.datastream.v1.BackfillJob.errors: object expected"); message.errors[i] = $root.google.cloud.datastream.v1.Error.fromObject(object.errors[i]); } } - if (object.backfillJob != null) { - if (typeof object.backfillJob !== "object") - throw TypeError(".google.cloud.datastream.v1.StreamObject.backfillJob: object expected"); - message.backfillJob = $root.google.cloud.datastream.v1.BackfillJob.fromObject(object.backfillJob); - } - if (object.sourceObject != null) { - if (typeof object.sourceObject !== "object") - throw TypeError(".google.cloud.datastream.v1.StreamObject.sourceObject: object expected"); - message.sourceObject = $root.google.cloud.datastream.v1.SourceObjectIdentifier.fromObject(object.sourceObject); - } return message; }; /** - * Creates a plain object from a StreamObject message. Also converts values to other types if specified. + * Creates a plain object from a BackfillJob message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @static - * @param {google.cloud.datastream.v1.StreamObject} message StreamObject + * @param {google.cloud.datastream.v1.BackfillJob} message BackfillJob * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StreamObject.toObject = function toObject(message, options) { + BackfillJob.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.errors = []; if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.backfillJob = null; - object.sourceObject = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; + object.lastStartTime = null; + object.lastEndTime = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.datastream.v1.BackfillJob.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.BackfillJob.State[message.state] : message.state; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = options.enums === String ? $root.google.cloud.datastream.v1.BackfillJob.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.datastream.v1.BackfillJob.Trigger[message.trigger] : message.trigger; + if (message.lastStartTime != null && message.hasOwnProperty("lastStartTime")) + object.lastStartTime = $root.google.protobuf.Timestamp.toObject(message.lastStartTime, options); + if (message.lastEndTime != null && message.hasOwnProperty("lastEndTime")) + object.lastEndTime = $root.google.protobuf.Timestamp.toObject(message.lastEndTime, options); if (message.errors && message.errors.length) { object.errors = []; for (var j = 0; j < message.errors.length; ++j) object.errors[j] = $root.google.cloud.datastream.v1.Error.toObject(message.errors[j], options); } - if (message.backfillJob != null && message.hasOwnProperty("backfillJob")) - object.backfillJob = $root.google.cloud.datastream.v1.BackfillJob.toObject(message.backfillJob, options); - if (message.sourceObject != null && message.hasOwnProperty("sourceObject")) - object.sourceObject = $root.google.cloud.datastream.v1.SourceObjectIdentifier.toObject(message.sourceObject, options); return object; }; /** - * Converts this StreamObject to JSON. + * Converts this BackfillJob to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @instance * @returns {Object.} JSON object */ - StreamObject.prototype.toJSON = function toJSON() { + BackfillJob.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StreamObject + * Gets the default type url for BackfillJob * @function getTypeUrl - * @memberof google.cloud.datastream.v1.StreamObject + * @memberof google.cloud.datastream.v1.BackfillJob * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StreamObject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackfillJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.StreamObject"; + return typeUrlPrefix + "/google.cloud.datastream.v1.BackfillJob"; }; - return StreamObject; + /** + * State enum. + * @name google.cloud.datastream.v1.BackfillJob.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} NOT_STARTED=1 NOT_STARTED value + * @property {number} PENDING=2 PENDING value + * @property {number} ACTIVE=3 ACTIVE value + * @property {number} STOPPED=4 STOPPED value + * @property {number} FAILED=5 FAILED value + * @property {number} COMPLETED=6 COMPLETED value + * @property {number} UNSUPPORTED=7 UNSUPPORTED value + */ + BackfillJob.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_STARTED"] = 1; + values[valuesById[2] = "PENDING"] = 2; + values[valuesById[3] = "ACTIVE"] = 3; + values[valuesById[4] = "STOPPED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "COMPLETED"] = 6; + values[valuesById[7] = "UNSUPPORTED"] = 7; + return values; + })(); + + /** + * Trigger enum. + * @name google.cloud.datastream.v1.BackfillJob.Trigger + * @enum {number} + * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value + * @property {number} AUTOMATIC=1 AUTOMATIC value + * @property {number} MANUAL=2 MANUAL value + */ + BackfillJob.Trigger = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTOMATIC"] = 1; + values[valuesById[2] = "MANUAL"] = 2; + return values; + })(); + + return BackfillJob; })(); - v1.SourceObjectIdentifier = (function() { + v1.Error = (function() { /** - * Properties of a SourceObjectIdentifier. + * Properties of an Error. * @memberof google.cloud.datastream.v1 - * @interface ISourceObjectIdentifier - * @property {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null} [oracleIdentifier] SourceObjectIdentifier oracleIdentifier - * @property {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null} [mysqlIdentifier] SourceObjectIdentifier mysqlIdentifier - * @property {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null} [postgresqlIdentifier] SourceObjectIdentifier postgresqlIdentifier + * @interface IError + * @property {string|null} [reason] Error reason + * @property {string|null} [errorUuid] Error errorUuid + * @property {string|null} [message] Error message + * @property {google.protobuf.ITimestamp|null} [errorTime] Error errorTime + * @property {Object.|null} [details] Error details */ /** - * Constructs a new SourceObjectIdentifier. + * Constructs a new Error. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a SourceObjectIdentifier. - * @implements ISourceObjectIdentifier + * @classdesc Represents an Error. + * @implements IError * @constructor - * @param {google.cloud.datastream.v1.ISourceObjectIdentifier=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IError=} [properties] Properties to set */ - function SourceObjectIdentifier(properties) { + function Error(properties) { + this.details = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22880,117 +29623,151 @@ } /** - * SourceObjectIdentifier oracleIdentifier. - * @member {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier|null|undefined} oracleIdentifier - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * Error reason. + * @member {string} reason + * @memberof google.cloud.datastream.v1.Error * @instance */ - SourceObjectIdentifier.prototype.oracleIdentifier = null; + Error.prototype.reason = ""; /** - * SourceObjectIdentifier mysqlIdentifier. - * @member {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier|null|undefined} mysqlIdentifier - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * Error errorUuid. + * @member {string} errorUuid + * @memberof google.cloud.datastream.v1.Error * @instance */ - SourceObjectIdentifier.prototype.mysqlIdentifier = null; + Error.prototype.errorUuid = ""; /** - * SourceObjectIdentifier postgresqlIdentifier. - * @member {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier|null|undefined} postgresqlIdentifier - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * Error message. + * @member {string} message + * @memberof google.cloud.datastream.v1.Error * @instance */ - SourceObjectIdentifier.prototype.postgresqlIdentifier = null; + Error.prototype.message = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Error errorTime. + * @member {google.protobuf.ITimestamp|null|undefined} errorTime + * @memberof google.cloud.datastream.v1.Error + * @instance + */ + Error.prototype.errorTime = null; /** - * SourceObjectIdentifier sourceIdentifier. - * @member {"oracleIdentifier"|"mysqlIdentifier"|"postgresqlIdentifier"|undefined} sourceIdentifier - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * Error details. + * @member {Object.} details + * @memberof google.cloud.datastream.v1.Error * @instance */ - Object.defineProperty(SourceObjectIdentifier.prototype, "sourceIdentifier", { - get: $util.oneOfGetter($oneOfFields = ["oracleIdentifier", "mysqlIdentifier", "postgresqlIdentifier"]), - set: $util.oneOfSetter($oneOfFields) - }); + Error.prototype.details = $util.emptyObject; /** - * Creates a new SourceObjectIdentifier instance using the specified properties. + * Creates a new Error instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @memberof google.cloud.datastream.v1.Error * @static - * @param {google.cloud.datastream.v1.ISourceObjectIdentifier=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier instance + * @param {google.cloud.datastream.v1.IError=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.Error} Error instance */ - SourceObjectIdentifier.create = function create(properties) { - return new SourceObjectIdentifier(properties); + Error.create = function create(properties) { + return new Error(properties); }; /** - * Encodes the specified SourceObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. + * Encodes the specified Error message. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @memberof google.cloud.datastream.v1.Error * @static - * @param {google.cloud.datastream.v1.ISourceObjectIdentifier} message SourceObjectIdentifier message or plain object to encode + * @param {google.cloud.datastream.v1.IError} message Error message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceObjectIdentifier.encode = function encode(message, writer) { + Error.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.oracleIdentifier != null && Object.hasOwnProperty.call(message, "oracleIdentifier")) - $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.encode(message.oracleIdentifier, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mysqlIdentifier != null && Object.hasOwnProperty.call(message, "mysqlIdentifier")) - $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.encode(message.mysqlIdentifier, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.postgresqlIdentifier != null && Object.hasOwnProperty.call(message, "postgresqlIdentifier")) - $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.encode(message.postgresqlIdentifier, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reason); + if (message.errorUuid != null && Object.hasOwnProperty.call(message, "errorUuid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorUuid); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.message); + if (message.errorTime != null && Object.hasOwnProperty.call(message, "errorTime")) + $root.google.protobuf.Timestamp.encode(message.errorTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + for (var keys = Object.keys(message.details), 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.details[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified SourceObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.verify|verify} messages. + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @memberof google.cloud.datastream.v1.Error * @static - * @param {google.cloud.datastream.v1.ISourceObjectIdentifier} message SourceObjectIdentifier message or plain object to encode + * @param {google.cloud.datastream.v1.IError} message Error message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { + Error.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceObjectIdentifier message from the specified reader or buffer. + * Decodes an Error message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @memberof google.cloud.datastream.v1.Error * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier + * @returns {google.cloud.datastream.v1.Error} Error * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceObjectIdentifier.decode = function decode(reader, length) { + Error.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.datastream.v1.SourceObjectIdentifier(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.Error(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.oracleIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.decode(reader, reader.uint32()); + message.reason = reader.string(); break; } case 2: { - message.mysqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.decode(reader, reader.uint32()); + message.errorUuid = reader.string(); break; } case 3: { - message.postgresqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.decode(reader, reader.uint32()); + message.message = reader.string(); + break; + } + case 4: { + message.errorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + if (message.details === $util.emptyObject) + message.details = {}; + 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.details[key] = value; break; } default: @@ -23002,858 +29779,1099 @@ }; /** - * Decodes a SourceObjectIdentifier message from the specified reader or buffer, length delimited. + * Decodes an Error message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @memberof google.cloud.datastream.v1.Error * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier + * @returns {google.cloud.datastream.v1.Error} Error * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { + Error.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceObjectIdentifier message. + * Verifies an Error message. * @function verify - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @memberof google.cloud.datastream.v1.Error * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceObjectIdentifier.verify = function verify(message) { + Error.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.oracleIdentifier != null && message.hasOwnProperty("oracleIdentifier")) { - properties.sourceIdentifier = 1; - { - var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify(message.oracleIdentifier); - if (error) - return "oracleIdentifier." + error; - } - } - if (message.mysqlIdentifier != null && message.hasOwnProperty("mysqlIdentifier")) { - if (properties.sourceIdentifier === 1) - return "sourceIdentifier: multiple values"; - properties.sourceIdentifier = 1; - { - var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify(message.mysqlIdentifier); - if (error) - return "mysqlIdentifier." + error; - } + if (message.reason != null && message.hasOwnProperty("reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + if (message.errorUuid != null && message.hasOwnProperty("errorUuid")) + if (!$util.isString(message.errorUuid)) + return "errorUuid: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.errorTime != null && message.hasOwnProperty("errorTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.errorTime); + if (error) + return "errorTime." + error; } - if (message.postgresqlIdentifier != null && message.hasOwnProperty("postgresqlIdentifier")) { - if (properties.sourceIdentifier === 1) - return "sourceIdentifier: multiple values"; - properties.sourceIdentifier = 1; - { - var error = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify(message.postgresqlIdentifier); - if (error) - return "postgresqlIdentifier." + error; - } + if (message.details != null && message.hasOwnProperty("details")) { + if (!$util.isObject(message.details)) + return "details: object expected"; + var key = Object.keys(message.details); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.details[key[i]])) + return "details: string{k:string} expected"; } return null; }; /** - * Creates a SourceObjectIdentifier message from a plain object. Also converts values to their respective internal types. + * Creates an Error message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @memberof google.cloud.datastream.v1.Error * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier} SourceObjectIdentifier + * @returns {google.cloud.datastream.v1.Error} Error */ - SourceObjectIdentifier.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier) + Error.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.Error) return object; - var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier(); - if (object.oracleIdentifier != null) { - if (typeof object.oracleIdentifier !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.oracleIdentifier: object expected"); - message.oracleIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.fromObject(object.oracleIdentifier); - } - if (object.mysqlIdentifier != null) { - if (typeof object.mysqlIdentifier !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.mysqlIdentifier: object expected"); - message.mysqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.fromObject(object.mysqlIdentifier); - } - if (object.postgresqlIdentifier != null) { - if (typeof object.postgresqlIdentifier !== "object") - throw TypeError(".google.cloud.datastream.v1.SourceObjectIdentifier.postgresqlIdentifier: object expected"); - message.postgresqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.fromObject(object.postgresqlIdentifier); + var message = new $root.google.cloud.datastream.v1.Error(); + if (object.reason != null) + message.reason = String(object.reason); + if (object.errorUuid != null) + message.errorUuid = String(object.errorUuid); + if (object.message != null) + message.message = String(object.message); + if (object.errorTime != null) { + if (typeof object.errorTime !== "object") + throw TypeError(".google.cloud.datastream.v1.Error.errorTime: object expected"); + message.errorTime = $root.google.protobuf.Timestamp.fromObject(object.errorTime); + } + if (object.details) { + if (typeof object.details !== "object") + throw TypeError(".google.cloud.datastream.v1.Error.details: object expected"); + message.details = {}; + for (var keys = Object.keys(object.details), i = 0; i < keys.length; ++i) + message.details[keys[i]] = String(object.details[keys[i]]); } return message; }; /** - * Creates a plain object from a SourceObjectIdentifier message. Also converts values to other types if specified. + * Creates a plain object from an Error message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @memberof google.cloud.datastream.v1.Error * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier} message SourceObjectIdentifier + * @param {google.cloud.datastream.v1.Error} message Error * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceObjectIdentifier.toObject = function toObject(message, options) { + Error.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.oracleIdentifier != null && message.hasOwnProperty("oracleIdentifier")) { - object.oracleIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.toObject(message.oracleIdentifier, options); - if (options.oneofs) - object.sourceIdentifier = "oracleIdentifier"; - } - if (message.mysqlIdentifier != null && message.hasOwnProperty("mysqlIdentifier")) { - object.mysqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.toObject(message.mysqlIdentifier, options); - if (options.oneofs) - object.sourceIdentifier = "mysqlIdentifier"; + if (options.objects || options.defaults) + object.details = {}; + if (options.defaults) { + object.reason = ""; + object.errorUuid = ""; + object.message = ""; + object.errorTime = null; } - if (message.postgresqlIdentifier != null && message.hasOwnProperty("postgresqlIdentifier")) { - object.postgresqlIdentifier = $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.toObject(message.postgresqlIdentifier, options); - if (options.oneofs) - object.sourceIdentifier = "postgresqlIdentifier"; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = message.reason; + if (message.errorUuid != null && message.hasOwnProperty("errorUuid")) + object.errorUuid = message.errorUuid; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.errorTime != null && message.hasOwnProperty("errorTime")) + object.errorTime = $root.google.protobuf.Timestamp.toObject(message.errorTime, options); + var keys2; + if (message.details && (keys2 = Object.keys(message.details)).length) { + object.details = {}; + for (var j = 0; j < keys2.length; ++j) + object.details[keys2[j]] = message.details[keys2[j]]; } return object; }; /** - * Converts this SourceObjectIdentifier to JSON. + * Converts this Error to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @memberof google.cloud.datastream.v1.Error * @instance * @returns {Object.} JSON object */ - SourceObjectIdentifier.prototype.toJSON = function toJSON() { + Error.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SourceObjectIdentifier + * Gets the default type url for Error * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier + * @memberof google.cloud.datastream.v1.Error * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SourceObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier"; + return typeUrlPrefix + "/google.cloud.datastream.v1.Error"; }; - SourceObjectIdentifier.OracleObjectIdentifier = (function() { + return Error; + })(); - /** - * Properties of an OracleObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @interface IOracleObjectIdentifier - * @property {string|null} [schema] OracleObjectIdentifier schema - * @property {string|null} [table] OracleObjectIdentifier table - */ + v1.ValidationResult = (function() { - /** - * Constructs a new OracleObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @classdesc Represents an OracleObjectIdentifier. - * @implements IOracleObjectIdentifier - * @constructor - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier=} [properties] Properties to set - */ - function OracleObjectIdentifier(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ValidationResult. + * @memberof google.cloud.datastream.v1 + * @interface IValidationResult + * @property {Array.|null} [validations] ValidationResult validations + */ - /** - * OracleObjectIdentifier schema. - * @member {string} schema - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @instance - */ - OracleObjectIdentifier.prototype.schema = ""; + /** + * Constructs a new ValidationResult. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a ValidationResult. + * @implements IValidationResult + * @constructor + * @param {google.cloud.datastream.v1.IValidationResult=} [properties] Properties to set + */ + function ValidationResult(properties) { + this.validations = []; + 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]]; + } - /** - * OracleObjectIdentifier table. - * @member {string} table - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @instance - */ - OracleObjectIdentifier.prototype.table = ""; + /** + * ValidationResult validations. + * @member {Array.} validations + * @memberof google.cloud.datastream.v1.ValidationResult + * @instance + */ + ValidationResult.prototype.validations = $util.emptyArray; - /** - * Creates a new OracleObjectIdentifier instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier instance - */ - OracleObjectIdentifier.create = function create(properties) { - return new OracleObjectIdentifier(properties); - }; + /** + * Creates a new ValidationResult instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.ValidationResult + * @static + * @param {google.cloud.datastream.v1.IValidationResult=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult instance + */ + ValidationResult.create = function create(properties) { + return new ValidationResult(properties); + }; - /** - * Encodes the specified OracleObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier} message OracleObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleObjectIdentifier.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); - return writer; - }; + /** + * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.ValidationResult + * @static + * @param {google.cloud.datastream.v1.IValidationResult} message ValidationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validations != null && message.validations.length) + for (var i = 0; i < message.validations.length; ++i) + $root.google.cloud.datastream.v1.Validation.encode(message.validations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified OracleObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IOracleObjectIdentifier} message OracleObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OracleObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.ValidationResult + * @static + * @param {google.cloud.datastream.v1.IValidationResult} message ValidationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an OracleObjectIdentifier message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleObjectIdentifier.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.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schema = reader.string(); - break; - } - case 2: { - message.table = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ValidationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.ValidationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidationResult.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.datastream.v1.ValidationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.validations && message.validations.length)) + message.validations = []; + message.validations.push($root.google.cloud.datastream.v1.Validation.decode(reader, reader.uint32())); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes an OracleObjectIdentifier message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OracleObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OracleObjectIdentifier message. - * @function verify - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OracleObjectIdentifier.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - return null; - }; + } + return message; + }; - /** - * Creates an OracleObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} OracleObjectIdentifier - */ - OracleObjectIdentifier.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier) - return object; - var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier(); - if (object.schema != null) - message.schema = String(object.schema); - if (object.table != null) - message.table = String(object.table); - return message; - }; + /** + * Decodes a ValidationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.ValidationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from an OracleObjectIdentifier message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier} message OracleObjectIdentifier - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OracleObjectIdentifier.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.schema = ""; - object.table = ""; + /** + * Verifies a ValidationResult message. + * @function verify + * @memberof google.cloud.datastream.v1.ValidationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidationResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validations != null && message.hasOwnProperty("validations")) { + if (!Array.isArray(message.validations)) + return "validations: array expected"; + for (var i = 0; i < message.validations.length; ++i) { + var error = $root.google.cloud.datastream.v1.Validation.verify(message.validations[i]); + if (error) + return "validations." + error; } - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; + } + return null; + }; + + /** + * Creates a ValidationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.ValidationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult + */ + ValidationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.ValidationResult) return object; - }; + var message = new $root.google.cloud.datastream.v1.ValidationResult(); + if (object.validations) { + if (!Array.isArray(object.validations)) + throw TypeError(".google.cloud.datastream.v1.ValidationResult.validations: array expected"); + message.validations = []; + for (var i = 0; i < object.validations.length; ++i) { + if (typeof object.validations[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.ValidationResult.validations: object expected"); + message.validations[i] = $root.google.cloud.datastream.v1.Validation.fromObject(object.validations[i]); + } + } + return message; + }; - /** - * Converts this OracleObjectIdentifier to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @instance - * @returns {Object.} JSON object - */ - OracleObjectIdentifier.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.ValidationResult + * @static + * @param {google.cloud.datastream.v1.ValidationResult} message ValidationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validations = []; + if (message.validations && message.validations.length) { + object.validations = []; + for (var j = 0; j < message.validations.length; ++j) + object.validations[j] = $root.google.cloud.datastream.v1.Validation.toObject(message.validations[j], options); + } + return object; + }; - /** - * Gets the default type url for OracleObjectIdentifier - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OracleObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier"; - }; + /** + * Converts this ValidationResult to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.ValidationResult + * @instance + * @returns {Object.} JSON object + */ + ValidationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return OracleObjectIdentifier; - })(); + /** + * Gets the default type url for ValidationResult + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.ValidationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.ValidationResult"; + }; - SourceObjectIdentifier.PostgresqlObjectIdentifier = (function() { + return ValidationResult; + })(); - /** - * Properties of a PostgresqlObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @interface IPostgresqlObjectIdentifier - * @property {string|null} [schema] PostgresqlObjectIdentifier schema - * @property {string|null} [table] PostgresqlObjectIdentifier table - */ + v1.Validation = (function() { + + /** + * Properties of a Validation. + * @memberof google.cloud.datastream.v1 + * @interface IValidation + * @property {string|null} [description] Validation description + * @property {google.cloud.datastream.v1.Validation.State|null} [state] Validation state + * @property {Array.|null} [message] Validation message + * @property {string|null} [code] Validation code + */ + + /** + * Constructs a new Validation. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a Validation. + * @implements IValidation + * @constructor + * @param {google.cloud.datastream.v1.IValidation=} [properties] Properties to set + */ + function Validation(properties) { + this.message = []; + 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 PostgresqlObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @classdesc Represents a PostgresqlObjectIdentifier. - * @implements IPostgresqlObjectIdentifier - * @constructor - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier=} [properties] Properties to set - */ - function PostgresqlObjectIdentifier(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]]; - } + /** + * Validation description. + * @member {string} description + * @memberof google.cloud.datastream.v1.Validation + * @instance + */ + Validation.prototype.description = ""; - /** - * PostgresqlObjectIdentifier schema. - * @member {string} schema - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @instance - */ - PostgresqlObjectIdentifier.prototype.schema = ""; + /** + * Validation state. + * @member {google.cloud.datastream.v1.Validation.State} state + * @memberof google.cloud.datastream.v1.Validation + * @instance + */ + Validation.prototype.state = 0; - /** - * PostgresqlObjectIdentifier table. - * @member {string} table - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @instance - */ - PostgresqlObjectIdentifier.prototype.table = ""; + /** + * Validation message. + * @member {Array.} message + * @memberof google.cloud.datastream.v1.Validation + * @instance + */ + Validation.prototype.message = $util.emptyArray; - /** - * Creates a new PostgresqlObjectIdentifier instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier instance - */ - PostgresqlObjectIdentifier.create = function create(properties) { - return new PostgresqlObjectIdentifier(properties); - }; + /** + * Validation code. + * @member {string} code + * @memberof google.cloud.datastream.v1.Validation + * @instance + */ + Validation.prototype.code = ""; - /** - * Encodes the specified PostgresqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier} message PostgresqlObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlObjectIdentifier.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); - return writer; - }; + /** + * Creates a new Validation instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.Validation + * @static + * @param {google.cloud.datastream.v1.IValidation=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.Validation} Validation instance + */ + Validation.create = function create(properties) { + return new Validation(properties); + }; - /** - * Encodes the specified PostgresqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IPostgresqlObjectIdentifier} message PostgresqlObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PostgresqlObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Validation message. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.Validation + * @static + * @param {google.cloud.datastream.v1.IValidation} message Validation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.message != null && message.message.length) + for (var i = 0; i < message.message.length; ++i) + $root.google.cloud.datastream.v1.ValidationMessage.encode(message.message[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); + return writer; + }; - /** - * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlObjectIdentifier.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.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.schema = reader.string(); - break; - } - case 2: { - message.table = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.Validation + * @static + * @param {google.cloud.datastream.v1.IValidation} message Validation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.Validation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.Validation} Validation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validation.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.datastream.v1.Validation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + if (!(message.message && message.message.length)) + message.message = []; + message.message.push($root.google.cloud.datastream.v1.ValidationMessage.decode(reader, reader.uint32())); + break; + } + case 4: { + message.code = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.Validation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.Validation} Validation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validation message. + * @function verify + * @memberof google.cloud.datastream.v1.Validation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + 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.message != null && message.hasOwnProperty("message")) { + if (!Array.isArray(message.message)) + return "message: array expected"; + for (var i = 0; i < message.message.length; ++i) { + var error = $root.google.cloud.datastream.v1.ValidationMessage.verify(message.message[i]); + if (error) + return "message." + error; } - return message; - }; + } + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isString(message.code)) + return "code: string expected"; + return null; + }; - /** - * Decodes a PostgresqlObjectIdentifier message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a Validation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.Validation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.Validation} Validation + */ + Validation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.Validation) + return object; + var message = new $root.google.cloud.datastream.v1.Validation(); + if (object.description != null) + message.description = String(object.description); + 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 "NOT_EXECUTED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "PASSED": + case 3: + message.state = 3; + break; + case "WARNING": + case 4: + message.state = 4; + break; + } + if (object.message) { + if (!Array.isArray(object.message)) + throw TypeError(".google.cloud.datastream.v1.Validation.message: array expected"); + message.message = []; + for (var i = 0; i < object.message.length; ++i) { + if (typeof object.message[i] !== "object") + throw TypeError(".google.cloud.datastream.v1.Validation.message: object expected"); + message.message[i] = $root.google.cloud.datastream.v1.ValidationMessage.fromObject(object.message[i]); + } + } + if (object.code != null) + message.code = String(object.code); + return message; + }; - /** - * Verifies a PostgresqlObjectIdentifier message. - * @function verify - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PostgresqlObjectIdentifier.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - return null; - }; + /** + * Creates a plain object from a Validation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.Validation + * @static + * @param {google.cloud.datastream.v1.Validation} message Validation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.message = []; + if (options.defaults) { + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.code = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.datastream.v1.Validation.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.Validation.State[message.state] : message.state; + if (message.message && message.message.length) { + object.message = []; + for (var j = 0; j < message.message.length; ++j) + object.message[j] = $root.google.cloud.datastream.v1.ValidationMessage.toObject(message.message[j], options); + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + return object; + }; - /** - * Creates a PostgresqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} PostgresqlObjectIdentifier - */ - PostgresqlObjectIdentifier.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier) - return object; - var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier(); - if (object.schema != null) - message.schema = String(object.schema); - if (object.table != null) - message.table = String(object.table); - return message; - }; + /** + * Converts this Validation to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.Validation + * @instance + * @returns {Object.} JSON object + */ + Validation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a PostgresqlObjectIdentifier message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier} message PostgresqlObjectIdentifier - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlObjectIdentifier.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.schema = ""; - object.table = ""; - } - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - return object; - }; + /** + * Gets the default type url for Validation + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.Validation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Validation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.Validation"; + }; - /** - * Converts this PostgresqlObjectIdentifier to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @instance - * @returns {Object.} JSON object - */ - PostgresqlObjectIdentifier.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * State enum. + * @name google.cloud.datastream.v1.Validation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} NOT_EXECUTED=1 NOT_EXECUTED value + * @property {number} FAILED=2 FAILED value + * @property {number} PASSED=3 PASSED value + * @property {number} WARNING=4 WARNING value + */ + Validation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_EXECUTED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "PASSED"] = 3; + values[valuesById[4] = "WARNING"] = 4; + return values; + })(); - /** - * Gets the default type url for PostgresqlObjectIdentifier - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier"; - }; + return Validation; + })(); - return PostgresqlObjectIdentifier; - })(); + v1.ValidationMessage = (function() { + + /** + * Properties of a ValidationMessage. + * @memberof google.cloud.datastream.v1 + * @interface IValidationMessage + * @property {string|null} [message] ValidationMessage message + * @property {google.cloud.datastream.v1.ValidationMessage.Level|null} [level] ValidationMessage level + * @property {Object.|null} [metadata] ValidationMessage metadata + * @property {string|null} [code] ValidationMessage code + */ - SourceObjectIdentifier.MysqlObjectIdentifier = (function() { + /** + * Constructs a new ValidationMessage. + * @memberof google.cloud.datastream.v1 + * @classdesc Represents a ValidationMessage. + * @implements IValidationMessage + * @constructor + * @param {google.cloud.datastream.v1.IValidationMessage=} [properties] Properties to set + */ + function ValidationMessage(properties) { + this.metadata = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a MysqlObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @interface IMysqlObjectIdentifier - * @property {string|null} [database] MysqlObjectIdentifier database - * @property {string|null} [table] MysqlObjectIdentifier table - */ + /** + * ValidationMessage message. + * @member {string} message + * @memberof google.cloud.datastream.v1.ValidationMessage + * @instance + */ + ValidationMessage.prototype.message = ""; - /** - * Constructs a new MysqlObjectIdentifier. - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier - * @classdesc Represents a MysqlObjectIdentifier. - * @implements IMysqlObjectIdentifier - * @constructor - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier=} [properties] Properties to set - */ - function MysqlObjectIdentifier(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]]; - } + /** + * ValidationMessage level. + * @member {google.cloud.datastream.v1.ValidationMessage.Level} level + * @memberof google.cloud.datastream.v1.ValidationMessage + * @instance + */ + ValidationMessage.prototype.level = 0; - /** - * MysqlObjectIdentifier database. - * @member {string} database - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @instance - */ - MysqlObjectIdentifier.prototype.database = ""; + /** + * ValidationMessage metadata. + * @member {Object.} metadata + * @memberof google.cloud.datastream.v1.ValidationMessage + * @instance + */ + ValidationMessage.prototype.metadata = $util.emptyObject; - /** - * MysqlObjectIdentifier table. - * @member {string} table - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @instance - */ - MysqlObjectIdentifier.prototype.table = ""; + /** + * ValidationMessage code. + * @member {string} code + * @memberof google.cloud.datastream.v1.ValidationMessage + * @instance + */ + ValidationMessage.prototype.code = ""; - /** - * Creates a new MysqlObjectIdentifier instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier instance - */ - MysqlObjectIdentifier.create = function create(properties) { - return new MysqlObjectIdentifier(properties); - }; + /** + * Creates a new ValidationMessage instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.ValidationMessage + * @static + * @param {google.cloud.datastream.v1.IValidationMessage=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage instance + */ + ValidationMessage.create = function create(properties) { + return new ValidationMessage(properties); + }; - /** - * Encodes the specified MysqlObjectIdentifier message. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier} message MysqlObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlObjectIdentifier.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); - return writer; - }; + /** + * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.ValidationMessage + * @static + * @param {google.cloud.datastream.v1.IValidationMessage} message ValidationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidationMessage.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.level != null && Object.hasOwnProperty.call(message, "level")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.level); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); + return writer; + }; - /** - * Encodes the specified MysqlObjectIdentifier message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.IMysqlObjectIdentifier} message MysqlObjectIdentifier message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MysqlObjectIdentifier.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.ValidationMessage + * @static + * @param {google.cloud.datastream.v1.IValidationMessage} message ValidationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidationMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a MysqlObjectIdentifier message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlObjectIdentifier.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.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.database = reader.string(); - break; - } - case 2: { - message.table = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ValidationMessage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.ValidationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidationMessage.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.datastream.v1.ValidationMessage(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.message = reader.string(); break; } - } - return message; - }; - - /** - * Decodes a MysqlObjectIdentifier message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MysqlObjectIdentifier.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MysqlObjectIdentifier message. - * @function verify - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MysqlObjectIdentifier.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - return null; - }; + case 2: { + message.level = reader.int32(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + } + case 4: { + message.code = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a MysqlObjectIdentifier message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} MysqlObjectIdentifier - */ - MysqlObjectIdentifier.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier) - return object; - var message = new $root.google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier(); - if (object.database != null) - message.database = String(object.database); - if (object.table != null) - message.table = String(object.table); - return message; - }; + /** + * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.ValidationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidationMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a MysqlObjectIdentifier message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier} message MysqlObjectIdentifier - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MysqlObjectIdentifier.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.database = ""; - object.table = ""; + /** + * Verifies a ValidationMessage message. + * @function verify + * @memberof google.cloud.datastream.v1.ValidationMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidationMessage.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.level != null && message.hasOwnProperty("level")) + switch (message.level) { + default: + return "level: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isString(message.code)) + return "code: string expected"; + return null; + }; + + /** + * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.ValidationMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage + */ + ValidationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.ValidationMessage) return object; - }; + var message = new $root.google.cloud.datastream.v1.ValidationMessage(); + if (object.message != null) + message.message = String(object.message); + switch (object.level) { + default: + if (typeof object.level === "number") { + message.level = object.level; + break; + } + break; + case "LEVEL_UNSPECIFIED": + case 0: + message.level = 0; + break; + case "WARNING": + case 1: + message.level = 1; + break; + case "ERROR": + case 2: + message.level = 2; + break; + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.datastream.v1.ValidationMessage.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.code != null) + message.code = String(object.code); + return message; + }; - /** - * Converts this MysqlObjectIdentifier to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @instance - * @returns {Object.} JSON object - */ - MysqlObjectIdentifier.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.ValidationMessage + * @static + * @param {google.cloud.datastream.v1.ValidationMessage} message ValidationMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidationMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.message = ""; + object.level = options.enums === String ? "LEVEL_UNSPECIFIED" : 0; + object.code = ""; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.level != null && message.hasOwnProperty("level")) + object.level = options.enums === String ? $root.google.cloud.datastream.v1.ValidationMessage.Level[message.level] === undefined ? message.level : $root.google.cloud.datastream.v1.ValidationMessage.Level[message.level] : message.level; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + return object; + }; - /** - * Gets the default type url for MysqlObjectIdentifier - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MysqlObjectIdentifier.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier"; - }; + /** + * Converts this ValidationMessage to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.ValidationMessage + * @instance + * @returns {Object.} JSON object + */ + ValidationMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MysqlObjectIdentifier; + /** + * Gets the default type url for ValidationMessage + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.ValidationMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValidationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.ValidationMessage"; + }; + + /** + * Level enum. + * @name google.cloud.datastream.v1.ValidationMessage.Level + * @enum {number} + * @property {number} LEVEL_UNSPECIFIED=0 LEVEL_UNSPECIFIED value + * @property {number} WARNING=1 WARNING value + * @property {number} ERROR=2 ERROR value + */ + ValidationMessage.Level = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "WARNING"] = 1; + values[valuesById[2] = "ERROR"] = 2; + return values; })(); - return SourceObjectIdentifier; + return ValidationMessage; })(); - v1.BackfillJob = (function() { + v1.CdcStrategy = (function() { /** - * Properties of a BackfillJob. + * Properties of a CdcStrategy. * @memberof google.cloud.datastream.v1 - * @interface IBackfillJob - * @property {google.cloud.datastream.v1.BackfillJob.State|null} [state] BackfillJob state - * @property {google.cloud.datastream.v1.BackfillJob.Trigger|null} [trigger] BackfillJob trigger - * @property {google.protobuf.ITimestamp|null} [lastStartTime] BackfillJob lastStartTime - * @property {google.protobuf.ITimestamp|null} [lastEndTime] BackfillJob lastEndTime - * @property {Array.|null} [errors] BackfillJob errors + * @interface ICdcStrategy + * @property {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition|null} [mostRecentStartPosition] CdcStrategy mostRecentStartPosition + * @property {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition|null} [nextAvailableStartPosition] CdcStrategy nextAvailableStartPosition + * @property {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition|null} [specificStartPosition] CdcStrategy specificStartPosition */ /** - * Constructs a new BackfillJob. + * Constructs a new CdcStrategy. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a BackfillJob. - * @implements IBackfillJob + * @classdesc Represents a CdcStrategy. + * @implements ICdcStrategy * @constructor - * @param {google.cloud.datastream.v1.IBackfillJob=} [properties] Properties to set + * @param {google.cloud.datastream.v1.ICdcStrategy=} [properties] Properties to set */ - function BackfillJob(properties) { - this.errors = []; + function CdcStrategy(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23861,134 +30879,117 @@ } /** - * BackfillJob state. - * @member {google.cloud.datastream.v1.BackfillJob.State} state - * @memberof google.cloud.datastream.v1.BackfillJob + * CdcStrategy mostRecentStartPosition. + * @member {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition|null|undefined} mostRecentStartPosition + * @memberof google.cloud.datastream.v1.CdcStrategy * @instance */ - BackfillJob.prototype.state = 0; + CdcStrategy.prototype.mostRecentStartPosition = null; /** - * BackfillJob trigger. - * @member {google.cloud.datastream.v1.BackfillJob.Trigger} trigger - * @memberof google.cloud.datastream.v1.BackfillJob + * CdcStrategy nextAvailableStartPosition. + * @member {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition|null|undefined} nextAvailableStartPosition + * @memberof google.cloud.datastream.v1.CdcStrategy * @instance */ - BackfillJob.prototype.trigger = 0; + CdcStrategy.prototype.nextAvailableStartPosition = null; /** - * BackfillJob lastStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastStartTime - * @memberof google.cloud.datastream.v1.BackfillJob + * CdcStrategy specificStartPosition. + * @member {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition|null|undefined} specificStartPosition + * @memberof google.cloud.datastream.v1.CdcStrategy * @instance */ - BackfillJob.prototype.lastStartTime = null; + CdcStrategy.prototype.specificStartPosition = null; - /** - * BackfillJob lastEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastEndTime - * @memberof google.cloud.datastream.v1.BackfillJob - * @instance - */ - BackfillJob.prototype.lastEndTime = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * BackfillJob errors. - * @member {Array.} errors - * @memberof google.cloud.datastream.v1.BackfillJob + * CdcStrategy startPosition. + * @member {"mostRecentStartPosition"|"nextAvailableStartPosition"|"specificStartPosition"|undefined} startPosition + * @memberof google.cloud.datastream.v1.CdcStrategy * @instance */ - BackfillJob.prototype.errors = $util.emptyArray; + Object.defineProperty(CdcStrategy.prototype, "startPosition", { + get: $util.oneOfGetter($oneOfFields = ["mostRecentStartPosition", "nextAvailableStartPosition", "specificStartPosition"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new BackfillJob instance using the specified properties. + * Creates a new CdcStrategy instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.BackfillJob + * @memberof google.cloud.datastream.v1.CdcStrategy * @static - * @param {google.cloud.datastream.v1.IBackfillJob=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob instance + * @param {google.cloud.datastream.v1.ICdcStrategy=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.CdcStrategy} CdcStrategy instance */ - BackfillJob.create = function create(properties) { - return new BackfillJob(properties); + CdcStrategy.create = function create(properties) { + return new CdcStrategy(properties); }; /** - * Encodes the specified BackfillJob message. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. + * Encodes the specified CdcStrategy message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.BackfillJob + * @memberof google.cloud.datastream.v1.CdcStrategy * @static - * @param {google.cloud.datastream.v1.IBackfillJob} message BackfillJob message or plain object to encode + * @param {google.cloud.datastream.v1.ICdcStrategy} message CdcStrategy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackfillJob.encode = function encode(message, writer) { + CdcStrategy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trigger); - if (message.lastStartTime != null && Object.hasOwnProperty.call(message, "lastStartTime")) - $root.google.protobuf.Timestamp.encode(message.lastStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.lastEndTime != null && Object.hasOwnProperty.call(message, "lastEndTime")) - $root.google.protobuf.Timestamp.encode(message.lastEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.datastream.v1.Error.encode(message.errors[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.mostRecentStartPosition != null && Object.hasOwnProperty.call(message, "mostRecentStartPosition")) + $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.encode(message.mostRecentStartPosition, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.nextAvailableStartPosition != null && Object.hasOwnProperty.call(message, "nextAvailableStartPosition")) + $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.encode(message.nextAvailableStartPosition, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.specificStartPosition != null && Object.hasOwnProperty.call(message, "specificStartPosition")) + $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.encode(message.specificStartPosition, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); return writer; }; /** - * Encodes the specified BackfillJob message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.BackfillJob.verify|verify} messages. + * Encodes the specified CdcStrategy message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.BackfillJob + * @memberof google.cloud.datastream.v1.CdcStrategy * @static - * @param {google.cloud.datastream.v1.IBackfillJob} message BackfillJob message or plain object to encode + * @param {google.cloud.datastream.v1.ICdcStrategy} message CdcStrategy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackfillJob.encodeDelimited = function encodeDelimited(message, writer) { + CdcStrategy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackfillJob message from the specified reader or buffer. + * Decodes a CdcStrategy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.BackfillJob + * @memberof google.cloud.datastream.v1.CdcStrategy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob + * @returns {google.cloud.datastream.v1.CdcStrategy} CdcStrategy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackfillJob.decode = function decode(reader, length) { + CdcStrategy.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.datastream.v1.BackfillJob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.CdcStrategy(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.trigger = reader.int32(); - break; - } - case 3: { - message.lastStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 101: { + message.mostRecentStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.decode(reader, reader.uint32()); break; } - case 4: { - message.lastEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 102: { + message.nextAvailableStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.decode(reader, reader.uint32()); break; } - case 5: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.datastream.v1.Error.decode(reader, reader.uint32())); + case 103: { + message.specificStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.decode(reader, reader.uint32()); break; } default: @@ -24000,636 +31001,819 @@ }; /** - * Decodes a BackfillJob message from the specified reader or buffer, length delimited. + * Decodes a CdcStrategy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.BackfillJob + * @memberof google.cloud.datastream.v1.CdcStrategy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob + * @returns {google.cloud.datastream.v1.CdcStrategy} CdcStrategy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackfillJob.decodeDelimited = function decodeDelimited(reader) { + CdcStrategy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackfillJob message. + * Verifies a CdcStrategy message. * @function verify - * @memberof google.cloud.datastream.v1.BackfillJob + * @memberof google.cloud.datastream.v1.CdcStrategy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackfillJob.verify = function verify(message) { + CdcStrategy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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: - case 5: - case 6: - case 7: - break; - } - if (message.trigger != null && message.hasOwnProperty("trigger")) - switch (message.trigger) { - default: - return "trigger: enum value expected"; - case 0: - case 1: - case 2: - break; + var properties = {}; + if (message.mostRecentStartPosition != null && message.hasOwnProperty("mostRecentStartPosition")) { + properties.startPosition = 1; + { + var error = $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.verify(message.mostRecentStartPosition); + if (error) + return "mostRecentStartPosition." + error; } - if (message.lastStartTime != null && message.hasOwnProperty("lastStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastStartTime); - if (error) - return "lastStartTime." + error; } - if (message.lastEndTime != null && message.hasOwnProperty("lastEndTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastEndTime); - if (error) - return "lastEndTime." + error; + if (message.nextAvailableStartPosition != null && message.hasOwnProperty("nextAvailableStartPosition")) { + if (properties.startPosition === 1) + return "startPosition: multiple values"; + properties.startPosition = 1; + { + var error = $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.verify(message.nextAvailableStartPosition); + if (error) + return "nextAvailableStartPosition." + error; + } } - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.cloud.datastream.v1.Error.verify(message.errors[i]); + if (message.specificStartPosition != null && message.hasOwnProperty("specificStartPosition")) { + if (properties.startPosition === 1) + return "startPosition: multiple values"; + properties.startPosition = 1; + { + var error = $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.verify(message.specificStartPosition); if (error) - return "errors." + error; + return "specificStartPosition." + error; } } return null; }; /** - * Creates a BackfillJob message from a plain object. Also converts values to their respective internal types. + * Creates a CdcStrategy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.BackfillJob + * @memberof google.cloud.datastream.v1.CdcStrategy * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.BackfillJob} BackfillJob + * @returns {google.cloud.datastream.v1.CdcStrategy} CdcStrategy */ - BackfillJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.BackfillJob) + CdcStrategy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.CdcStrategy) return object; - var message = new $root.google.cloud.datastream.v1.BackfillJob(); - 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 "NOT_STARTED": - case 1: - message.state = 1; - break; - case "PENDING": - case 2: - message.state = 2; - break; - case "ACTIVE": - case 3: - message.state = 3; - break; - case "STOPPED": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "COMPLETED": - case 6: - message.state = 6; - break; - case "UNSUPPORTED": - case 7: - message.state = 7; - break; - } - 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 "AUTOMATIC": - case 1: - message.trigger = 1; - break; - case "MANUAL": - case 2: - message.trigger = 2; - break; - } - if (object.lastStartTime != null) { - if (typeof object.lastStartTime !== "object") - throw TypeError(".google.cloud.datastream.v1.BackfillJob.lastStartTime: object expected"); - message.lastStartTime = $root.google.protobuf.Timestamp.fromObject(object.lastStartTime); - } - if (object.lastEndTime != null) { - if (typeof object.lastEndTime !== "object") - throw TypeError(".google.cloud.datastream.v1.BackfillJob.lastEndTime: object expected"); - message.lastEndTime = $root.google.protobuf.Timestamp.fromObject(object.lastEndTime); - } - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.datastream.v1.BackfillJob.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.BackfillJob.errors: object expected"); - message.errors[i] = $root.google.cloud.datastream.v1.Error.fromObject(object.errors[i]); - } + var message = new $root.google.cloud.datastream.v1.CdcStrategy(); + if (object.mostRecentStartPosition != null) { + if (typeof object.mostRecentStartPosition !== "object") + throw TypeError(".google.cloud.datastream.v1.CdcStrategy.mostRecentStartPosition: object expected"); + message.mostRecentStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.fromObject(object.mostRecentStartPosition); + } + if (object.nextAvailableStartPosition != null) { + if (typeof object.nextAvailableStartPosition !== "object") + throw TypeError(".google.cloud.datastream.v1.CdcStrategy.nextAvailableStartPosition: object expected"); + message.nextAvailableStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.fromObject(object.nextAvailableStartPosition); + } + if (object.specificStartPosition != null) { + if (typeof object.specificStartPosition !== "object") + throw TypeError(".google.cloud.datastream.v1.CdcStrategy.specificStartPosition: object expected"); + message.specificStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.fromObject(object.specificStartPosition); } return message; }; /** - * Creates a plain object from a BackfillJob message. Also converts values to other types if specified. + * Creates a plain object from a CdcStrategy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.BackfillJob + * @memberof google.cloud.datastream.v1.CdcStrategy * @static - * @param {google.cloud.datastream.v1.BackfillJob} message BackfillJob + * @param {google.cloud.datastream.v1.CdcStrategy} message CdcStrategy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object - */ - BackfillJob.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; - object.lastStartTime = null; - object.lastEndTime = null; + */ + CdcStrategy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.mostRecentStartPosition != null && message.hasOwnProperty("mostRecentStartPosition")) { + object.mostRecentStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.toObject(message.mostRecentStartPosition, options); + if (options.oneofs) + object.startPosition = "mostRecentStartPosition"; } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datastream.v1.BackfillJob.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.BackfillJob.State[message.state] : message.state; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = options.enums === String ? $root.google.cloud.datastream.v1.BackfillJob.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.datastream.v1.BackfillJob.Trigger[message.trigger] : message.trigger; - if (message.lastStartTime != null && message.hasOwnProperty("lastStartTime")) - object.lastStartTime = $root.google.protobuf.Timestamp.toObject(message.lastStartTime, options); - if (message.lastEndTime != null && message.hasOwnProperty("lastEndTime")) - object.lastEndTime = $root.google.protobuf.Timestamp.toObject(message.lastEndTime, options); - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.datastream.v1.Error.toObject(message.errors[j], options); + if (message.nextAvailableStartPosition != null && message.hasOwnProperty("nextAvailableStartPosition")) { + object.nextAvailableStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.toObject(message.nextAvailableStartPosition, options); + if (options.oneofs) + object.startPosition = "nextAvailableStartPosition"; + } + if (message.specificStartPosition != null && message.hasOwnProperty("specificStartPosition")) { + object.specificStartPosition = $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.toObject(message.specificStartPosition, options); + if (options.oneofs) + object.startPosition = "specificStartPosition"; } return object; }; /** - * Converts this BackfillJob to JSON. + * Converts this CdcStrategy to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.BackfillJob + * @memberof google.cloud.datastream.v1.CdcStrategy * @instance * @returns {Object.} JSON object */ - BackfillJob.prototype.toJSON = function toJSON() { + CdcStrategy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BackfillJob + * Gets the default type url for CdcStrategy * @function getTypeUrl - * @memberof google.cloud.datastream.v1.BackfillJob + * @memberof google.cloud.datastream.v1.CdcStrategy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BackfillJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CdcStrategy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.BackfillJob"; + return typeUrlPrefix + "/google.cloud.datastream.v1.CdcStrategy"; }; - /** - * State enum. - * @name google.cloud.datastream.v1.BackfillJob.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} NOT_STARTED=1 NOT_STARTED value - * @property {number} PENDING=2 PENDING value - * @property {number} ACTIVE=3 ACTIVE value - * @property {number} STOPPED=4 STOPPED value - * @property {number} FAILED=5 FAILED value - * @property {number} COMPLETED=6 COMPLETED value - * @property {number} UNSUPPORTED=7 UNSUPPORTED value - */ - BackfillJob.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NOT_STARTED"] = 1; - values[valuesById[2] = "PENDING"] = 2; - values[valuesById[3] = "ACTIVE"] = 3; - values[valuesById[4] = "STOPPED"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "COMPLETED"] = 6; - values[valuesById[7] = "UNSUPPORTED"] = 7; - return values; + CdcStrategy.MostRecentStartPosition = (function() { + + /** + * Properties of a MostRecentStartPosition. + * @memberof google.cloud.datastream.v1.CdcStrategy + * @interface IMostRecentStartPosition + */ + + /** + * Constructs a new MostRecentStartPosition. + * @memberof google.cloud.datastream.v1.CdcStrategy + * @classdesc Represents a MostRecentStartPosition. + * @implements IMostRecentStartPosition + * @constructor + * @param {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition=} [properties] Properties to set + */ + function MostRecentStartPosition(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 MostRecentStartPosition instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition} MostRecentStartPosition instance + */ + MostRecentStartPosition.create = function create(properties) { + return new MostRecentStartPosition(properties); + }; + + /** + * Encodes the specified MostRecentStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition} message MostRecentStartPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MostRecentStartPosition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MostRecentStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.IMostRecentStartPosition} message MostRecentStartPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MostRecentStartPosition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MostRecentStartPosition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition} MostRecentStartPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MostRecentStartPosition.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.datastream.v1.CdcStrategy.MostRecentStartPosition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MostRecentStartPosition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition} MostRecentStartPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MostRecentStartPosition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MostRecentStartPosition message. + * @function verify + * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MostRecentStartPosition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MostRecentStartPosition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition} MostRecentStartPosition + */ + MostRecentStartPosition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition) + return object; + return new $root.google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition(); + }; + + /** + * Creates a plain object from a MostRecentStartPosition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition} message MostRecentStartPosition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MostRecentStartPosition.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MostRecentStartPosition to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + * @instance + * @returns {Object.} JSON object + */ + MostRecentStartPosition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MostRecentStartPosition + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MostRecentStartPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition"; + }; + + return MostRecentStartPosition; })(); - /** - * Trigger enum. - * @name google.cloud.datastream.v1.BackfillJob.Trigger - * @enum {number} - * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value - * @property {number} AUTOMATIC=1 AUTOMATIC value - * @property {number} MANUAL=2 MANUAL value - */ - BackfillJob.Trigger = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUTOMATIC"] = 1; - values[valuesById[2] = "MANUAL"] = 2; - return values; - })(); + CdcStrategy.NextAvailableStartPosition = (function() { + + /** + * Properties of a NextAvailableStartPosition. + * @memberof google.cloud.datastream.v1.CdcStrategy + * @interface INextAvailableStartPosition + */ + + /** + * Constructs a new NextAvailableStartPosition. + * @memberof google.cloud.datastream.v1.CdcStrategy + * @classdesc Represents a NextAvailableStartPosition. + * @implements INextAvailableStartPosition + * @constructor + * @param {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition=} [properties] Properties to set + */ + function NextAvailableStartPosition(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 NextAvailableStartPosition instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition} NextAvailableStartPosition instance + */ + NextAvailableStartPosition.create = function create(properties) { + return new NextAvailableStartPosition(properties); + }; + + /** + * Encodes the specified NextAvailableStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition} message NextAvailableStartPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NextAvailableStartPosition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified NextAvailableStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.INextAvailableStartPosition} message NextAvailableStartPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NextAvailableStartPosition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NextAvailableStartPosition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition} NextAvailableStartPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NextAvailableStartPosition.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.datastream.v1.CdcStrategy.NextAvailableStartPosition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NextAvailableStartPosition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition} NextAvailableStartPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NextAvailableStartPosition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NextAvailableStartPosition message. + * @function verify + * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NextAvailableStartPosition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a NextAvailableStartPosition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition} NextAvailableStartPosition + */ + NextAvailableStartPosition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition) + return object; + return new $root.google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition(); + }; + + /** + * Creates a plain object from a NextAvailableStartPosition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition} message NextAvailableStartPosition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NextAvailableStartPosition.toObject = function toObject() { + return {}; + }; - return BackfillJob; - })(); + /** + * Converts this NextAvailableStartPosition to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + * @instance + * @returns {Object.} JSON object + */ + NextAvailableStartPosition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.Error = (function() { + /** + * Gets the default type url for NextAvailableStartPosition + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NextAvailableStartPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition"; + }; - /** - * Properties of an Error. - * @memberof google.cloud.datastream.v1 - * @interface IError - * @property {string|null} [reason] Error reason - * @property {string|null} [errorUuid] Error errorUuid - * @property {string|null} [message] Error message - * @property {google.protobuf.ITimestamp|null} [errorTime] Error errorTime - * @property {Object.|null} [details] Error details - */ + return NextAvailableStartPosition; + })(); - /** - * Constructs a new Error. - * @memberof google.cloud.datastream.v1 - * @classdesc Represents an Error. - * @implements IError - * @constructor - * @param {google.cloud.datastream.v1.IError=} [properties] Properties to set - */ - function Error(properties) { - this.details = {}; - 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]]; - } + CdcStrategy.SpecificStartPosition = (function() { - /** - * Error reason. - * @member {string} reason - * @memberof google.cloud.datastream.v1.Error - * @instance - */ - Error.prototype.reason = ""; + /** + * Properties of a SpecificStartPosition. + * @memberof google.cloud.datastream.v1.CdcStrategy + * @interface ISpecificStartPosition + * @property {google.cloud.datastream.v1.IMysqlLogPosition|null} [mysqlLogPosition] SpecificStartPosition mysqlLogPosition + * @property {google.cloud.datastream.v1.IOracleScnPosition|null} [oracleScnPosition] SpecificStartPosition oracleScnPosition + * @property {google.cloud.datastream.v1.ISqlServerLsnPosition|null} [sqlServerLsnPosition] SpecificStartPosition sqlServerLsnPosition + */ - /** - * Error errorUuid. - * @member {string} errorUuid - * @memberof google.cloud.datastream.v1.Error - * @instance - */ - Error.prototype.errorUuid = ""; + /** + * Constructs a new SpecificStartPosition. + * @memberof google.cloud.datastream.v1.CdcStrategy + * @classdesc Represents a SpecificStartPosition. + * @implements ISpecificStartPosition + * @constructor + * @param {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition=} [properties] Properties to set + */ + function SpecificStartPosition(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]]; + } - /** - * Error message. - * @member {string} message - * @memberof google.cloud.datastream.v1.Error - * @instance - */ - Error.prototype.message = ""; + /** + * SpecificStartPosition mysqlLogPosition. + * @member {google.cloud.datastream.v1.IMysqlLogPosition|null|undefined} mysqlLogPosition + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @instance + */ + SpecificStartPosition.prototype.mysqlLogPosition = null; - /** - * Error errorTime. - * @member {google.protobuf.ITimestamp|null|undefined} errorTime - * @memberof google.cloud.datastream.v1.Error - * @instance - */ - Error.prototype.errorTime = null; + /** + * SpecificStartPosition oracleScnPosition. + * @member {google.cloud.datastream.v1.IOracleScnPosition|null|undefined} oracleScnPosition + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @instance + */ + SpecificStartPosition.prototype.oracleScnPosition = null; - /** - * Error details. - * @member {Object.} details - * @memberof google.cloud.datastream.v1.Error - * @instance - */ - Error.prototype.details = $util.emptyObject; + /** + * SpecificStartPosition sqlServerLsnPosition. + * @member {google.cloud.datastream.v1.ISqlServerLsnPosition|null|undefined} sqlServerLsnPosition + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @instance + */ + SpecificStartPosition.prototype.sqlServerLsnPosition = null; - /** - * Creates a new Error instance using the specified properties. - * @function create - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {google.cloud.datastream.v1.IError=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Error} Error instance - */ - Error.create = function create(properties) { - return new Error(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified Error message. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. - * @function encode - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {google.cloud.datastream.v1.IError} message Error message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Error.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.reason); - if (message.errorUuid != null && Object.hasOwnProperty.call(message, "errorUuid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorUuid); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.message); - if (message.errorTime != null && Object.hasOwnProperty.call(message, "errorTime")) - $root.google.protobuf.Timestamp.encode(message.errorTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - for (var keys = Object.keys(message.details), 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.details[keys[i]]).ldelim(); - return writer; - }; + /** + * SpecificStartPosition position. + * @member {"mysqlLogPosition"|"oracleScnPosition"|"sqlServerLsnPosition"|undefined} position + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @instance + */ + Object.defineProperty(SpecificStartPosition.prototype, "position", { + get: $util.oneOfGetter($oneOfFields = ["mysqlLogPosition", "oracleScnPosition", "sqlServerLsnPosition"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified Error message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Error.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {google.cloud.datastream.v1.IError} message Error message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Error.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new SpecificStartPosition instance using the specified properties. + * @function create + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition} SpecificStartPosition instance + */ + SpecificStartPosition.create = function create(properties) { + return new SpecificStartPosition(properties); + }; - /** - * Decodes an Error message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Error} Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Error.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.datastream.v1.Error(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.reason = reader.string(); - break; - } - case 2: { - message.errorUuid = reader.string(); - break; - } - case 3: { - message.message = reader.string(); - break; - } - case 4: { - message.errorTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - if (message.details === $util.emptyObject) - message.details = {}; - 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; - } + /** + * Encodes the specified SpecificStartPosition message. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.verify|verify} messages. + * @function encode + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition} message SpecificStartPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpecificStartPosition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mysqlLogPosition != null && Object.hasOwnProperty.call(message, "mysqlLogPosition")) + $root.google.cloud.datastream.v1.MysqlLogPosition.encode(message.mysqlLogPosition, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.oracleScnPosition != null && Object.hasOwnProperty.call(message, "oracleScnPosition")) + $root.google.cloud.datastream.v1.OracleScnPosition.encode(message.oracleScnPosition, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.sqlServerLsnPosition != null && Object.hasOwnProperty.call(message, "sqlServerLsnPosition")) + $root.google.cloud.datastream.v1.SqlServerLsnPosition.encode(message.sqlServerLsnPosition, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SpecificStartPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.ISpecificStartPosition} message SpecificStartPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpecificStartPosition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SpecificStartPosition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition} SpecificStartPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpecificStartPosition.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.datastream.v1.CdcStrategy.SpecificStartPosition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 101: { + message.mysqlLogPosition = $root.google.cloud.datastream.v1.MysqlLogPosition.decode(reader, reader.uint32()); + break; } - message.details[key] = value; + case 102: { + message.oracleScnPosition = $root.google.cloud.datastream.v1.OracleScnPosition.decode(reader, reader.uint32()); + break; + } + case 103: { + message.sqlServerLsnPosition = $root.google.cloud.datastream.v1.SqlServerLsnPosition.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an Error message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Error} Error - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Error.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a SpecificStartPosition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition} SpecificStartPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpecificStartPosition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an Error message. - * @function verify - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Error.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reason != null && message.hasOwnProperty("reason")) - if (!$util.isString(message.reason)) - return "reason: string expected"; - if (message.errorUuid != null && message.hasOwnProperty("errorUuid")) - if (!$util.isString(message.errorUuid)) - return "errorUuid: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.errorTime != null && message.hasOwnProperty("errorTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.errorTime); - if (error) - return "errorTime." + error; - } - if (message.details != null && message.hasOwnProperty("details")) { - if (!$util.isObject(message.details)) - return "details: object expected"; - var key = Object.keys(message.details); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.details[key[i]])) - return "details: string{k:string} expected"; - } - return null; - }; + /** + * Verifies a SpecificStartPosition message. + * @function verify + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpecificStartPosition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mysqlLogPosition != null && message.hasOwnProperty("mysqlLogPosition")) { + properties.position = 1; + { + var error = $root.google.cloud.datastream.v1.MysqlLogPosition.verify(message.mysqlLogPosition); + if (error) + return "mysqlLogPosition." + error; + } + } + if (message.oracleScnPosition != null && message.hasOwnProperty("oracleScnPosition")) { + if (properties.position === 1) + return "position: multiple values"; + properties.position = 1; + { + var error = $root.google.cloud.datastream.v1.OracleScnPosition.verify(message.oracleScnPosition); + if (error) + return "oracleScnPosition." + error; + } + } + if (message.sqlServerLsnPosition != null && message.hasOwnProperty("sqlServerLsnPosition")) { + if (properties.position === 1) + return "position: multiple values"; + properties.position = 1; + { + var error = $root.google.cloud.datastream.v1.SqlServerLsnPosition.verify(message.sqlServerLsnPosition); + if (error) + return "sqlServerLsnPosition." + error; + } + } + return null; + }; - /** - * Creates an Error message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Error} Error - */ - Error.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Error) - return object; - var message = new $root.google.cloud.datastream.v1.Error(); - if (object.reason != null) - message.reason = String(object.reason); - if (object.errorUuid != null) - message.errorUuid = String(object.errorUuid); - if (object.message != null) - message.message = String(object.message); - if (object.errorTime != null) { - if (typeof object.errorTime !== "object") - throw TypeError(".google.cloud.datastream.v1.Error.errorTime: object expected"); - message.errorTime = $root.google.protobuf.Timestamp.fromObject(object.errorTime); - } - if (object.details) { - if (typeof object.details !== "object") - throw TypeError(".google.cloud.datastream.v1.Error.details: object expected"); - message.details = {}; - for (var keys = Object.keys(object.details), i = 0; i < keys.length; ++i) - message.details[keys[i]] = String(object.details[keys[i]]); - } - return message; - }; + /** + * Creates a SpecificStartPosition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition} SpecificStartPosition + */ + SpecificStartPosition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition) + return object; + var message = new $root.google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition(); + if (object.mysqlLogPosition != null) { + if (typeof object.mysqlLogPosition !== "object") + throw TypeError(".google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.mysqlLogPosition: object expected"); + message.mysqlLogPosition = $root.google.cloud.datastream.v1.MysqlLogPosition.fromObject(object.mysqlLogPosition); + } + if (object.oracleScnPosition != null) { + if (typeof object.oracleScnPosition !== "object") + throw TypeError(".google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.oracleScnPosition: object expected"); + message.oracleScnPosition = $root.google.cloud.datastream.v1.OracleScnPosition.fromObject(object.oracleScnPosition); + } + if (object.sqlServerLsnPosition != null) { + if (typeof object.sqlServerLsnPosition !== "object") + throw TypeError(".google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition.sqlServerLsnPosition: object expected"); + message.sqlServerLsnPosition = $root.google.cloud.datastream.v1.SqlServerLsnPosition.fromObject(object.sqlServerLsnPosition); + } + return message; + }; - /** - * Creates a plain object from an Error message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {google.cloud.datastream.v1.Error} message Error - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Error.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.details = {}; - if (options.defaults) { - object.reason = ""; - object.errorUuid = ""; - object.message = ""; - object.errorTime = null; - } - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = message.reason; - if (message.errorUuid != null && message.hasOwnProperty("errorUuid")) - object.errorUuid = message.errorUuid; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.errorTime != null && message.hasOwnProperty("errorTime")) - object.errorTime = $root.google.protobuf.Timestamp.toObject(message.errorTime, options); - var keys2; - if (message.details && (keys2 = Object.keys(message.details)).length) { - object.details = {}; - for (var j = 0; j < keys2.length; ++j) - object.details[keys2[j]] = message.details[keys2[j]]; - } - return object; - }; + /** + * Creates a plain object from a SpecificStartPosition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @static + * @param {google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition} message SpecificStartPosition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpecificStartPosition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.mysqlLogPosition != null && message.hasOwnProperty("mysqlLogPosition")) { + object.mysqlLogPosition = $root.google.cloud.datastream.v1.MysqlLogPosition.toObject(message.mysqlLogPosition, options); + if (options.oneofs) + object.position = "mysqlLogPosition"; + } + if (message.oracleScnPosition != null && message.hasOwnProperty("oracleScnPosition")) { + object.oracleScnPosition = $root.google.cloud.datastream.v1.OracleScnPosition.toObject(message.oracleScnPosition, options); + if (options.oneofs) + object.position = "oracleScnPosition"; + } + if (message.sqlServerLsnPosition != null && message.hasOwnProperty("sqlServerLsnPosition")) { + object.sqlServerLsnPosition = $root.google.cloud.datastream.v1.SqlServerLsnPosition.toObject(message.sqlServerLsnPosition, options); + if (options.oneofs) + object.position = "sqlServerLsnPosition"; + } + return object; + }; - /** - * Converts this Error to JSON. - * @function toJSON - * @memberof google.cloud.datastream.v1.Error - * @instance - * @returns {Object.} JSON object - */ - Error.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this SpecificStartPosition to JSON. + * @function toJSON + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @instance + * @returns {Object.} JSON object + */ + SpecificStartPosition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Error - * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Error - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.datastream.v1.Error"; - }; + /** + * Gets the default type url for SpecificStartPosition + * @function getTypeUrl + * @memberof google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SpecificStartPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition"; + }; - return Error; + return SpecificStartPosition; + })(); + + return CdcStrategy; })(); - v1.ValidationResult = (function() { + v1.SqlServerLsnPosition = (function() { /** - * Properties of a ValidationResult. + * Properties of a SqlServerLsnPosition. * @memberof google.cloud.datastream.v1 - * @interface IValidationResult - * @property {Array.|null} [validations] ValidationResult validations + * @interface ISqlServerLsnPosition + * @property {string|null} [lsn] SqlServerLsnPosition lsn */ /** - * Constructs a new ValidationResult. + * Constructs a new SqlServerLsnPosition. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ValidationResult. - * @implements IValidationResult + * @classdesc Represents a SqlServerLsnPosition. + * @implements ISqlServerLsnPosition * @constructor - * @param {google.cloud.datastream.v1.IValidationResult=} [properties] Properties to set + * @param {google.cloud.datastream.v1.ISqlServerLsnPosition=} [properties] Properties to set */ - function ValidationResult(properties) { - this.validations = []; + function SqlServerLsnPosition(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24637,78 +31821,75 @@ } /** - * ValidationResult validations. - * @member {Array.} validations - * @memberof google.cloud.datastream.v1.ValidationResult + * SqlServerLsnPosition lsn. + * @member {string} lsn + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @instance */ - ValidationResult.prototype.validations = $util.emptyArray; + SqlServerLsnPosition.prototype.lsn = ""; /** - * Creates a new ValidationResult instance using the specified properties. + * Creates a new SqlServerLsnPosition instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.ValidationResult + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @static - * @param {google.cloud.datastream.v1.IValidationResult=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult instance + * @param {google.cloud.datastream.v1.ISqlServerLsnPosition=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.SqlServerLsnPosition} SqlServerLsnPosition instance */ - ValidationResult.create = function create(properties) { - return new ValidationResult(properties); + SqlServerLsnPosition.create = function create(properties) { + return new SqlServerLsnPosition(properties); }; /** - * Encodes the specified ValidationResult message. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. + * Encodes the specified SqlServerLsnPosition message. Does not implicitly {@link google.cloud.datastream.v1.SqlServerLsnPosition.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.ValidationResult + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @static - * @param {google.cloud.datastream.v1.IValidationResult} message ValidationResult message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerLsnPosition} message SqlServerLsnPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationResult.encode = function encode(message, writer) { + SqlServerLsnPosition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.validations != null && message.validations.length) - for (var i = 0; i < message.validations.length; ++i) - $root.google.cloud.datastream.v1.Validation.encode(message.validations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lsn != null && Object.hasOwnProperty.call(message, "lsn")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lsn); return writer; }; /** - * Encodes the specified ValidationResult message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationResult.verify|verify} messages. + * Encodes the specified SqlServerLsnPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.SqlServerLsnPosition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ValidationResult + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @static - * @param {google.cloud.datastream.v1.IValidationResult} message ValidationResult message or plain object to encode + * @param {google.cloud.datastream.v1.ISqlServerLsnPosition} message SqlServerLsnPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationResult.encodeDelimited = function encodeDelimited(message, writer) { + SqlServerLsnPosition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidationResult message from the specified reader or buffer. + * Decodes a SqlServerLsnPosition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.ValidationResult + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult + * @returns {google.cloud.datastream.v1.SqlServerLsnPosition} SqlServerLsnPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationResult.decode = function decode(reader, length) { + SqlServerLsnPosition.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.datastream.v1.ValidationResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.SqlServerLsnPosition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.validations && message.validations.length)) - message.validations = []; - message.validations.push($root.google.cloud.datastream.v1.Validation.decode(reader, reader.uint32())); + message.lsn = reader.string(); break; } default: @@ -24720,143 +31901,122 @@ }; /** - * Decodes a ValidationResult message from the specified reader or buffer, length delimited. + * Decodes a SqlServerLsnPosition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ValidationResult + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult + * @returns {google.cloud.datastream.v1.SqlServerLsnPosition} SqlServerLsnPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationResult.decodeDelimited = function decodeDelimited(reader) { + SqlServerLsnPosition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidationResult message. + * Verifies a SqlServerLsnPosition message. * @function verify - * @memberof google.cloud.datastream.v1.ValidationResult + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidationResult.verify = function verify(message) { + SqlServerLsnPosition.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.validations != null && message.hasOwnProperty("validations")) { - if (!Array.isArray(message.validations)) - return "validations: array expected"; - for (var i = 0; i < message.validations.length; ++i) { - var error = $root.google.cloud.datastream.v1.Validation.verify(message.validations[i]); - if (error) - return "validations." + error; - } - } + if (message.lsn != null && message.hasOwnProperty("lsn")) + if (!$util.isString(message.lsn)) + return "lsn: string expected"; return null; }; /** - * Creates a ValidationResult message from a plain object. Also converts values to their respective internal types. + * Creates a SqlServerLsnPosition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.ValidationResult + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ValidationResult} ValidationResult + * @returns {google.cloud.datastream.v1.SqlServerLsnPosition} SqlServerLsnPosition */ - ValidationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ValidationResult) + SqlServerLsnPosition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.SqlServerLsnPosition) return object; - var message = new $root.google.cloud.datastream.v1.ValidationResult(); - if (object.validations) { - if (!Array.isArray(object.validations)) - throw TypeError(".google.cloud.datastream.v1.ValidationResult.validations: array expected"); - message.validations = []; - for (var i = 0; i < object.validations.length; ++i) { - if (typeof object.validations[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.ValidationResult.validations: object expected"); - message.validations[i] = $root.google.cloud.datastream.v1.Validation.fromObject(object.validations[i]); - } - } + var message = new $root.google.cloud.datastream.v1.SqlServerLsnPosition(); + if (object.lsn != null) + message.lsn = String(object.lsn); return message; }; /** - * Creates a plain object from a ValidationResult message. Also converts values to other types if specified. + * Creates a plain object from a SqlServerLsnPosition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.ValidationResult + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @static - * @param {google.cloud.datastream.v1.ValidationResult} message ValidationResult + * @param {google.cloud.datastream.v1.SqlServerLsnPosition} message SqlServerLsnPosition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidationResult.toObject = function toObject(message, options) { + SqlServerLsnPosition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.validations = []; - if (message.validations && message.validations.length) { - object.validations = []; - for (var j = 0; j < message.validations.length; ++j) - object.validations[j] = $root.google.cloud.datastream.v1.Validation.toObject(message.validations[j], options); - } + if (options.defaults) + object.lsn = ""; + if (message.lsn != null && message.hasOwnProperty("lsn")) + object.lsn = message.lsn; return object; }; /** - * Converts this ValidationResult to JSON. + * Converts this SqlServerLsnPosition to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.ValidationResult + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @instance * @returns {Object.} JSON object */ - ValidationResult.prototype.toJSON = function toJSON() { + SqlServerLsnPosition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ValidationResult + * Gets the default type url for SqlServerLsnPosition * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ValidationResult + * @memberof google.cloud.datastream.v1.SqlServerLsnPosition * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SqlServerLsnPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.ValidationResult"; + return typeUrlPrefix + "/google.cloud.datastream.v1.SqlServerLsnPosition"; }; - return ValidationResult; + return SqlServerLsnPosition; })(); - v1.Validation = (function() { + v1.OracleScnPosition = (function() { /** - * Properties of a Validation. + * Properties of an OracleScnPosition. * @memberof google.cloud.datastream.v1 - * @interface IValidation - * @property {string|null} [description] Validation description - * @property {google.cloud.datastream.v1.Validation.State|null} [state] Validation state - * @property {Array.|null} [message] Validation message - * @property {string|null} [code] Validation code + * @interface IOracleScnPosition + * @property {number|Long|null} [scn] OracleScnPosition scn */ /** - * Constructs a new Validation. + * Constructs a new OracleScnPosition. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a Validation. - * @implements IValidation + * @classdesc Represents an OracleScnPosition. + * @implements IOracleScnPosition * @constructor - * @param {google.cloud.datastream.v1.IValidation=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IOracleScnPosition=} [properties] Properties to set */ - function Validation(properties) { - this.message = []; + function OracleScnPosition(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24864,120 +32024,75 @@ } /** - * Validation description. - * @member {string} description - * @memberof google.cloud.datastream.v1.Validation - * @instance - */ - Validation.prototype.description = ""; - - /** - * Validation state. - * @member {google.cloud.datastream.v1.Validation.State} state - * @memberof google.cloud.datastream.v1.Validation - * @instance - */ - Validation.prototype.state = 0; - - /** - * Validation message. - * @member {Array.} message - * @memberof google.cloud.datastream.v1.Validation - * @instance - */ - Validation.prototype.message = $util.emptyArray; - - /** - * Validation code. - * @member {string} code - * @memberof google.cloud.datastream.v1.Validation + * OracleScnPosition scn. + * @member {number|Long} scn + * @memberof google.cloud.datastream.v1.OracleScnPosition * @instance */ - Validation.prototype.code = ""; + OracleScnPosition.prototype.scn = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new Validation instance using the specified properties. + * Creates a new OracleScnPosition instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.Validation + * @memberof google.cloud.datastream.v1.OracleScnPosition * @static - * @param {google.cloud.datastream.v1.IValidation=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.Validation} Validation instance + * @param {google.cloud.datastream.v1.IOracleScnPosition=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.OracleScnPosition} OracleScnPosition instance */ - Validation.create = function create(properties) { - return new Validation(properties); + OracleScnPosition.create = function create(properties) { + return new OracleScnPosition(properties); }; /** - * Encodes the specified Validation message. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. + * Encodes the specified OracleScnPosition message. Does not implicitly {@link google.cloud.datastream.v1.OracleScnPosition.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.Validation + * @memberof google.cloud.datastream.v1.OracleScnPosition * @static - * @param {google.cloud.datastream.v1.IValidation} message Validation message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleScnPosition} message OracleScnPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Validation.encode = function encode(message, writer) { + OracleScnPosition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.message != null && message.message.length) - for (var i = 0; i < message.message.length; ++i) - $root.google.cloud.datastream.v1.ValidationMessage.encode(message.message[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); + if (message.scn != null && Object.hasOwnProperty.call(message, "scn")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.scn); return writer; }; /** - * Encodes the specified Validation message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.Validation.verify|verify} messages. + * Encodes the specified OracleScnPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.OracleScnPosition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.Validation + * @memberof google.cloud.datastream.v1.OracleScnPosition * @static - * @param {google.cloud.datastream.v1.IValidation} message Validation message or plain object to encode + * @param {google.cloud.datastream.v1.IOracleScnPosition} message OracleScnPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Validation.encodeDelimited = function encodeDelimited(message, writer) { + OracleScnPosition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Validation message from the specified reader or buffer. + * Decodes an OracleScnPosition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.Validation + * @memberof google.cloud.datastream.v1.OracleScnPosition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.Validation} Validation + * @returns {google.cloud.datastream.v1.OracleScnPosition} OracleScnPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Validation.decode = function decode(reader, length) { + OracleScnPosition.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.datastream.v1.Validation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.OracleScnPosition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - if (!(message.message && message.message.length)) - message.message = []; - message.message.push($root.google.cloud.datastream.v1.ValidationMessage.decode(reader, reader.uint32())); - break; - } - case 4: { - message.code = reader.string(); + message.scn = reader.int64(); break; } default: @@ -24989,216 +32104,137 @@ }; /** - * Decodes a Validation message from the specified reader or buffer, length delimited. + * Decodes an OracleScnPosition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.Validation + * @memberof google.cloud.datastream.v1.OracleScnPosition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.Validation} Validation + * @returns {google.cloud.datastream.v1.OracleScnPosition} OracleScnPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Validation.decodeDelimited = function decodeDelimited(reader) { + OracleScnPosition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Validation message. + * Verifies an OracleScnPosition message. * @function verify - * @memberof google.cloud.datastream.v1.Validation + * @memberof google.cloud.datastream.v1.OracleScnPosition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Validation.verify = function verify(message) { + OracleScnPosition.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.message != null && message.hasOwnProperty("message")) { - if (!Array.isArray(message.message)) - return "message: array expected"; - for (var i = 0; i < message.message.length; ++i) { - var error = $root.google.cloud.datastream.v1.ValidationMessage.verify(message.message[i]); - if (error) - return "message." + error; - } - } - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isString(message.code)) - return "code: string expected"; + if (message.scn != null && message.hasOwnProperty("scn")) + if (!$util.isInteger(message.scn) && !(message.scn && $util.isInteger(message.scn.low) && $util.isInteger(message.scn.high))) + return "scn: integer|Long expected"; return null; }; /** - * Creates a Validation message from a plain object. Also converts values to their respective internal types. + * Creates an OracleScnPosition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.Validation + * @memberof google.cloud.datastream.v1.OracleScnPosition * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.Validation} Validation + * @returns {google.cloud.datastream.v1.OracleScnPosition} OracleScnPosition */ - Validation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.Validation) + OracleScnPosition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.OracleScnPosition) return object; - var message = new $root.google.cloud.datastream.v1.Validation(); - if (object.description != null) - message.description = String(object.description); - 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 "NOT_EXECUTED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "PASSED": - case 3: - message.state = 3; - break; - } - if (object.message) { - if (!Array.isArray(object.message)) - throw TypeError(".google.cloud.datastream.v1.Validation.message: array expected"); - message.message = []; - for (var i = 0; i < object.message.length; ++i) { - if (typeof object.message[i] !== "object") - throw TypeError(".google.cloud.datastream.v1.Validation.message: object expected"); - message.message[i] = $root.google.cloud.datastream.v1.ValidationMessage.fromObject(object.message[i]); - } - } - if (object.code != null) - message.code = String(object.code); + var message = new $root.google.cloud.datastream.v1.OracleScnPosition(); + if (object.scn != null) + if ($util.Long) + (message.scn = $util.Long.fromValue(object.scn)).unsigned = false; + else if (typeof object.scn === "string") + message.scn = parseInt(object.scn, 10); + else if (typeof object.scn === "number") + message.scn = object.scn; + else if (typeof object.scn === "object") + message.scn = new $util.LongBits(object.scn.low >>> 0, object.scn.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a Validation message. Also converts values to other types if specified. + * Creates a plain object from an OracleScnPosition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.Validation + * @memberof google.cloud.datastream.v1.OracleScnPosition * @static - * @param {google.cloud.datastream.v1.Validation} message Validation + * @param {google.cloud.datastream.v1.OracleScnPosition} message OracleScnPosition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Validation.toObject = function toObject(message, options) { + OracleScnPosition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.message = []; - if (options.defaults) { - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.code = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.datastream.v1.Validation.State[message.state] === undefined ? message.state : $root.google.cloud.datastream.v1.Validation.State[message.state] : message.state; - if (message.message && message.message.length) { - object.message = []; - for (var j = 0; j < message.message.length; ++j) - object.message[j] = $root.google.cloud.datastream.v1.ValidationMessage.toObject(message.message[j], options); - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.scn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.scn = options.longs === String ? "0" : 0; + if (message.scn != null && message.hasOwnProperty("scn")) + if (typeof message.scn === "number") + object.scn = options.longs === String ? String(message.scn) : message.scn; + else + object.scn = options.longs === String ? $util.Long.prototype.toString.call(message.scn) : options.longs === Number ? new $util.LongBits(message.scn.low >>> 0, message.scn.high >>> 0).toNumber() : message.scn; return object; }; /** - * Converts this Validation to JSON. + * Converts this OracleScnPosition to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.Validation + * @memberof google.cloud.datastream.v1.OracleScnPosition * @instance * @returns {Object.} JSON object */ - Validation.prototype.toJSON = function toJSON() { + OracleScnPosition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Validation + * Gets the default type url for OracleScnPosition * @function getTypeUrl - * @memberof google.cloud.datastream.v1.Validation + * @memberof google.cloud.datastream.v1.OracleScnPosition * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Validation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OracleScnPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.Validation"; + return typeUrlPrefix + "/google.cloud.datastream.v1.OracleScnPosition"; }; - /** - * State enum. - * @name google.cloud.datastream.v1.Validation.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} NOT_EXECUTED=1 NOT_EXECUTED value - * @property {number} FAILED=2 FAILED value - * @property {number} PASSED=3 PASSED value - */ - Validation.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NOT_EXECUTED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "PASSED"] = 3; - return values; - })(); - - return Validation; + return OracleScnPosition; })(); - v1.ValidationMessage = (function() { + v1.MysqlLogPosition = (function() { /** - * Properties of a ValidationMessage. + * Properties of a MysqlLogPosition. * @memberof google.cloud.datastream.v1 - * @interface IValidationMessage - * @property {string|null} [message] ValidationMessage message - * @property {google.cloud.datastream.v1.ValidationMessage.Level|null} [level] ValidationMessage level - * @property {Object.|null} [metadata] ValidationMessage metadata - * @property {string|null} [code] ValidationMessage code + * @interface IMysqlLogPosition + * @property {string|null} [logFile] MysqlLogPosition logFile + * @property {number|null} [logPosition] MysqlLogPosition logPosition */ /** - * Constructs a new ValidationMessage. + * Constructs a new MysqlLogPosition. * @memberof google.cloud.datastream.v1 - * @classdesc Represents a ValidationMessage. - * @implements IValidationMessage + * @classdesc Represents a MysqlLogPosition. + * @implements IMysqlLogPosition * @constructor - * @param {google.cloud.datastream.v1.IValidationMessage=} [properties] Properties to set + * @param {google.cloud.datastream.v1.IMysqlLogPosition=} [properties] Properties to set */ - function ValidationMessage(properties) { - this.metadata = {}; + function MysqlLogPosition(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25206,137 +32242,103 @@ } /** - * ValidationMessage message. - * @member {string} message - * @memberof google.cloud.datastream.v1.ValidationMessage + * MysqlLogPosition logFile. + * @member {string} logFile + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @instance */ - ValidationMessage.prototype.message = ""; + MysqlLogPosition.prototype.logFile = ""; /** - * ValidationMessage level. - * @member {google.cloud.datastream.v1.ValidationMessage.Level} level - * @memberof google.cloud.datastream.v1.ValidationMessage + * MysqlLogPosition logPosition. + * @member {number|null|undefined} logPosition + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @instance */ - ValidationMessage.prototype.level = 0; + MysqlLogPosition.prototype.logPosition = null; - /** - * ValidationMessage metadata. - * @member {Object.} metadata - * @memberof google.cloud.datastream.v1.ValidationMessage - * @instance - */ - ValidationMessage.prototype.metadata = $util.emptyObject; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ValidationMessage code. - * @member {string} code - * @memberof google.cloud.datastream.v1.ValidationMessage + * MysqlLogPosition _logPosition. + * @member {"logPosition"|undefined} _logPosition + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @instance */ - ValidationMessage.prototype.code = ""; + Object.defineProperty(MysqlLogPosition.prototype, "_logPosition", { + get: $util.oneOfGetter($oneOfFields = ["logPosition"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ValidationMessage instance using the specified properties. + * Creates a new MysqlLogPosition instance using the specified properties. * @function create - * @memberof google.cloud.datastream.v1.ValidationMessage + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @static - * @param {google.cloud.datastream.v1.IValidationMessage=} [properties] Properties to set - * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage instance + * @param {google.cloud.datastream.v1.IMysqlLogPosition=} [properties] Properties to set + * @returns {google.cloud.datastream.v1.MysqlLogPosition} MysqlLogPosition instance */ - ValidationMessage.create = function create(properties) { - return new ValidationMessage(properties); + MysqlLogPosition.create = function create(properties) { + return new MysqlLogPosition(properties); }; /** - * Encodes the specified ValidationMessage message. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. + * Encodes the specified MysqlLogPosition message. Does not implicitly {@link google.cloud.datastream.v1.MysqlLogPosition.verify|verify} messages. * @function encode - * @memberof google.cloud.datastream.v1.ValidationMessage + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @static - * @param {google.cloud.datastream.v1.IValidationMessage} message ValidationMessage message or plain object to encode + * @param {google.cloud.datastream.v1.IMysqlLogPosition} message MysqlLogPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationMessage.encode = function encode(message, writer) { + MysqlLogPosition.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.level != null && Object.hasOwnProperty.call(message, "level")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.level); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); + if (message.logFile != null && Object.hasOwnProperty.call(message, "logFile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.logFile); + if (message.logPosition != null && Object.hasOwnProperty.call(message, "logPosition")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.logPosition); return writer; }; /** - * Encodes the specified ValidationMessage message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.ValidationMessage.verify|verify} messages. + * Encodes the specified MysqlLogPosition message, length delimited. Does not implicitly {@link google.cloud.datastream.v1.MysqlLogPosition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datastream.v1.ValidationMessage + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @static - * @param {google.cloud.datastream.v1.IValidationMessage} message ValidationMessage message or plain object to encode + * @param {google.cloud.datastream.v1.IMysqlLogPosition} message MysqlLogPosition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationMessage.encodeDelimited = function encodeDelimited(message, writer) { + MysqlLogPosition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidationMessage message from the specified reader or buffer. + * Decodes a MysqlLogPosition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datastream.v1.ValidationMessage + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage + * @returns {google.cloud.datastream.v1.MysqlLogPosition} MysqlLogPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationMessage.decode = function decode(reader, length) { + MysqlLogPosition.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.datastream.v1.ValidationMessage(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datastream.v1.MysqlLogPosition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.message = reader.string(); + message.logFile = reader.string(); break; } case 2: { - message.level = reader.int32(); - break; - } - case 3: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - 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.metadata[key] = value; - break; - } - case 4: { - message.code = reader.string(); + message.logPosition = reader.int32(); break; } default: @@ -25348,182 +32350,115 @@ }; /** - * Decodes a ValidationMessage message from the specified reader or buffer, length delimited. + * Decodes a MysqlLogPosition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datastream.v1.ValidationMessage + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage + * @returns {google.cloud.datastream.v1.MysqlLogPosition} MysqlLogPosition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationMessage.decodeDelimited = function decodeDelimited(reader) { + MysqlLogPosition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidationMessage message. + * Verifies a MysqlLogPosition message. * @function verify - * @memberof google.cloud.datastream.v1.ValidationMessage + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidationMessage.verify = function verify(message) { + MysqlLogPosition.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.level != null && message.hasOwnProperty("level")) - switch (message.level) { - default: - return "level: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; + var properties = {}; + if (message.logFile != null && message.hasOwnProperty("logFile")) + if (!$util.isString(message.logFile)) + return "logFile: string expected"; + if (message.logPosition != null && message.hasOwnProperty("logPosition")) { + properties._logPosition = 1; + if (!$util.isInteger(message.logPosition)) + return "logPosition: integer expected"; } - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isString(message.code)) - return "code: string expected"; return null; }; /** - * Creates a ValidationMessage message from a plain object. Also converts values to their respective internal types. + * Creates a MysqlLogPosition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datastream.v1.ValidationMessage + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @static * @param {Object.} object Plain object - * @returns {google.cloud.datastream.v1.ValidationMessage} ValidationMessage + * @returns {google.cloud.datastream.v1.MysqlLogPosition} MysqlLogPosition */ - ValidationMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datastream.v1.ValidationMessage) + MysqlLogPosition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datastream.v1.MysqlLogPosition) return object; - var message = new $root.google.cloud.datastream.v1.ValidationMessage(); - if (object.message != null) - message.message = String(object.message); - switch (object.level) { - default: - if (typeof object.level === "number") { - message.level = object.level; - break; - } - break; - case "LEVEL_UNSPECIFIED": - case 0: - message.level = 0; - break; - case "WARNING": - case 1: - message.level = 1; - break; - case "ERROR": - case 2: - message.level = 2; - break; - } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.datastream.v1.ValidationMessage.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - if (object.code != null) - message.code = String(object.code); + var message = new $root.google.cloud.datastream.v1.MysqlLogPosition(); + if (object.logFile != null) + message.logFile = String(object.logFile); + if (object.logPosition != null) + message.logPosition = object.logPosition | 0; return message; }; /** - * Creates a plain object from a ValidationMessage message. Also converts values to other types if specified. + * Creates a plain object from a MysqlLogPosition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datastream.v1.ValidationMessage + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @static - * @param {google.cloud.datastream.v1.ValidationMessage} message ValidationMessage + * @param {google.cloud.datastream.v1.MysqlLogPosition} message MysqlLogPosition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidationMessage.toObject = function toObject(message, options) { + MysqlLogPosition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.message = ""; - object.level = options.enums === String ? "LEVEL_UNSPECIFIED" : 0; - object.code = ""; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.level != null && message.hasOwnProperty("level")) - object.level = options.enums === String ? $root.google.cloud.datastream.v1.ValidationMessage.Level[message.level] === undefined ? message.level : $root.google.cloud.datastream.v1.ValidationMessage.Level[message.level] : message.level; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; + if (options.defaults) + object.logFile = ""; + if (message.logFile != null && message.hasOwnProperty("logFile")) + object.logFile = message.logFile; + if (message.logPosition != null && message.hasOwnProperty("logPosition")) { + object.logPosition = message.logPosition; + if (options.oneofs) + object._logPosition = "logPosition"; } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; return object; }; /** - * Converts this ValidationMessage to JSON. + * Converts this MysqlLogPosition to JSON. * @function toJSON - * @memberof google.cloud.datastream.v1.ValidationMessage + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @instance * @returns {Object.} JSON object */ - ValidationMessage.prototype.toJSON = function toJSON() { + MysqlLogPosition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ValidationMessage + * Gets the default type url for MysqlLogPosition * @function getTypeUrl - * @memberof google.cloud.datastream.v1.ValidationMessage + * @memberof google.cloud.datastream.v1.MysqlLogPosition * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ValidationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MysqlLogPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.datastream.v1.ValidationMessage"; + return typeUrlPrefix + "/google.cloud.datastream.v1.MysqlLogPosition"; }; - /** - * Level enum. - * @name google.cloud.datastream.v1.ValidationMessage.Level - * @enum {number} - * @property {number} LEVEL_UNSPECIFIED=0 LEVEL_UNSPECIFIED value - * @property {number} WARNING=1 WARNING value - * @property {number} ERROR=2 ERROR value - */ - ValidationMessage.Level = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "WARNING"] = 1; - values[valuesById[2] = "ERROR"] = 2; - return values; - })(); - - return ValidationMessage; + return MysqlLogPosition; })(); return v1; diff --git a/packages/google-cloud-datastream/protos/protos.json b/packages/google-cloud-datastream/protos/protos.json index f08e437e38c..d3fbe1116fa 100644 --- a/packages/google-cloud-datastream/protos/protos.json +++ b/packages/google-cloud-datastream/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -277,6 +280,30 @@ } ] }, + "RunStream": { + "requestType": "RunStreamRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/streams/*}:run", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Stream", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/streams/*}:run", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Stream", + "metadata_type": "OperationMetadata" + } + } + ] + }, "GetStreamObject": { "requestType": "GetStreamObjectRequest", "responseType": "StreamObject", @@ -587,7 +614,8 @@ "oneof": [ "oracleRdbms", "mysqlRdbms", - "postgresqlRdbms" + "postgresqlRdbms", + "sqlServerRdbms" ] } }, @@ -627,6 +655,10 @@ "postgresqlRdbms": { "type": "PostgresqlRdbms", "id": 102 + }, + "sqlServerRdbms": { + "type": "SqlServerRdbms", + "id": 103 } } }, @@ -636,7 +668,8 @@ "oneof": [ "oracleRdbms", "mysqlRdbms", - "postgresqlRdbms" + "postgresqlRdbms", + "sqlServerRdbms" ] } }, @@ -652,6 +685,10 @@ "postgresqlRdbms": { "type": "PostgresqlRdbms", "id": 102 + }, + "sqlServerRdbms": { + "type": "SqlServerRdbms", + "id": 103 } } }, @@ -1014,6 +1051,32 @@ } } }, + "RunStreamRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datastream.googleapis.com/Stream" + } + }, + "cdcStrategy": { + "type": "CdcStrategy", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "force": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "GetStreamObjectRequest": { "fields": { "name": { @@ -1436,7 +1499,7 @@ "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, "databaseService": { @@ -1450,6 +1513,81 @@ "keyType": "string", "type": "string", "id": 6 + }, + "oracleSslConfig": { + "type": "OracleSslConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oracleAsmConfig": { + "type": "OracleAsmConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "secretManagerStoredPassword": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OracleAsmConfig": { + "fields": { + "hostname": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "port": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "username": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "password": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "asmService": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "connectionAttributes": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oracleSslConfig": { + "type": "OracleSslConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1509,10 +1647,46 @@ "password": { "type": "string", "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "database": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SqlServerProfile": { + "fields": { + "hostname": { + "type": "string", + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, + "port": { + "type": "int32", + "id": 2 + }, + "username": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "password": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "database": { "type": "string", "id": 5, @@ -1787,6 +1961,24 @@ } } }, + "OracleSslConfig": { + "fields": { + "caCertificate": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "caCertificateSet": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "ConnectionProfile": { "options": { "(google.api.resource).type": "datastream.googleapis.com/ConnectionProfile", @@ -1799,7 +1991,8 @@ "gcsProfile", "mysqlProfile", "bigqueryProfile", - "postgresqlProfile" + "postgresqlProfile", + "sqlServerProfile" ] }, "connectivity": { @@ -1864,6 +2057,10 @@ "type": "PostgresqlProfile", "id": 104 }, + "sqlServerProfile": { + "type": "SqlServerProfile", + "id": 105 + }, "staticServiceIpConnectivity": { "type": "StaticServiceIpConnectivity", "id": 200 @@ -1960,6 +2157,12 @@ "dropLargeObjects", "streamLargeObjects" ] + }, + "cdcMethod": { + "oneof": [ + "logMiner", + "binaryLogParser" + ] } }, "fields": { @@ -1986,6 +2189,14 @@ "streamLargeObjects": { "type": "StreamLargeObjects", "id": 102 + }, + "logMiner": { + "type": "LogMiner", + "id": 103 + }, + "binaryLogParser": { + "type": "BinaryLogParser", + "id": 104 } }, "nested": { @@ -1994,6 +2205,52 @@ }, "StreamLargeObjects": { "fields": {} + }, + "LogMiner": { + "fields": {} + }, + "BinaryLogParser": { + "oneofs": { + "logFileAccess": { + "oneof": [ + "oracleAsmLogFileAccess", + "logFileDirectories" + ] + } + }, + "fields": { + "oracleAsmLogFileAccess": { + "type": "OracleAsmLogFileAccess", + "id": 1 + }, + "logFileDirectories": { + "type": "LogFileDirectories", + "id": 2 + } + }, + "nested": { + "OracleAsmLogFileAccess": { + "fields": {} + }, + "LogFileDirectories": { + "fields": { + "onlineLogDirectory": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "archivedLogDirectory": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } } } }, @@ -2098,6 +2355,119 @@ } } }, + "SqlServerColumn": { + "fields": { + "column": { + "type": "string", + "id": 1 + }, + "dataType": { + "type": "string", + "id": 2 + }, + "length": { + "type": "int32", + "id": 3 + }, + "precision": { + "type": "int32", + "id": 4 + }, + "scale": { + "type": "int32", + "id": 5 + }, + "primaryKey": { + "type": "bool", + "id": 6 + }, + "nullable": { + "type": "bool", + "id": 7 + }, + "ordinalPosition": { + "type": "int32", + "id": 8 + } + } + }, + "SqlServerTable": { + "fields": { + "table": { + "type": "string", + "id": 1 + }, + "columns": { + "rule": "repeated", + "type": "SqlServerColumn", + "id": 2 + } + } + }, + "SqlServerSchema": { + "fields": { + "schema": { + "type": "string", + "id": 1 + }, + "tables": { + "rule": "repeated", + "type": "SqlServerTable", + "id": 2 + } + } + }, + "SqlServerRdbms": { + "fields": { + "schemas": { + "rule": "repeated", + "type": "SqlServerSchema", + "id": 1 + } + } + }, + "SqlServerSourceConfig": { + "oneofs": { + "cdcMethod": { + "oneof": [ + "transactionLogs", + "changeTables" + ] + } + }, + "fields": { + "includeObjects": { + "type": "SqlServerRdbms", + "id": 1 + }, + "excludeObjects": { + "type": "SqlServerRdbms", + "id": 2 + }, + "maxConcurrentCdcTasks": { + "type": "int32", + "id": 3 + }, + "maxConcurrentBackfillTasks": { + "type": "int32", + "id": 4 + }, + "transactionLogs": { + "type": "SqlServerTransactionLogs", + "id": 101 + }, + "changeTables": { + "type": "SqlServerChangeTables", + "id": 102 + } + } + }, + "SqlServerTransactionLogs": { + "fields": {} + }, + "SqlServerChangeTables": { + "fields": {} + }, "MysqlColumn": { "fields": { "column": { @@ -2174,6 +2544,14 @@ } }, "MysqlSourceConfig": { + "oneofs": { + "cdcMethod": { + "oneof": [ + "binaryLogPosition", + "gtid" + ] + } + }, "fields": { "includeObjects": { "type": "MysqlRdbms", @@ -2190,6 +2568,22 @@ "maxConcurrentBackfillTasks": { "type": "int32", "id": 4 + }, + "binaryLogPosition": { + "type": "BinaryLogPosition", + "id": 101 + }, + "gtid": { + "type": "Gtid", + "id": 102 + } + }, + "nested": { + "BinaryLogPosition": { + "fields": {} + }, + "Gtid": { + "fields": {} } } }, @@ -2199,7 +2593,8 @@ "oneof": [ "oracleSourceConfig", "mysqlSourceConfig", - "postgresqlSourceConfig" + "postgresqlSourceConfig", + "sqlServerSourceConfig" ] } }, @@ -2223,6 +2618,10 @@ "postgresqlSourceConfig": { "type": "PostgresqlSourceConfig", "id": 102 + }, + "sqlServerSourceConfig": { + "type": "SqlServerSourceConfig", + "id": 103 } } }, @@ -2296,6 +2695,12 @@ "singleTargetDataset", "sourceHierarchyDatasets" ] + }, + "writeMode": { + "oneof": [ + "merge", + "appendOnly" + ] } }, "fields": { @@ -2310,6 +2715,14 @@ "dataFreshness": { "type": "google.protobuf.Duration", "id": 300 + }, + "merge": { + "type": "Merge", + "id": 301 + }, + "appendOnly": { + "type": "AppendOnly", + "id": 302 } }, "nested": { @@ -2349,6 +2762,12 @@ } } } + }, + "AppendOnly": { + "fields": {} + }, + "Merge": { + "fields": {} } } }, @@ -2473,6 +2892,13 @@ "(google.api.field_behavior)": "IMMUTABLE", "proto3_optional": true } + }, + "lastRecoveryTime": { + "type": "google.protobuf.Timestamp", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -2495,7 +2921,8 @@ "oneof": [ "oracleExcludedObjects", "mysqlExcludedObjects", - "postgresqlExcludedObjects" + "postgresqlExcludedObjects", + "sqlServerExcludedObjects" ] } }, @@ -2511,6 +2938,10 @@ "postgresqlExcludedObjects": { "type": "PostgresqlRdbms", "id": 3 + }, + "sqlServerExcludedObjects": { + "type": "SqlServerRdbms", + "id": 4 } } }, @@ -2577,7 +3008,8 @@ "oneof": [ "oracleIdentifier", "mysqlIdentifier", - "postgresqlIdentifier" + "postgresqlIdentifier", + "sqlServerIdentifier" ] } }, @@ -2593,6 +3025,10 @@ "postgresqlIdentifier": { "type": "PostgresqlObjectIdentifier", "id": 3 + }, + "sqlServerIdentifier": { + "type": "SqlServerObjectIdentifier", + "id": 4 } }, "nested": { @@ -2649,6 +3085,24 @@ } } } + }, + "SqlServerObjectIdentifier": { + "fields": { + "schema": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "table": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } } } }, @@ -2656,7 +3110,10 @@ "fields": { "state": { "type": "State", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "trigger": { "type": "Trigger", @@ -2749,7 +3206,10 @@ }, "state": { "type": "State", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "message": { "rule": "repeated", @@ -2767,7 +3227,8 @@ "STATE_UNSPECIFIED": 0, "NOT_EXECUTED": 1, "FAILED": 2, - "PASSED": 3 + "PASSED": 3, + "WARNING": 4 } } } @@ -2801,6 +3262,121 @@ } } } + }, + "CdcStrategy": { + "oneofs": { + "startPosition": { + "oneof": [ + "mostRecentStartPosition", + "nextAvailableStartPosition", + "specificStartPosition" + ] + } + }, + "fields": { + "mostRecentStartPosition": { + "type": "MostRecentStartPosition", + "id": 101, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nextAvailableStartPosition": { + "type": "NextAvailableStartPosition", + "id": 102, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "specificStartPosition": { + "type": "SpecificStartPosition", + "id": 103, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "MostRecentStartPosition": { + "fields": {} + }, + "NextAvailableStartPosition": { + "fields": {} + }, + "SpecificStartPosition": { + "oneofs": { + "position": { + "oneof": [ + "mysqlLogPosition", + "oracleScnPosition", + "sqlServerLsnPosition" + ] + } + }, + "fields": { + "mysqlLogPosition": { + "type": "MysqlLogPosition", + "id": 101 + }, + "oracleScnPosition": { + "type": "OracleScnPosition", + "id": 102 + }, + "sqlServerLsnPosition": { + "type": "SqlServerLsnPosition", + "id": 103 + } + } + } + } + }, + "SqlServerLsnPosition": { + "fields": { + "lsn": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "OracleScnPosition": { + "fields": { + "scn": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MysqlLogPosition": { + "oneofs": { + "_logPosition": { + "oneof": [ + "logPosition" + ] + } + }, + "fields": { + "logFile": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "logPosition": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } } } }, diff --git a/packages/google-cloud-datastream/samples/README.md b/packages/google-cloud-datastream/samples/README.md index fd48e19a268..8a3f088eb2e 100644 --- a/packages/google-cloud-datastream/samples/README.md +++ b/packages/google-cloud-datastream/samples/README.md @@ -33,6 +33,7 @@ * [Datastream.list_stream_objects](#datastream.list_stream_objects) * [Datastream.list_streams](#datastream.list_streams) * [Datastream.lookup_stream_object](#datastream.lookup_stream_object) + * [Datastream.run_stream](#datastream.run_stream) * [Datastream.start_backfill_job](#datastream.start_backfill_job) * [Datastream.stop_backfill_job](#datastream.stop_backfill_job) * [Datastream.update_connection_profile](#datastream.update_connection_profile) @@ -432,6 +433,23 @@ __Usage:__ +### Datastream.run_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.run_stream.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-datastream/samples/generated/v1/datastream.run_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-datastream/samples/generated/v1/datastream.run_stream.js` + + +----- + + + + ### Datastream.start_backfill_job View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js). diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js index 31994c3b10f..4fc599d6cac 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js @@ -62,6 +62,10 @@ function main(parent) { * PostgreSQL RDBMS to enrich with child data objects and metadata. */ // const postgresqlRdbms = {} + /** + * SQLServer RDBMS to enrich with child data objects and metadata. + */ + // const sqlServerRdbms = {} // Imports the Datastream library const {DatastreamClient} = require('@google-cloud/datastream').v1; diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.run_stream.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.run_stream.js new file mode 100644 index 00000000000..3b2e963f99d --- /dev/null +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.run_stream.js @@ -0,0 +1,72 @@ +// Copyright 2024 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 datastream_v1_generated_Datastream_RunStream_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. Name of the stream resource to start, in the format: + * projects/{project_id}/locations/{location}/streams/{stream_name} + */ + // const name = 'abc123' + /** + * Optional. The CDC strategy of the stream. If not set, the system's default + * value will be used. + */ + // const cdcStrategy = {} + /** + * Optional. Update the stream without validating it. + */ + // const force = true + + // Imports the Datastream library + const {DatastreamClient} = require('@google-cloud/datastream').v1; + + // Instantiates a client + const datastreamClient = new DatastreamClient(); + + async function callRunStream() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await datastreamClient.runStream(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRunStream(); + // [END datastream_v1_generated_Datastream_RunStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json b/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json index 94ca87cceae..05dbc1f412b 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json +++ b/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata_google.cloud.datastream.v1.json @@ -278,7 +278,7 @@ "segments": [ { "start": 25, - "end": 83, + "end": 87, "type": "FULL" } ], @@ -318,6 +318,10 @@ { "name": "postgresql_rdbms", "type": ".google.cloud.datastream.v1.PostgresqlRdbms" + }, + { + "name": "sql_server_rdbms", + "type": ".google.cloud.datastream.v1.SqlServerRdbms" } ], "resultType": ".google.cloud.datastream.v1.DiscoverConnectionProfileResponse", @@ -591,6 +595,54 @@ } } }, + { + "regionTag": "datastream_v1_generated_Datastream_RunStream_async", + "title": "Datastream runStream Sample", + "origin": "API_DEFINITION", + "description": " Use this method to start, resume or recover a stream with a non default CDC strategy.", + "canonical": true, + "file": "datastream.run_stream.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunStream", + "fullName": "google.cloud.datastream.v1.Datastream.RunStream", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "cdc_strategy", + "type": ".google.cloud.datastream.v1.CdcStrategy" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DatastreamClient", + "fullName": "google.cloud.datastream.v1.DatastreamClient" + }, + "method": { + "shortName": "RunStream", + "fullName": "google.cloud.datastream.v1.Datastream.RunStream", + "service": { + "shortName": "Datastream", + "fullName": "google.cloud.datastream.v1.Datastream" + } + } + } + }, { "regionTag": "datastream_v1_generated_Datastream_GetStreamObject_async", "title": "Datastream getStreamObject Sample", diff --git a/packages/google-cloud-datastream/src/v1/datastream_client.ts b/packages/google-cloud-datastream/src/v1/datastream_client.ts index f37029b21ec..9461e757ec8 100644 --- a/packages/google-cloud-datastream/src/v1/datastream_client.ts +++ b/packages/google-cloud-datastream/src/v1/datastream_client.ts @@ -350,6 +350,12 @@ export class DatastreamClient { const deleteStreamMetadata = protoFilesRoot.lookup( '.google.cloud.datastream.v1.OperationMetadata' ) as gax.protobuf.Type; + const runStreamResponse = protoFilesRoot.lookup( + '.google.cloud.datastream.v1.Stream' + ) as gax.protobuf.Type; + const runStreamMetadata = protoFilesRoot.lookup( + '.google.cloud.datastream.v1.OperationMetadata' + ) as gax.protobuf.Type; const createPrivateConnectionResponse = protoFilesRoot.lookup( '.google.cloud.datastream.v1.PrivateConnection' ) as gax.protobuf.Type; @@ -418,6 +424,11 @@ export class DatastreamClient { deleteStreamResponse.decode.bind(deleteStreamResponse), deleteStreamMetadata.decode.bind(deleteStreamMetadata) ), + runStream: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + runStreamResponse.decode.bind(runStreamResponse), + runStreamMetadata.decode.bind(runStreamMetadata) + ), createPrivateConnection: new this._gaxModule.LongrunningDescriptor( this.operationsClient, createPrivateConnectionResponse.decode.bind( @@ -509,6 +520,7 @@ export class DatastreamClient { 'createStream', 'updateStream', 'deleteStream', + 'runStream', 'getStreamObject', 'lookupStreamObject', 'listStreamObjects', @@ -762,6 +774,8 @@ export class DatastreamClient { * MySQL RDBMS to enrich with child data objects and metadata. * @param {google.cloud.datastream.v1.PostgresqlRdbms} request.postgresqlRdbms * PostgreSQL RDBMS to enrich with child data objects and metadata. + * @param {google.cloud.datastream.v1.SqlServerRdbms} request.sqlServerRdbms + * SQLServer RDBMS to enrich with child data objects and metadata. * @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. @@ -2434,6 +2448,149 @@ export class DatastreamClient { protos.google.cloud.datastream.v1.OperationMetadata >; } + /** + * Use this method to start, resume or recover a stream with a non default CDC + * strategy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the stream resource to start, in the format: + * projects/{project_id}/locations/{location}/streams/{stream_name} + * @param {google.cloud.datastream.v1.CdcStrategy} [request.cdcStrategy] + * Optional. The CDC strategy of the stream. If not set, the system's default + * value will be used. + * @param {boolean} [request.force] + * Optional. Update the stream without validating it. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/datastream.run_stream.js + * region_tag:datastream_v1_generated_Datastream_RunStream_async + */ + runStream( + request?: protos.google.cloud.datastream.v1.IRunStreamRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.datastream.v1.IStream, + protos.google.cloud.datastream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + runStream( + request: protos.google.cloud.datastream.v1.IRunStreamRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.datastream.v1.IStream, + protos.google.cloud.datastream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + runStream( + request: protos.google.cloud.datastream.v1.IRunStreamRequest, + callback: Callback< + LROperation< + protos.google.cloud.datastream.v1.IStream, + protos.google.cloud.datastream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + runStream( + request?: protos.google.cloud.datastream.v1.IRunStreamRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.datastream.v1.IStream, + protos.google.cloud.datastream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.datastream.v1.IStream, + protos.google.cloud.datastream.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.datastream.v1.IStream, + protos.google.cloud.datastream.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.runStream(request, options, callback); + } + /** + * Check the status of the long running operation returned by `runStream()`. + * @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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/datastream.run_stream.js + * region_tag:datastream_v1_generated_Datastream_RunStream_async + */ + async checkRunStreamProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.datastream.v1.Stream, + protos.google.cloud.datastream.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.runStream, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.datastream.v1.Stream, + protos.google.cloud.datastream.v1.OperationMetadata + >; + } /** * Use this method to create a private connectivity configuration. * diff --git a/packages/google-cloud-datastream/src/v1/datastream_client_config.json b/packages/google-cloud-datastream/src/v1/datastream_client_config.json index 5b8f034a874..e1b7f69983b 100644 --- a/packages/google-cloud-datastream/src/v1/datastream_client_config.json +++ b/packages/google-cloud-datastream/src/v1/datastream_client_config.json @@ -87,6 +87,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "RunStream": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, "GetStreamObject": { "timeout_millis": 60000, "retry_codes_name": "unavailable", diff --git a/packages/google-cloud-datastream/src/v1/gapic_metadata.json b/packages/google-cloud-datastream/src/v1/gapic_metadata.json index 35e86aa3e21..4f455fb0d4e 100644 --- a/packages/google-cloud-datastream/src/v1/gapic_metadata.json +++ b/packages/google-cloud-datastream/src/v1/gapic_metadata.json @@ -85,6 +85,11 @@ "deleteStream" ] }, + "RunStream": { + "methods": [ + "runStream" + ] + }, "CreatePrivateConnection": { "methods": [ "createPrivateConnection" @@ -227,6 +232,11 @@ "deleteStream" ] }, + "RunStream": { + "methods": [ + "runStream" + ] + }, "CreatePrivateConnection": { "methods": [ "createPrivateConnection" diff --git a/packages/google-cloud-datastream/test/gapic_datastream_v1.ts b/packages/google-cloud-datastream/test/gapic_datastream_v1.ts index 0987ab44342..f440f15e808 100644 --- a/packages/google-cloud-datastream/test/gapic_datastream_v1.ts +++ b/packages/google-cloud-datastream/test/gapic_datastream_v1.ts @@ -2687,6 +2687,196 @@ describe('v1.DatastreamClient', () => { }); }); + describe('runStream', () => { + it('invokes runStream without error', async () => { + const client = new datastreamModule.v1.DatastreamClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datastream.v1.RunStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.datastream.v1.RunStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.runStream = stubLongRunningCall(expectedResponse); + const [operation] = await client.runStream(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.runStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runStream without error using callback', async () => { + const client = new datastreamModule.v1.DatastreamClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datastream.v1.RunStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.datastream.v1.RunStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.runStream = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runStream( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.datastream.v1.IStream, + protos.google.cloud.datastream.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.datastream.v1.IStream, + protos.google.cloud.datastream.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.runStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runStream with call error', async () => { + const client = new datastreamModule.v1.DatastreamClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datastream.v1.RunStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.datastream.v1.RunStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.runStream = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.runStream(request), expectedError); + const actualRequest = ( + client.innerApiCalls.runStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runStream with LRO error', async () => { + const client = new datastreamModule.v1.DatastreamClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.datastream.v1.RunStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.datastream.v1.RunStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.runStream = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.runStream(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.runStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRunStreamProgress without error', async () => { + const client = new datastreamModule.v1.DatastreamClient({ + 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.checkRunStreamProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRunStreamProgress with error', async () => { + const client = new datastreamModule.v1.DatastreamClient({ + 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.checkRunStreamProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('createPrivateConnection', () => { it('invokes createPrivateConnection without error', async () => { const client = new datastreamModule.v1.DatastreamClient({