diff --git a/packages/google-cloud-eventarc/README.md b/packages/google-cloud-eventarc/README.md index b9cabf3f1bc..9416f0ae5cc 100644 --- a/packages/google-cloud-eventarc/README.md +++ b/packages/google-cloud-eventarc/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 Eventarc 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 @@ -89,21 +89,42 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | --------------------------- | --------------------------------- | ------ | | Eventarc.create_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_channel.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-eventarc/samples/generated/v1/eventarc.create_channel.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.create_channel_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_channel_connection.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-eventarc/samples/generated/v1/eventarc.create_channel_connection.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.create_enrollment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_enrollment.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-eventarc/samples/generated/v1/eventarc.create_enrollment.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.create_google_api_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_google_api_source.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-eventarc/samples/generated/v1/eventarc.create_google_api_source.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.create_message_bus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_message_bus.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-eventarc/samples/generated/v1/eventarc.create_message_bus.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.create_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_pipeline.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-eventarc/samples/generated/v1/eventarc.create_pipeline.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.create_trigger | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_trigger.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-eventarc/samples/generated/v1/eventarc.create_trigger.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.delete_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_channel.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-eventarc/samples/generated/v1/eventarc.delete_channel.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.delete_channel_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_channel_connection.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-eventarc/samples/generated/v1/eventarc.delete_channel_connection.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.delete_enrollment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_enrollment.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-eventarc/samples/generated/v1/eventarc.delete_enrollment.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.delete_google_api_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_google_api_source.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-eventarc/samples/generated/v1/eventarc.delete_google_api_source.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.delete_message_bus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_message_bus.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-eventarc/samples/generated/v1/eventarc.delete_message_bus.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.delete_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_pipeline.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-eventarc/samples/generated/v1/eventarc.delete_pipeline.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.delete_trigger | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_trigger.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-eventarc/samples/generated/v1/eventarc.delete_trigger.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.get_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_channel.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-eventarc/samples/generated/v1/eventarc.get_channel.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.get_channel_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_channel_connection.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-eventarc/samples/generated/v1/eventarc.get_channel_connection.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.get_enrollment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_enrollment.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-eventarc/samples/generated/v1/eventarc.get_enrollment.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.get_google_api_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_google_api_source.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-eventarc/samples/generated/v1/eventarc.get_google_api_source.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.get_google_channel_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_google_channel_config.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-eventarc/samples/generated/v1/eventarc.get_google_channel_config.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.get_message_bus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_message_bus.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-eventarc/samples/generated/v1/eventarc.get_message_bus.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.get_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_pipeline.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-eventarc/samples/generated/v1/eventarc.get_pipeline.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.get_provider | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_provider.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-eventarc/samples/generated/v1/eventarc.get_provider.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.get_trigger | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_trigger.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-eventarc/samples/generated/v1/eventarc.get_trigger.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.list_channel_connections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_channel_connections.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-eventarc/samples/generated/v1/eventarc.list_channel_connections.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.list_channels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_channels.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-eventarc/samples/generated/v1/eventarc.list_channels.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.list_enrollments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_enrollments.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-eventarc/samples/generated/v1/eventarc.list_enrollments.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.list_google_api_sources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_google_api_sources.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-eventarc/samples/generated/v1/eventarc.list_google_api_sources.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.list_message_bus_enrollments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_bus_enrollments.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-eventarc/samples/generated/v1/eventarc.list_message_bus_enrollments.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.list_message_buses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_buses.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-eventarc/samples/generated/v1/eventarc.list_message_buses.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.list_pipelines | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_pipelines.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-eventarc/samples/generated/v1/eventarc.list_pipelines.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.list_providers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_providers.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-eventarc/samples/generated/v1/eventarc.list_providers.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.list_triggers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_triggers.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-eventarc/samples/generated/v1/eventarc.list_triggers.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.update_channel | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_channel.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-eventarc/samples/generated/v1/eventarc.update_channel.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.update_enrollment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_enrollment.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-eventarc/samples/generated/v1/eventarc.update_enrollment.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.update_google_api_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_google_api_source.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-eventarc/samples/generated/v1/eventarc.update_google_api_source.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.update_google_channel_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_google_channel_config.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-eventarc/samples/generated/v1/eventarc.update_google_channel_config.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.update_message_bus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_message_bus.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-eventarc/samples/generated/v1/eventarc.update_message_bus.js,packages/google-cloud-eventarc/samples/README.md) | +| Eventarc.update_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_pipeline.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-eventarc/samples/generated/v1/eventarc.update_pipeline.js,packages/google-cloud-eventarc/samples/README.md) | | Eventarc.update_trigger | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_trigger.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-eventarc/samples/generated/v1/eventarc.update_trigger.js,packages/google-cloud-eventarc/samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/quickstart.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-eventarc/samples/quickstart.js,packages/google-cloud-eventarc/samples/README.md) | @@ -175,4 +196,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=eventarc.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-eventarc/protos/google/cloud/eventarc/v1/channel.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/channel.proto index 83942c9dcde..f516db2bca9 100644 --- a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/channel.proto +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/channel.proto @@ -106,15 +106,16 @@ message Channel { // by the provider to register the channel for publishing. string activation_token = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Resource name of a KMS crypto key (managed by the user) used to + // Resource name of a KMS crypto key (managed by the user) used to // encrypt/decrypt their event data. // // It must match the pattern // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - string crypto_key_name = 11 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKey" - } - ]; + string crypto_key_name = 11 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + }]; + + // Output only. Whether or not this Channel satisfies the requirements of + // physical zone separation + bool satisfies_pzs = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/channel_connection.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/channel_connection.proto index f00e5ed2efb..37e641fcab6 100644 --- a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/channel_connection.proto +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/channel_connection.proto @@ -59,10 +59,12 @@ message ChannelConnection { ]; // Output only. The creation time. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last-modified time. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Input only. Activation token for the channel. The token will be used // during the creation of ChannelConnection to bind the channel with the diff --git a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/discovery.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/discovery.proto index bedf2335b8f..4c1305e7033 100644 --- a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/discovery.proto +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/discovery.proto @@ -33,15 +33,17 @@ message Provider { singular: "provider" }; - // Output only. In `projects/{project}/locations/{location}/providers/{provider_id}` - // format. + // Output only. In + // `projects/{project}/locations/{location}/providers/{provider_id}` format. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Human friendly name for the Provider. For example "Cloud Storage". + // Output only. Human friendly name for the Provider. For example "Cloud + // Storage". string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Event types for this provider. - repeated EventType event_types = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated EventType event_types = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A representation of the event type resource. @@ -59,7 +61,8 @@ message EventType { string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Filtering attributes for the event type. - repeated FilteringAttribute filtering_attributes = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated FilteringAttribute filtering_attributes = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. URI for the event schema. // For example @@ -76,11 +79,11 @@ message FilteringAttribute { // Output only. Description of the purpose of the attribute. string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If true, the triggers for this provider should always specify a filter - // on these attributes. Trigger creation will fail otherwise. + // Output only. If true, the triggers for this provider should always specify + // a filter on these attributes. Trigger creation will fail otherwise. bool required = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. If true, the attribute accepts matching expressions in the Eventarc - // PathPattern format. + // Output only. If true, the attribute accepts matching expressions in the + // Eventarc PathPattern format. bool path_pattern_supported = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/enrollment.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/enrollment.proto new file mode 100644 index 00000000000..78a8d589d34 --- /dev/null +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/enrollment.proto @@ -0,0 +1,91 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.eventarc.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Eventarc.V1"; +option go_package = "cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb"; +option java_multiple_files = true; +option java_outer_classname = "EnrollmentProto"; +option java_package = "com.google.cloud.eventarc.v1"; +option php_namespace = "Google\\Cloud\\Eventarc\\V1"; +option ruby_package = "Google::Cloud::Eventarc::V1"; + +// An enrollment represents a subscription for messages on a particular message +// bus. It defines a matching criteria for messages on the bus and the +// subscriber endpoint where matched messages should be delivered. +message Enrollment { + option (google.api.resource) = { + type: "eventarc.googleapis.com/Enrollment" + pattern: "projects/{project}/locations/{location}/enrollments/{enrollment}" + plural: "enrollments" + singular: "enrollment" + }; + + // Identifier. Resource name of the form + // projects/{project}/locations/{location}/enrollments/{enrollment} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Server assigned unique identifier for the channel. The value + // is a UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This checksum is computed by the server based on the value of + // other fields, and might be sent only on update and delete requests to + // ensure that the client has an up-to-date value before proceeding. + string etag = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The creation time. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last-modified time. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource annotations. + map annotations = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource display name. + string display_name = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. A CEL expression identifying which messages this enrollment + // applies to. + string cel_match = 9 [(google.api.field_behavior) = REQUIRED]; + + // Required. Resource name of the message bus identifying the source of the + // messages. It matches the form + // projects/{project}/locations/{location}/messageBuses/{messageBus}. + string message_bus = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/MessageBus" + } + ]; + + // Required. Destination is the Pipeline that the Enrollment is delivering to. + // It must point to the full resource name of a Pipeline. Format: + // "projects/{PROJECT_ID}/locations/{region}/pipelines/{PIPELINE_ID)" + string destination = 11 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/eventarc.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/eventarc.proto index 3401a580420..6d9d1b1853b 100644 --- a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/eventarc.proto +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/eventarc.proto @@ -23,7 +23,11 @@ import "google/api/resource.proto"; import "google/cloud/eventarc/v1/channel.proto"; import "google/cloud/eventarc/v1/channel_connection.proto"; import "google/cloud/eventarc/v1/discovery.proto"; +import "google/cloud/eventarc/v1/enrollment.proto"; +import "google/cloud/eventarc/v1/google_api_source.proto"; import "google/cloud/eventarc/v1/google_channel_config.proto"; +import "google/cloud/eventarc/v1/message_bus.proto"; +import "google/cloud/eventarc/v1/pipeline.proto"; import "google/cloud/eventarc/v1/trigger.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; @@ -41,7 +45,8 @@ option ruby_package = "Google::Cloud::Eventarc::V1"; // Google Cloud services and forward them to supported destinations. service Eventarc { option (google.api.default_host) = "eventarc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Get a single trigger. rpc GetTrigger(GetTriggerRequest) returns (Trigger) { @@ -60,7 +65,8 @@ service Eventarc { } // Create a new trigger in a particular project and location. - rpc CreateTrigger(CreateTriggerRequest) returns (google.longrunning.Operation) { + rpc CreateTrigger(CreateTriggerRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/triggers" body: "trigger" @@ -73,7 +79,8 @@ service Eventarc { } // Update a single trigger. - rpc UpdateTrigger(UpdateTriggerRequest) returns (google.longrunning.Operation) { + rpc UpdateTrigger(UpdateTriggerRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{trigger.name=projects/*/locations/*/triggers/*}" body: "trigger" @@ -86,7 +93,8 @@ service Eventarc { } // Delete a single trigger. - rpc DeleteTrigger(DeleteTriggerRequest) returns (google.longrunning.Operation) { + rpc DeleteTrigger(DeleteTriggerRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/triggers/*}" }; @@ -114,7 +122,8 @@ service Eventarc { } // Create a new channel in a particular project and location. - rpc CreateChannel(CreateChannelRequest) returns (google.longrunning.Operation) { + rpc CreateChannel(CreateChannelRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/channels" body: "channel" @@ -127,7 +136,8 @@ service Eventarc { } // Update a single channel. - rpc UpdateChannel(UpdateChannelRequest) returns (google.longrunning.Operation) { + rpc UpdateChannel(UpdateChannelRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{channel.name=projects/*/locations/*/channels/*}" body: "channel" @@ -140,7 +150,8 @@ service Eventarc { } // Delete a single channel. - rpc DeleteChannel(DeleteChannelRequest) returns (google.longrunning.Operation) { + rpc DeleteChannel(DeleteChannelRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/channels/*}" }; @@ -168,7 +179,8 @@ service Eventarc { } // Get a single ChannelConnection. - rpc GetChannelConnection(GetChannelConnectionRequest) returns (ChannelConnection) { + rpc GetChannelConnection(GetChannelConnectionRequest) + returns (ChannelConnection) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/channelConnections/*}" }; @@ -176,7 +188,8 @@ service Eventarc { } // List channel connections. - rpc ListChannelConnections(ListChannelConnectionsRequest) returns (ListChannelConnectionsResponse) { + rpc ListChannelConnections(ListChannelConnectionsRequest) + returns (ListChannelConnectionsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/channelConnections" }; @@ -184,12 +197,14 @@ service Eventarc { } // Create a new ChannelConnection in a particular project and location. - rpc CreateChannelConnection(CreateChannelConnectionRequest) returns (google.longrunning.Operation) { + rpc CreateChannelConnection(CreateChannelConnectionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/channelConnections" body: "channel_connection" }; - option (google.api.method_signature) = "parent,channel_connection,channel_connection_id"; + option (google.api.method_signature) = + "parent,channel_connection,channel_connection_id"; option (google.longrunning.operation_info) = { response_type: "ChannelConnection" metadata_type: "OperationMetadata" @@ -197,7 +212,8 @@ service Eventarc { } // Delete a single ChannelConnection. - rpc DeleteChannelConnection(DeleteChannelConnectionRequest) returns (google.longrunning.Operation) { + rpc DeleteChannelConnection(DeleteChannelConnectionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/channelConnections/*}" }; @@ -209,7 +225,8 @@ service Eventarc { } // Get a GoogleChannelConfig - rpc GetGoogleChannelConfig(GetGoogleChannelConfigRequest) returns (GoogleChannelConfig) { + rpc GetGoogleChannelConfig(GetGoogleChannelConfigRequest) + returns (GoogleChannelConfig) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/googleChannelConfig}" }; @@ -217,13 +234,255 @@ service Eventarc { } // Update a single GoogleChannelConfig - rpc UpdateGoogleChannelConfig(UpdateGoogleChannelConfigRequest) returns (GoogleChannelConfig) { + rpc UpdateGoogleChannelConfig(UpdateGoogleChannelConfigRequest) + returns (GoogleChannelConfig) { option (google.api.http) = { patch: "/v1/{google_channel_config.name=projects/*/locations/*/googleChannelConfig}" body: "google_channel_config" }; option (google.api.method_signature) = "google_channel_config,update_mask"; } + + // Get a single MessageBus. + rpc GetMessageBus(GetMessageBusRequest) returns (MessageBus) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/messageBuses/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List message buses. + rpc ListMessageBuses(ListMessageBusesRequest) + returns (ListMessageBusesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/messageBuses" + }; + option (google.api.method_signature) = "parent"; + } + + // List message bus enrollments. + rpc ListMessageBusEnrollments(ListMessageBusEnrollmentsRequest) + returns (ListMessageBusEnrollmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/messageBuses/*}:listEnrollments" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a new MessageBus in a particular project and location. + rpc CreateMessageBus(CreateMessageBusRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/messageBuses" + body: "message_bus" + }; + option (google.api.method_signature) = "parent,message_bus,message_bus_id"; + option (google.longrunning.operation_info) = { + response_type: "MessageBus" + metadata_type: "OperationMetadata" + }; + } + + // Update a single message bus. + rpc UpdateMessageBus(UpdateMessageBusRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{message_bus.name=projects/*/locations/*/messageBuses/*}" + body: "message_bus" + }; + option (google.api.method_signature) = "message_bus,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MessageBus" + metadata_type: "OperationMetadata" + }; + } + + // Delete a single message bus. + rpc DeleteMessageBus(DeleteMessageBusRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/messageBuses/*}" + }; + option (google.api.method_signature) = "name,etag"; + option (google.longrunning.operation_info) = { + response_type: "MessageBus" + metadata_type: "OperationMetadata" + }; + } + + // Get a single Enrollment. + rpc GetEnrollment(GetEnrollmentRequest) returns (Enrollment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/enrollments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List Enrollments. + rpc ListEnrollments(ListEnrollmentsRequest) + returns (ListEnrollmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/enrollments" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a new Enrollment in a particular project and location. + rpc CreateEnrollment(CreateEnrollmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/enrollments" + body: "enrollment" + }; + option (google.api.method_signature) = "parent,enrollment,enrollment_id"; + option (google.longrunning.operation_info) = { + response_type: "Enrollment" + metadata_type: "OperationMetadata" + }; + } + + // Update a single Enrollment. + rpc UpdateEnrollment(UpdateEnrollmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{enrollment.name=projects/*/locations/*/enrollments/*}" + body: "enrollment" + }; + option (google.api.method_signature) = "enrollment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Enrollment" + metadata_type: "OperationMetadata" + }; + } + + // Delete a single Enrollment. + rpc DeleteEnrollment(DeleteEnrollmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/enrollments/*}" + }; + option (google.api.method_signature) = "name,etag"; + option (google.longrunning.operation_info) = { + response_type: "Enrollment" + metadata_type: "OperationMetadata" + }; + } + + // Get a single Pipeline. + rpc GetPipeline(GetPipelineRequest) returns (Pipeline) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/pipelines/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List pipelines. + rpc ListPipelines(ListPipelinesRequest) returns (ListPipelinesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/pipelines" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a new Pipeline in a particular project and location. + rpc CreatePipeline(CreatePipelineRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/pipelines" + body: "pipeline" + }; + option (google.api.method_signature) = "parent,pipeline,pipeline_id"; + option (google.longrunning.operation_info) = { + response_type: "Pipeline" + metadata_type: "OperationMetadata" + }; + } + + // Update a single pipeline. + rpc UpdatePipeline(UpdatePipelineRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{pipeline.name=projects/*/locations/*/pipelines/*}" + body: "pipeline" + }; + option (google.api.method_signature) = "pipeline,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Pipeline" + metadata_type: "OperationMetadata" + }; + } + + // Delete a single pipeline. + rpc DeletePipeline(DeletePipelineRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/pipelines/*}" + }; + option (google.api.method_signature) = "name,etag"; + option (google.longrunning.operation_info) = { + response_type: "Pipeline" + metadata_type: "OperationMetadata" + }; + } + + // Get a single GoogleApiSource. + rpc GetGoogleApiSource(GetGoogleApiSourceRequest) returns (GoogleApiSource) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/googleApiSources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List GoogleApiSources. + rpc ListGoogleApiSources(ListGoogleApiSourcesRequest) + returns (ListGoogleApiSourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/googleApiSources" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a new GoogleApiSource in a particular project and location. + rpc CreateGoogleApiSource(CreateGoogleApiSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/googleApiSources" + body: "google_api_source" + }; + option (google.api.method_signature) = + "parent,google_api_source,google_api_source_id"; + option (google.longrunning.operation_info) = { + response_type: "GoogleApiSource" + metadata_type: "OperationMetadata" + }; + } + + // Update a single GoogleApiSource. + rpc UpdateGoogleApiSource(UpdateGoogleApiSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{google_api_source.name=projects/*/locations/*/googleApiSources/*}" + body: "google_api_source" + }; + option (google.api.method_signature) = "google_api_source,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "GoogleApiSource" + metadata_type: "OperationMetadata" + }; + } + + // Delete a single GoogleApiSource. + rpc DeleteGoogleApiSource(DeleteGoogleApiSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/googleApiSources/*}" + }; + option (google.api.method_signature) = "name,etag"; + option (google.longrunning.operation_info) = { + response_type: "GoogleApiSource" + metadata_type: "OperationMetadata" + }; + } } // The request message for the GetTrigger method. @@ -300,9 +559,9 @@ message CreateTriggerRequest { // Required. The user-provided ID to be assigned to the trigger. string trigger_id = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. If set, validate the request and preview the review, but do not + // Optional. If set, validate the request and preview the review, but do not // post it. - bool validate_only = 4 [(google.api.field_behavior) = REQUIRED]; + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; } // The request message for the UpdateTrigger method. @@ -319,9 +578,9 @@ message UpdateTriggerRequest { // created. In this situation, `update_mask` is ignored. bool allow_missing = 3; - // Required. If set, validate the request and preview the review, but do not + // Optional. If set, validate the request and preview the review, but do not // post it. - bool validate_only = 4 [(google.api.field_behavior) = REQUIRED]; + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; } // The request message for the DeleteTrigger method. @@ -342,9 +601,9 @@ message DeleteTriggerRequest { // but no action will be taken on the server. bool allow_missing = 3; - // Required. If set, validate the request and preview the review, but do not + // Optional. If set, validate the request and preview the review, but do not // post it. - bool validate_only = 4 [(google.api.field_behavior) = REQUIRED]; + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; } // The request message for the GetChannel method. @@ -416,9 +675,9 @@ message CreateChannelRequest { // Required. The user-provided ID to be assigned to the channel. string channel_id = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. If set, validate the request and preview the review, but do not + // Optional. If set, validate the request and preview the review, but do not // post it. - bool validate_only = 4 [(google.api.field_behavior) = REQUIRED]; + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; } // The request message for the UpdateChannel method. @@ -431,9 +690,9 @@ message UpdateChannelRequest { // updated. To update all fields, provide a field mask of "*". google.protobuf.FieldMask update_mask = 2; - // Required. If set, validate the request and preview the review, but do not + // Optional. If set, validate the request and preview the review, but do not // post it. - bool validate_only = 3 [(google.api.field_behavior) = REQUIRED]; + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for the DeleteChannel method. @@ -446,9 +705,9 @@ message DeleteChannelRequest { } ]; - // Required. If set, validate the request and preview the review, but do not + // Optional. If set, validate the request and preview the review, but do not // post it. - bool validate_only = 2 [(google.api.field_behavior) = REQUIRED]; + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; } // The request message for the GetProvider method. @@ -565,7 +824,8 @@ message CreateChannelConnectionRequest { ]; // Required. Channel connection to create. - ChannelConnection channel_connection = 2 [(google.api.field_behavior) = REQUIRED]; + ChannelConnection channel_connection = 2 + [(google.api.field_behavior) = REQUIRED]; // Required. The user-provided ID to be assigned to the channel connection. string channel_connection_id = 3 [(google.api.field_behavior) = REQUIRED]; @@ -585,7 +845,8 @@ message DeleteChannelConnectionRequest { // The request message for the UpdateGoogleChannelConfig method. message UpdateGoogleChannelConfigRequest { // Required. The config to be updated. - GoogleChannelConfig google_channel_config = 1 [(google.api.field_behavior) = REQUIRED]; + GoogleChannelConfig google_channel_config = 1 + [(google.api.field_behavior) = REQUIRED]; // The fields to be updated; only fields explicitly provided are updated. // If no field mask is provided, all provided fields in the request are @@ -604,13 +865,541 @@ message GetGoogleChannelConfigRequest { ]; } +// The request message for the GetMessageBus method. +message GetMessageBusRequest { + // Required. The name of the message bus to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/MessageBus" + } + ]; +} + +// The request message for the ListMessageBuses method. +message ListMessageBusesRequest { + // Required. The parent collection to list triggers on. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "eventarc.googleapis.com/MessageBus" + } + ]; + + // Optional. The maximum number of results to return on each page. + // + // Note: The service may send fewer. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token; provide the value from the `next_page_token` + // field in a previous call to retrieve the subsequent page. + // + // When paginating, all other parameters provided must match + // the previous call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sorting order of the resources returned. Value should be a + // comma-separated list of fields. The default sorting order is ascending. To + // specify descending order for a field, append a `desc` suffix; for example: + // `name desc, update_time`. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter field that the list request will filter on. + // Possible filtersare described in https://google.aip.dev/160. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for the `ListMessageBuses` method. +message ListMessageBusesResponse { + // The requested message buses, up to the number specified in `page_size`. + repeated MessageBus message_buses = 1; + + // A page token that can be sent to `ListMessageBuses` to request the next + // page. If this is empty, then there are no more pages. + string next_page_token = 2; + + // Unreachable resources, if any. + repeated string unreachable = 3; +} + +// The request message for the `ListMessageBusEnrollments` method. +message ListMessageBusEnrollmentsRequest { + // Required. The parent message bus to list enrollments on. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/MessageBus" + } + ]; + + // Optional. The maximum number of results to return on each page. + // + // Note: The service may send fewer. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token; provide the value from the `next_page_token` + // field in a previous call to retrieve the subsequent page. + // + // When paginating, all other parameters provided must match + // the previous call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for the `ListMessageBusEnrollments` method.` +message ListMessageBusEnrollmentsResponse { + // The requested enrollments, up to the number specified in `page_size`. + repeated string enrollments = 1; + + // A page token that can be sent to `ListMessageBusEnrollments` to request the + // next page. If this is empty, then there are no more pages. + string next_page_token = 2; + + // Unreachable resources, if any. + repeated string unreachable = 3; +} + +// The request message for the CreateMessageBus method. +message CreateMessageBusRequest { + // Required. The parent collection in which to add this message bus. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "eventarc.googleapis.com/MessageBus" + } + ]; + + // Required. The message bus to create. + MessageBus message_bus = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The user-provided ID to be assigned to the MessageBus. It should + // match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) + string message_bus_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the UpdateMessageBus method. +message UpdateMessageBusRequest { + // Required. The MessageBus to be updated. + MessageBus message_bus = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The fields to be updated; only fields explicitly provided are + // updated. If no field mask is provided, all provided fields in the request + // are updated. To update all fields, provide a field mask of "*". + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, and the MessageBus is not found, a new MessageBus + // will be created. In this situation, `update_mask` is ignored. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the DeleteMessageBus method. +message DeleteMessageBusRequest { + // Required. The name of the MessageBus to be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/MessageBus" + } + ]; + + // Optional. If provided, the MessageBus will only be deleted if the etag + // matches the current etag on the resource. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, and the MessageBus is not found, the request will + // succeed but no action will be taken on the server. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the GetEnrollment method. +message GetEnrollmentRequest { + // Required. The name of the Enrollment to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/Enrollment" + } + ]; +} + +// The request message for the ListEnrollments method. +message ListEnrollmentsRequest { + // Required. The parent collection to list triggers on. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "eventarc.googleapis.com/Enrollment" + } + ]; + + // Optional. The maximum number of results to return on each page. + // + // Note: The service may send fewer. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token; provide the value from the `next_page_token` + // field in a previous call to retrieve the subsequent page. + // + // When paginating, all other parameters provided must match + // the previous call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sorting order of the resources returned. Value should be a + // comma-separated list of fields. The default sorting order is ascending. To + // specify descending order for a field, append a `desc` suffix; for example: + // `name desc, update_time`. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter field that the list request will filter on. + // Possible filtersare described in https://google.aip.dev/160. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for the `ListEnrollments` method. +message ListEnrollmentsResponse { + // The requested Enrollments, up to the number specified in `page_size`. + repeated Enrollment enrollments = 1; + + // A page token that can be sent to `ListEnrollments` to request the next + // page. If this is empty, then there are no more pages. + string next_page_token = 2; + + // Unreachable resources, if any. + repeated string unreachable = 3; +} + +// The request message for the CreateEnrollment method. +message CreateEnrollmentRequest { + // Required. The parent collection in which to add this enrollment. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "eventarc.googleapis.com/Enrollment" + } + ]; + + // Required. The enrollment to create. + Enrollment enrollment = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The user-provided ID to be assigned to the Enrollment. It should + // match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + string enrollment_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the UpdateEnrollment method. +message UpdateEnrollmentRequest { + // Required. The Enrollment to be updated. + Enrollment enrollment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The fields to be updated; only fields explicitly provided are + // updated. If no field mask is provided, all provided fields in the request + // are updated. To update all fields, provide a field mask of "*". + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, and the Enrollment is not found, a new Enrollment + // will be created. In this situation, `update_mask` is ignored. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the DeleteEnrollment method. +message DeleteEnrollmentRequest { + // Required. The name of the Enrollment to be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/Enrollment" + } + ]; + + // Optional. If provided, the Enrollment will only be deleted if the etag + // matches the current etag on the resource. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, and the Enrollment is not found, the request will + // succeed but no action will be taken on the server. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the GetPipeline method. +message GetPipelineRequest { + // Required. The name of the pipeline to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/Pipeline" + } + ]; +} + +// The request message for the ListPipelines method. +message ListPipelinesRequest { + // Required. The parent collection to list pipelines on. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "eventarc.googleapis.com/Pipeline" + } + ]; + + // Optional. The maximum number of results to return on each page. + // + // Note: The service may send fewer. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token; provide the value from the `next_page_token` + // field in a previous call to retrieve the subsequent page. + // + // When paginating, all other parameters provided must match + // the previous call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sorting order of the resources returned. Value should be a + // comma-separated list of fields. The default sorting order is ascending. To + // specify descending order for a field, append a `desc` suffix; for example: + // `name desc, update_time`. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter field that the list request will filter on. + // Possible filters are described in https://google.aip.dev/160. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for the ListPipelines method. +message ListPipelinesResponse { + // The requested pipelines, up to the number specified in `page_size`. + repeated Pipeline pipelines = 1; + + // A page token that can be sent to `ListPipelines` to request the next + // page. If this is empty, then there are no more pages. + string next_page_token = 2; + + // Unreachable resources, if any. + repeated string unreachable = 3; +} + +// The request message for the CreatePipeline method. +message CreatePipelineRequest { + // Required. The parent collection in which to add this pipeline. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "eventarc.googleapis.com/Pipeline" + } + ]; + + // Required. The pipeline to create. + Pipeline pipeline = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The user-provided ID to be assigned to the Pipeline. + string pipeline_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the UpdatePipeline method. +message UpdatePipelineRequest { + // Required. The Pipeline to be updated. + Pipeline pipeline = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The fields to be updated; only fields explicitly provided are + // updated. If no field mask is provided, all provided fields in the request + // are updated. To update all fields, provide a field mask of "*". + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, and the Pipeline is not found, a new Pipeline + // will be created. In this situation, `update_mask` is ignored. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the DeletePipeline method. +message DeletePipelineRequest { + // Required. The name of the Pipeline to be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/Pipeline" + } + ]; + + // Optional. If provided, the Pipeline will only be deleted if the etag + // matches the current etag on the resource. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, and the Pipeline is not found, the request will + // succeed but no action will be taken on the server. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the GetGoogleApiSource method. +message GetGoogleApiSourceRequest { + // Required. The name of the google api source to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/GoogleApiSource" + } + ]; +} + +// The request message for the ListGoogleApiSources method. +message ListGoogleApiSourcesRequest { + // Required. The parent collection to list GoogleApiSources on. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "eventarc.googleapis.com/GoogleApiSource" + } + ]; + + // Optional. The maximum number of results to return on each page. + // + // Note: The service may send fewer. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token; provide the value from the `next_page_token` + // field in a previous call to retrieve the subsequent page. + // + // When paginating, all other parameters provided must match + // the previous call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sorting order of the resources returned. Value should be a + // comma-separated list of fields. The default sorting order is ascending. To + // specify descending order for a field, append a `desc` suffix; for example: + // `name desc, update_time`. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter field that the list request will filter on. + // Possible filtersare described in https://google.aip.dev/160. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for the `ListGoogleApiSources` method. +message ListGoogleApiSourcesResponse { + // The requested GoogleApiSources, up to the number specified in `page_size`. + repeated GoogleApiSource google_api_sources = 1; + + // A page token that can be sent to `ListMessageBusEnrollments` to request the + // next page. If this is empty, then there are no more pages. + string next_page_token = 2; + + // Unreachable resources, if any. + repeated string unreachable = 3; +} + +// The request message for the CreateGoogleApiSource method. +message CreateGoogleApiSourceRequest { + // Required. The parent collection in which to add this google api source. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "eventarc.googleapis.com/GoogleApiSource" + } + ]; + + // Required. The google api source to create. + GoogleApiSource google_api_source = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The user-provided ID to be assigned to the GoogleApiSource. It + // should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + string google_api_source_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the UpdateGoogleApiSource method. +message UpdateGoogleApiSourceRequest { + // Required. The GoogleApiSource to be updated. + GoogleApiSource google_api_source = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The fields to be updated; only fields explicitly provided are + // updated. If no field mask is provided, all provided fields in the request + // are updated. To update all fields, provide a field mask of "*". + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, and the GoogleApiSource is not found, a new + // GoogleApiSource will be created. In this situation, `update_mask` is + // ignored. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for the DeleteGoogleApiSource method. +message DeleteGoogleApiSourceRequest { + // Required. The name of the GoogleApiSource to be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/GoogleApiSource" + } + ]; + + // Optional. If provided, the MessageBus will only be deleted if the etag + // matches the current etag on the resource. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, and the MessageBus is not found, the request will + // succeed but no action will be taken on the server. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and preview the review, but do not + // post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + // Represents the metadata of the long-running operation. message OperationMetadata { // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Server-defined resource path for the target of the operation. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -623,8 +1412,9 @@ 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 [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-eventarc/protos/google/cloud/eventarc/v1/google_api_source.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/google_api_source.proto new file mode 100644 index 00000000000..227d0a1e07b --- /dev/null +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/google_api_source.proto @@ -0,0 +1,101 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.eventarc.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/eventarc/v1/logging_config.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Eventarc.V1"; +option go_package = "cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb"; +option java_multiple_files = true; +option java_outer_classname = "GoogleApiSourceProto"; +option java_package = "com.google.cloud.eventarc.v1"; +option php_namespace = "Google\\Cloud\\Eventarc\\V1"; +option ruby_package = "Google::Cloud::Eventarc::V1"; + +// A GoogleApiSource represents a subscription of 1P events from a MessageBus. +message GoogleApiSource { + option (google.api.resource) = { + type: "eventarc.googleapis.com/GoogleApiSource" + pattern: "projects/{project}/locations/{location}/googleApiSources/{google_api_source}" + plural: "googleApiSources" + singular: "googleApiSource" + }; + + // Identifier. Resource name of the form + // projects/{project}/locations/{location}/googleApiSources/{google_api_source} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Server assigned unique identifier for the channel. The value + // is a UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. This checksum is computed by the server based on the value of + // other fields, and might be sent only on update and delete requests to + // ensure that the client has an up-to-date value before proceeding. + string etag = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The creation time. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last-modified time. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource annotations. + map annotations = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource display name. + string display_name = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Destination is the message bus that the GoogleApiSource is + // delivering to. It must be point to the full resource name of a MessageBus. + // Format: + // "projects/{PROJECT_ID}/locations/{region}/messagesBuses/{MESSAGE_BUS_ID) + string destination = 9 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/MessageBus" + } + ]; + + // Optional. Resource name of a KMS crypto key (managed by the user) used to + // encrypt/decrypt their event data. + // + // It must match the pattern + // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + string crypto_key_name = 10 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; + + // Optional. Config to control Platform logging for the GoogleApiSource. + LoggingConfig logging_config = 11 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/google_channel_config.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/google_channel_config.proto index 6cb3fec3b4c..00c15e82b5c 100644 --- a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/google_channel_config.proto +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/google_channel_config.proto @@ -49,7 +49,8 @@ message GoogleChannelConfig { string name = 1 [(google.api.field_behavior) = REQUIRED]; // Output only. The last-modified time. - google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Resource name of a KMS crypto key (managed by the user) used to // encrypt/decrypt their event data. diff --git a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/logging_config.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/logging_config.proto new file mode 100644 index 00000000000..aee5d152c14 --- /dev/null +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/logging_config.proto @@ -0,0 +1,76 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.eventarc.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.Eventarc.V1"; +option go_package = "cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb"; +option java_multiple_files = true; +option java_outer_classname = "LoggingConfigProto"; +option java_package = "com.google.cloud.eventarc.v1"; +option php_namespace = "Google\\Cloud\\Eventarc\\V1"; +option ruby_package = "Google::Cloud::Eventarc::V1"; + +// The configuration for Platform Telemetry logging for Eventarc Avdvanced +// resources. +message LoggingConfig { + // The different severities for logging supported by Eventarc Advanced + // resources. + // This enum is an exhaustive list of log severities and is FROZEN. Do not + // expect new values to be added. + enum LogSeverity { + // Log severity is not specified. This value is treated the same as NONE, + // but is used to distinguish between no update and update to NONE in + // update_masks. + LOG_SEVERITY_UNSPECIFIED = 0; + + // Default value at resource creation, presence of this value must be + // treated as no logging/disable logging. + NONE = 1; + + // Debug or trace level logging. + DEBUG = 2; + + // Routine information, such as ongoing status or performance. + INFO = 3; + + // Normal but significant events, such as start up, shut down, or a + // configuration change. + NOTICE = 4; + + // Warning events might cause problems. + WARNING = 5; + + // Error events are likely to cause problems. + ERROR = 6; + + // Critical events cause more severe problems or outages. + CRITICAL = 7; + + // A person must take action immediately. + ALERT = 8; + + // One or more systems are unusable. + EMERGENCY = 9; + } + + // Optional. The minimum severity of logs that will be sent to + // Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be + // sent, unless it is NONE. + LogSeverity log_severity = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/message_bus.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/message_bus.proto new file mode 100644 index 00000000000..0b6d8f8d1db --- /dev/null +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/message_bus.proto @@ -0,0 +1,91 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.eventarc.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/eventarc/v1/logging_config.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Eventarc.V1"; +option go_package = "cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb"; +option java_multiple_files = true; +option java_outer_classname = "MessageBusProto"; +option java_package = "com.google.cloud.eventarc.v1"; +option php_namespace = "Google\\Cloud\\Eventarc\\V1"; +option ruby_package = "Google::Cloud::Eventarc::V1"; + +// MessageBus for the messages flowing through the system. The admin has +// visibility and control over the messages being published and consumed and can +// restrict publishers and subscribers to only a subset of data available in the +// system by defining authorization policies. +message MessageBus { + option (google.api.resource) = { + type: "eventarc.googleapis.com/MessageBus" + pattern: "projects/{project}/locations/{location}/messageBuses/{message_bus}" + plural: "messageBuses" + singular: "messageBus" + }; + + // Identifier. Resource name of the form + // projects/{project}/locations/{location}/messageBuses/{message_bus} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Server assigned unique identifier for the channel. The value + // is a UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This checksum is computed by the server based on the value of + // other fields, and might be sent only on update and delete requests to + // ensure that the client has an up-to-date value before proceeding. + string etag = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The creation time. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last-modified time. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource annotations. + map annotations = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource display name. + string display_name = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource name of a KMS crypto key (managed by the user) used to + // encrypt/decrypt their event data. + // + // It must match the pattern + // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + string crypto_key_name = 10 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; + + // Optional. Config to control Platform logging for the Message Bus. This log + // configuration is applied to the Message Bus itself, and all the Enrollments + // attached to it. + LoggingConfig logging_config = 11 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/network_config.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/network_config.proto new file mode 100644 index 00000000000..f9a6fe93b3e --- /dev/null +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/network_config.proto @@ -0,0 +1,41 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.eventarc.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.Eventarc.V1"; +option go_package = "cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb"; +option java_multiple_files = true; +option java_outer_classname = "NetworkConfigProto"; +option java_package = "com.google.cloud.eventarc.v1"; +option php_namespace = "Google\\Cloud\\Eventarc\\V1"; +option ruby_package = "Google::Cloud::Eventarc::V1"; + +// Network Configuration that can be inherited by other protos. +message NetworkConfig { + // Required. Name of the NetworkAttachment that allows access to the + // customer's VPC. Format: + // `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` + string network_attachment = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/NetworkAttachment" + } + ]; +} diff --git a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/pipeline.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/pipeline.proto new file mode 100644 index 00000000000..9d1b3869afa --- /dev/null +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/pipeline.proto @@ -0,0 +1,604 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.eventarc.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/eventarc/v1/logging_config.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Eventarc.V1"; +option go_package = "cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb"; +option java_multiple_files = true; +option java_outer_classname = "PipelineProto"; +option java_package = "com.google.cloud.eventarc.v1"; +option php_namespace = "Google\\Cloud\\Eventarc\\V1"; +option ruby_package = "Google::Cloud::Eventarc::V1"; +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; + +// A representation of the Pipeline resource. +message Pipeline { + option (google.api.resource) = { + type: "eventarc.googleapis.com/Pipeline" + pattern: "projects/{project}/locations/{location}/pipelines/{pipeline}" + plural: "pipelines" + singular: "pipeline" + }; + + // Represents the format of message data. + message MessagePayloadFormat { + // The format of a JSON message payload. + message JsonFormat {} + + // The format of a Protobuf message payload. + message ProtobufFormat { + // Optional. The entire schema definition is stored in this field. + string schema_definition = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The format of an AVRO message payload. + message AvroFormat { + // Optional. The entire schema definition is stored in this field. + string schema_definition = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The kind of message format. + // One of Protobuf, Avro, and JSON supported. + // This allows specification of what specific format + // messages are sent and received. + oneof kind { + // Optional. Protobuf format. + ProtobufFormat protobuf = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Avro format. + AvroFormat avro = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. JSON format. + JsonFormat json = 3 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Represents a target of an invocation over HTTP. + message Destination { + // Represents a network config to be used for destination resolution and + // connectivity. + message NetworkConfig { + // Required. Name of the NetworkAttachment that allows access to the + // consumer VPC. Format: + // `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` + string network_attachment = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/NetworkAttachment" + } + ]; + } + + // Represents a HTTP endpoint destination. + message HttpEndpoint { + // Required. The URI of the HTTP enpdoint. + // + // The value must be a RFC2396 URI string. + // Examples: `https://svc.us-central1.p.local:8080/route`. + // Only the HTTPS protocol is supported. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The CEL expression used to modify how the destination-bound + // HTTP request is constructed. + // + // If a binding expression is not specified here, the message + // is treated as a CloudEvent and is mapped to the HTTP request according + // to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this + // representation, all fields except the `data` and `datacontenttype` + // field on the message are mapped to HTTP request headers with a prefix + // of `ce-`. + // + // To construct the HTTP request payload and the value of the content-type + // HTTP header, the payload format is defined as follows: + // 1) Use the output_payload_format_type on the Pipeline.Destination if it + // is set, else: + // 2) Use the input_payload_format_type on the Pipeline if it is set, + // else: + // 3) Treat the payload as opaque binary data. + // + // The `data` field of the message is converted to the payload format or + // left as-is for case 3) and then attached as the payload of the HTTP + // request. The `content-type` header on the HTTP request is set to the + // payload format type or left empty for case 3). However, if a mediation + // has updated the `datacontenttype` field on the message so that it is + // not the same as the payload format type but it is still a prefix of the + // payload format type, then the `content-type` header on the HTTP request + // is set to this `datacontenttype` value. For example, if the + // `datacontenttype` is "application/json" and the payload format type is + // "application/json; charset=utf-8", then the `content-type` header on + // the HTTP request is set to "application/json; charset=utf-8". + // + // If a non-empty binding expression is specified then this expression is + // used to modify the default CloudEvent HTTP Protocol Binding Binary + // Content representation. + // The result of the CEL expression must be a map of key/value pairs + // which is used as follows: + // - If a map named `headers` exists on the result of the expression, + // then its key/value pairs are directly mapped to the HTTP request + // headers. The headers values are constructed from the corresponding + // value type’s canonical representation. If the `headers` field doesn’t + // exist then the resulting HTTP request will be the headers of the + // CloudEvent HTTP Binding Binary Content Mode representation of the final + // message. Note: If the specified binding expression, has updated the + // `datacontenttype` field on the message so that it is not the same as + // the payload format type but it is still a prefix of the payload format + // type, then the `content-type` header in the `headers` map is set to + // this `datacontenttype` value. + // - If a field named `body` exists on the result of the expression then + // its value is directly mapped to the body of the request. If the value + // of the `body` field is of type bytes or string then it is used for + // the HTTP request body as-is, with no conversion. If the body field is + // of any other type then it is converted to a JSON string. If the body + // field does not exist then the resulting payload of the HTTP request + // will be data value of the CloudEvent HTTP Binding Binary Content Mode + // representation of the final message as described earlier. + // - Any other fields in the resulting expression will be ignored. + // + // The CEL expression may access the incoming CloudEvent message in its + // definition, as follows: + // - The `data` field of the incoming CloudEvent message can be accessed + // using the `message.data` value. Subfields of `message.data` may also be + // accessed if an input_payload_format has been specified on the Pipeline. + // - Each attribute of the incoming CloudEvent message can be accessed + // using the `message.` value, where is replaced with the + // name of the attribute. + // - Existing headers can be accessed in the CEL expression using the + // `headers` variable. The `headers` variable defines a map of key/value + // pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding + // Binary Content Mode representation of the final message as described + // earlier. For example, the following CEL expression can be used to + // construct an HTTP request by adding an additional header to the HTTP + // headers of the CloudEvent HTTP Binding Binary Content Mode + // representation of the final message and by overwriting the body of the + // request: + // + // ``` + // { + // "headers": headers.merge({"new-header-key": "new-header-value"}), + // "body": "new-body" + // } + // ``` + // + // Additionally, the following CEL extension functions are provided for + // use in this CEL expression: + // - toBase64Url: + // map.toBase64Url() -> string + // - Converts a CelValue to a base64url encoded string + // - toJsonString: map.toJsonString() -> string + // - Converts a CelValue to a JSON string + // - merge: + // map1.merge(map2) -> map3 + // - Merges the passed CEL map with the existing CEL map the + // function is applied to. + // - If the same key exists in both maps, if the key's value is type + // map both maps are merged else the value from the passed map is + // used. + // - denormalize: + // map.denormalize() -> map + // - Denormalizes a CEL map such that every value of type map or key + // in the map is expanded to return a single level map. + // - The resulting keys are "." separated indices of the map keys. + // - For example: + // { + // "a": 1, + // "b": { + // "c": 2, + // "d": 3 + // } + // "e": [4, 5] + // } + // .denormalize() + // -> { + // "a": 1, + // "b.c": 2, + // "b.d": 3, + // "e.0": 4, + // "e.1": 5 + // } + // - setField: + // map.setField(key, value) -> message + // - Sets the field of the message with the given key to the + // given value. + // - If the field is not present it will be added. + // - If the field is present it will be overwritten. + // - The key can be a dot separated path to set a field in a nested + // message. + // - Key must be of type string. + // - Value may be any valid type. + // - removeFields: + // map.removeFields([key1, key2, ...]) -> message + // - Removes the fields of the map with the given keys. + // - The keys can be a dot separated path to remove a field in a + // nested message. + // - If a key is not found it will be ignored. + // - Keys must be of type string. + // - toMap: + // [map1, map2, ...].toMap() -> map + // - Converts a CEL list of CEL maps to a single CEL map + // - toDestinationPayloadFormat(): + // message.data.toDestinationPayloadFormat() -> string or bytes + // - Converts the message data to the destination payload format + // specified in Pipeline.Destination.output_payload_format + // - This function is meant to be applied to the message.data field. + // - If the destination payload format is not set, the function will + // return the message data unchanged. + // - toCloudEventJsonWithPayloadFormat: + // message.toCloudEventJsonWithPayloadFormat() -> map + // - Converts a message to the corresponding structure of JSON + // format for CloudEvents + // - This function applies toDestinationPayloadFormat() to the + // message data. It also sets the corresponding datacontenttype of + // the CloudEvent, as indicated by + // Pipeline.Destination.output_payload_format. If no + // output_payload_format is set it will use the existing + // datacontenttype on the CloudEvent if present, else leave + // datacontenttype absent. + // - This function expects that the content of the message will + // adhere to the standard CloudEvent format. If it doesn’t then this + // function will fail. + // - The result is a CEL map that corresponds to the JSON + // representation of the CloudEvent. To convert that data to a JSON + // string it can be chained with the toJsonString function. + // + // The Pipeline expects that the message it receives adheres to the + // standard CloudEvent format. If it doesn’t then the outgoing message + // request may fail with a persistent error. + string message_binding_template = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents a config used to authenticate message requests. + message AuthenticationConfig { + // Represents a config used to authenticate with a Google OIDC token using + // a GCP service account. Use this authentication method to invoke your + // Cloud Run and Cloud Functions destinations or HTTP endpoints that + // support Google OIDC. + message OidcToken { + // Required. Service account email used to generate the OIDC Token. + // The principal who calls this API must have + // iam.serviceAccounts.actAs permission in the service account. See + // https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common + // for more information. Eventarc service agents must have + // roles/roles/iam.serviceAccountTokenCreator role to allow the + // Pipeline to create OpenID tokens for authenticated requests. + string service_account = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; + + // Optional. Audience to be used to generate the OIDC Token. The + // audience claim identifies the recipient that the JWT is intended for. + // If unspecified, the destination URI will be used. + string audience = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Contains information needed for generating an + // [OAuth token](https://developers.google.com/identity/protocols/OAuth2). + // This type of authorization should generally only be used when calling + // Google APIs hosted on *.googleapis.com. + message OAuthToken { + // Required. Service account email used to generate the [OAuth + // token](https://developers.google.com/identity/protocols/OAuth2). + // The principal who calls this API must have + // iam.serviceAccounts.actAs permission in the service account. See + // https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common + // for more information. Eventarc service agents must have + // roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline + // to create OAuth2 tokens for authenticated requests. + string service_account = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; + + // Optional. OAuth scope to be used for generating OAuth access token. + // If not specified, "https://www.googleapis.com/auth/cloud-platform" + // will be used. + string scope = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The type of authentication method. + oneof authentication_method_descriptor { + // Optional. This authenticate method will apply Google OIDC tokens + // signed by a GCP service account to the requests. + OidcToken google_oidc = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, an [OAuth + // token](https://developers.google.com/identity/protocols/OAuth2) will + // be generated and attached as an `Authorization` header in the HTTP + // request. + // + // This type of authorization should generally only be used when calling + // Google APIs hosted on *.googleapis.com. + OAuthToken oauth_token = 2 [(google.api.field_behavior) = OPTIONAL]; + } + } + + // Optional. Network config is used to configure how Pipeline resolves and + // connects to a destination. + NetworkConfig network_config = 1 [(google.api.field_behavior) = OPTIONAL]; + + // The destination identifier to which the request should be routed to. + oneof destination_descriptor { + // Optional. An HTTP endpoint destination described by an URI. + // If a DNS FQDN is provided as the endpoint, Pipeline will create a + // peering zone to the consumer VPC and forward DNS requests to the VPC + // specified by network config to resolve the service endpoint. See: + // https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones + HttpEndpoint http_endpoint = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource name of the Workflow whose Executions are + // triggered by the events. The Workflow resource should be deployed in + // the same project as the Pipeline. Format: + // `projects/{project}/locations/{location}/workflows/{workflow}` + string workflow = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "workflows.googleapis.com/Workflow" + } + ]; + + // Optional. The resource name of the Message Bus to which events should + // be published. The Message Bus resource should exist in the same project + // as the Pipeline. Format: + // `projects/{project}/locations/{location}/messageBuses/{message_bus}` + string message_bus = 4 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "eventarc.googleapis.com/MessageBus" + } + ]; + + // Optional. The resource name of the Pub/Sub topic to which events should + // be published. Format: + // `projects/{project}/locations/{location}/topics/{topic}` + string topic = 8 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Topic" + } + ]; + } + + // Optional. An authentication config used to authenticate message requests, + // such that destinations can verify the source. For example, this can be + // used with private GCP destinations that require GCP credentials to access + // like Cloud Run. This field is optional and should be set only by users + // interested in authenticated push + AuthenticationConfig authentication_config = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The message format before it is delivered to the destination. + // If not set, the message will be delivered in the format it was originally + // delivered to the Pipeline. This field can only be set if + // Pipeline.input_payload_format is also set. + MessagePayloadFormat output_payload_format = 6 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Mediation defines different ways to modify the Pipeline. + message Mediation { + // Transformation defines the way to transform an incoming message. + message Transformation { + // Optional. The CEL expression template to apply to transform messages. + // The following CEL extension functions are provided for + // use in this CEL expression: + // - merge: + // map1.merge(map2) -> map3 + // - Merges the passed CEL map with the existing CEL map the + // function is applied to. + // - If the same key exists in both maps, if the key's value is type + // map both maps are merged else the value from the passed map is + // used. + // - denormalize: + // map.denormalize() -> map + // - Denormalizes a CEL map such that every value of type map or key + // in the map is expanded to return a single level map. + // - The resulting keys are "." separated indices of the map keys. + // - For example: + // { + // "a": 1, + // "b": { + // "c": 2, + // "d": 3 + // } + // "e": [4, 5] + // } + // .denormalize() + // -> { + // "a": 1, + // "b.c": 2, + // "b.d": 3, + // "e.0": 4, + // "e.1": 5 + // } + // - setField: + // map.setField(key, value) -> message + // - Sets the field of the message with the given key to the + // given value. + // - If the field is not present it will be added. + // - If the field is present it will be overwritten. + // - The key can be a dot separated path to set a field in a nested + // message. + // - Key must be of type string. + // - Value may be any valid type. + // - removeFields: + // map.removeFields([key1, key2, ...]) -> message + // - Removes the fields of the map with the given keys. + // - The keys can be a dot separated path to remove a field in a + // nested message. + // - If a key is not found it will be ignored. + // - Keys must be of type string. + // - toMap: + // [map1, map2, ...].toMap() -> map + // - Converts a CEL list of CEL maps to a single CEL map + // - toDestinationPayloadFormat(): + // message.data.toDestinationPayloadFormat() -> string or bytes + // - Converts the message data to the destination payload format + // specified in Pipeline.Destination.output_payload_format + // - This function is meant to be applied to the message.data field. + // - If the destination payload format is not set, the function will + // return the message data unchanged. + // - toCloudEventJsonWithPayloadFormat: + // message.toCloudEventJsonWithPayloadFormat() -> map + // - Converts a message to the corresponding structure of JSON + // format for CloudEvents + // - This function applies toDestinationPayloadFormat() to the + // message data. It also sets the corresponding datacontenttype of + // the CloudEvent, as indicated by + // Pipeline.Destination.output_payload_format. If no + // output_payload_format is set it will use the existing + // datacontenttype on the CloudEvent if present, else leave + // datacontenttype absent. + // - This function expects that the content of the message will + // adhere to the standard CloudEvent format. If it doesn’t then this + // function will fail. + // - The result is a CEL map that corresponds to the JSON + // representation of the CloudEvent. To convert that data to a JSON + // string it can be chained with the toJsonString function. + string transformation_template = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The config of mediation. + oneof mediation_descriptor { + // Optional. How the Pipeline is to transform messages + Transformation transformation = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + } + + // The retry policy configuration for the Pipeline. The pipeline + // exponentially backs off in case the destination is non responsive or + // returns a retryable error code. The default semantics are as follows: + // The backoff starts with a 5 second delay and doubles the + // delay after each failed attempt (10 seconds, 20 seconds, 40 seconds, etc.). + // The delay is capped at 60 seconds by default. + // Please note that if you set the min_retry_delay and max_retry_delay fields + // to the same value this will make the duration between retries constant. + message RetryPolicy { + // Optional. The maximum number of delivery attempts for any message. The + // value must be between 1 and 100. The default value for this field is 5. + int32 max_attempts = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The minimum amount of seconds to wait between retry attempts. + // The value must be between 1 and 600. The default value for this field + // is 5. + google.protobuf.Duration min_retry_delay = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum amount of seconds to wait between retry attempts. + // The value must be between 1 and 600. The default value for this field + // is 60. + google.protobuf.Duration max_retry_delay = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Identifier. The resource name of the Pipeline. Must be unique within the + // location of the project and must be in + // `projects/{project}/locations/{location}/pipelines/{pipeline}` format. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The creation time. + // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up + // to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and + // "2014-10-02T15:01:23.045123456Z". + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last-modified time. + // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up + // to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and + // "2014-10-02T15:01:23.045123456Z". + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User labels attached to the Pipeline that can be used to group + // resources. An object containing a list of "key": value pairs. Example: { + // "name": "wrench", "mass": "1.3kg", "count": "3" }. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Server-assigned unique identifier for the Pipeline. The value + // is a UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. + string uid = 5 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. User-defined annotations. See + // https://google.aip.dev/128#annotations. + map annotations = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Display name of resource. + string display_name = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Required. List of destinations to which messages will be forwarded. + // Currently, exactly one destination is supported per Pipeline. + repeated Destination destinations = 8 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of mediation operations to be performed on the message. + // Currently, only one Transformation operation is allowed in each Pipeline. + repeated Mediation mediations = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource name of a KMS crypto key (managed by the user) used to + // encrypt/decrypt the event data. If not set, an internal Google-owned key + // will be used to encrypt messages. It must match the pattern + // "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}". + string crypto_key_name = 10 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; + + // Optional. The payload format expected for the messages received by the + // Pipeline. If input_payload_format is set then any messages not matching + // this format will be treated as persistent errors. If input_payload_format + // is not set, then the message data will be treated as an opaque binary and + // no output format can be set on the Pipeline through the + // Pipeline.Destination.output_payload_format field. Any Mediations on the + // Pipeline that involve access to the data field will fail as persistent + // errors. + MessagePayloadFormat input_payload_format = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Config to control Platform Logging for Pipelines. + LoggingConfig logging_config = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The retry policy to use in the pipeline. + RetryPolicy retry_policy = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. This checksum is computed by the server based on the value of + // other fields, and might be sent only on create requests to ensure that the + // client has an up-to-date value before proceeding. + string etag = 99; +} diff --git a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/trigger.proto b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/trigger.proto index 4f591a8e654..ff4870f7850 100644 --- a/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/trigger.proto +++ b/packages/google-cloud-eventarc/protos/google/cloud/eventarc/v1/trigger.proto @@ -18,6 +18,7 @@ package google.cloud.eventarc.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/eventarc/v1/network_config.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/code.proto"; @@ -41,7 +42,10 @@ option (google.api.resource_definition) = { type: "workflows.googleapis.com/Workflow" pattern: "projects/{project}/locations/{location}/workflows/{workflow}" }; - +option (google.api.resource_definition) = { + type: "compute.googleapis.com/NetworkAttachment" + pattern: "projects/{project}/regions/{region}/networkAttachments/{networkattachment}" +}; // A representation of the trigger resource. message Trigger { @@ -52,23 +56,27 @@ message Trigger { singular: "trigger" }; - // Required. The resource name of the trigger. Must be unique within the location of the - // project and must be in + // Required. The resource name of the trigger. Must be unique within the + // location of the project and must be in // `projects/{project}/locations/{location}/triggers/{trigger}` format. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Output only. Server-assigned unique identifier for the trigger. The value is a UUID4 - // string and guaranteed to remain unchanged until the resource is deleted. + // Output only. Server-assigned unique identifier for the trigger. The value + // is a UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The creation time. - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last-modified time. - google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. Unordered list. The list of filters that applies to event attributes. Only events that - // match all the provided filters are sent to the destination. + // Required. Unordered list. The list of filters that applies to event + // attributes. Only events that match all the provided filters are sent to the + // destination. repeated EventFilter event_filters = 8 [ (google.api.field_behavior) = UNORDERED_LIST, (google.api.field_behavior) = REQUIRED @@ -77,17 +85,11 @@ message Trigger { // Optional. The IAM service account email associated with the trigger. The // service account represents the identity of the trigger. // - // The principal who calls this API must have the `iam.serviceAccounts.actAs` - // permission in the service account. See - // https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common - // for more information. - // - // For Cloud Run destinations, this service account is used to generate - // identity tokens when invoking the service. See - // https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account - // for information on how to invoke authenticated Cloud Run services. - // To create Audit Log triggers, the service account should also - // have the `roles/eventarc.eventReceiver` IAM role. + // The `iam.serviceAccounts.actAs` permission must be granted on the service + // account to allow a principal to impersonate the service account. For more + // information, see the + // [Roles and permissions](/eventarc/docs/all-roles-permissions) page specific + // to the trigger destination. string service_account = 9 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { @@ -98,13 +100,14 @@ message Trigger { // Required. Destination specifies where the events should be sent to. Destination destination = 10 [(google.api.field_behavior) = REQUIRED]; - // Optional. To deliver messages, Eventarc might use other GCP + // Optional. To deliver messages, Eventarc might use other Google Cloud // products as a transport intermediary. This field contains a reference to // that transport intermediary. This information can be used for debugging // purposes. Transport transport = 11 [(google.api.field_behavior) = OPTIONAL]; - // Optional. User labels attached to the triggers that can be used to group resources. + // Optional. User labels attached to the triggers that can be used to group + // resources. map labels = 12 [(google.api.field_behavior) = OPTIONAL]; // Optional. The name of the channel associated with the trigger in @@ -113,18 +116,30 @@ message Trigger { string channel = 13 [(google.api.field_behavior) = OPTIONAL]; // Output only. The reason(s) why a trigger is in FAILED state. - map conditions = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + map conditions = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. This checksum is computed by the server based on the value of other - // fields, and might be sent only on create requests to ensure that the + // Optional. EventDataContentType specifies the type of payload in MIME + // format that is expected from the CloudEvent data field. This is set to + // `application/json` if the value is not defined. + string event_data_content_type = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Whether or not this Trigger satisfies the requirements of + // physical zone separation + bool satisfies_pzs = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This checksum is computed by the server based on the value of + // other fields, and might be sent only on create requests to ensure that the // client has an up-to-date value before proceeding. string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Filters events based on exact matches on the CloudEvents attributes. message EventFilter { - // Required. The name of a CloudEvents attribute. Currently, only a subset of attributes - // are supported for filtering. + // Required. The name of a CloudEvents attribute. Currently, only a subset of + // attributes are supported for filtering. You can [retrieve a specific + // provider's supported event + // types](/eventarc/docs/list-providers#describe-provider). // // All triggers MUST provide a filter for the 'type' attribute. string attribute = 1 [(google.api.field_behavior) = REQUIRED]; @@ -134,8 +149,9 @@ message EventFilter { // Optional. The operator used for matching the events with the value of the // filter. If not specified, only events that have an exact key-value pair - // specified in the filter are matched. The only allowed value is - // `match-path-pattern`. + // specified in the filter are matched. The allowed values are `path_pattern` + // and `match-path-pattern`. `path_pattern` is only allowed for GCFv1 + // triggers. string operator = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -155,11 +171,16 @@ message Destination { // should be in the same project as the trigger. CloudRun cloud_run = 1; - // The Cloud Function resource name. Only Cloud Functions V2 is supported. + // The Cloud Function resource name. Cloud Functions V1 and V2 are + // supported. // Format: `projects/{project}/locations/{location}/functions/{function}` + // + // This is a read-only field. Creating Cloud Functions V1/V2 triggers is + // only supported via the Cloud Functions product. An error will be returned + // if the user sets this value. string cloud_function = 2 [(google.api.resource_reference) = { - type: "cloudfunctions.googleapis.com/CloudFunction" - }]; + type: "cloudfunctions.googleapis.com/CloudFunction" + }]; // A GKE service capable of receiving events. The service should be running // in the same project as the trigger. @@ -170,9 +191,17 @@ message Destination { // as the trigger. // Format: `projects/{project}/locations/{location}/workflows/{workflow}` string workflow = 4 [(google.api.resource_reference) = { - type: "workflows.googleapis.com/Workflow" - }]; + type: "workflows.googleapis.com/Workflow" + }]; + + // An HTTP endpoint destination described by an URI. + HttpEndpoint http_endpoint = 5; } + + // Optional. Network config is used to configure how Eventarc resolves and + // connect to a destination. + // This should only be used with HttpEndpoint destination type. + NetworkConfig network_config = 6 [(google.api.field_behavior) = OPTIONAL]; } // Represents the transport intermediaries created for the trigger to @@ -194,12 +223,11 @@ message CloudRun { // can be addressed. string service = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Service" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Service" } ]; - // Optional. The relative path on the Cloud Run service the events should be sent to. + // Optional. The relative path on the Cloud Run service the events should be + // sent to. // // The value must conform to the definition of a URI path segment (section 3.3 // of RFC2396). Examples: "/route", "route", "route/subroute". @@ -211,13 +239,14 @@ message CloudRun { // Represents a GKE destination. message GKE { - // Required. The name of the cluster the GKE service is running in. The cluster must be - // running in the same project as the trigger being created. + // Required. The name of the cluster the GKE service is running in. The + // cluster must be running in the same project as the trigger being created. string cluster = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The name of the Google Compute Engine in which the cluster resides, which - // can either be compute zone (for example, us-central1-a) for the zonal - // clusters or region (for example, us-central1) for regional clusters. + // Required. The name of the Google Compute Engine in which the cluster + // resides, which can either be compute zone (for example, us-central1-a) for + // the zonal clusters or region (for example, us-central1) for regional + // clusters. string location = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The namespace the GKE service is running in. @@ -226,7 +255,8 @@ message GKE { // Required. Name of the GKE service. string service = 4 [(google.api.field_behavior) = REQUIRED]; - // Optional. The relative path on the GKE service the events should be sent to. + // Optional. The relative path on the GKE service the events should be sent + // to. // // The value must conform to the definition of a URI path segment (section 3.3 // of RFC2396). Examples: "/route", "route", "route/subroute". @@ -244,8 +274,21 @@ message Pubsub { // here is not deleted by Eventarc at trigger deletion. string topic = 1 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The name of the Pub/Sub subscription created and managed by Eventarc - // as a transport for the event delivery. Format: + // Output only. The name of the Pub/Sub subscription created and managed by + // Eventarc as a transport for the event delivery. Format: // `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. string subscription = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Represents a HTTP endpoint destination. +message HttpEndpoint { + // Required. The URI of the HTTP enpdoint. + // + // The value must be a RFC2396 URI string. + // Examples: `http://10.10.10.8:80/route`, + // `http://svc.us-central1.p.local:8080/`. + // Only HTTP and HTTPS protocols are supported. The host can be either a + // static IP addressable from the VPC specified by the network config, or + // an internal DNS hostname of the service resolvable via Cloud DNS. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-eventarc/protos/protos.d.ts b/packages/google-cloud-eventarc/protos/protos.d.ts index 3c2846b8383..e8de969b84d 100644 --- a/packages/google-cloud-eventarc/protos/protos.d.ts +++ b/packages/google-cloud-eventarc/protos/protos.d.ts @@ -55,6 +55,9 @@ export namespace google { /** Channel cryptoKeyName */ cryptoKeyName?: (string|null); + + /** Channel satisfiesPzs */ + satisfiesPzs?: (boolean|null); } /** Represents a Channel. */ @@ -93,6 +96,9 @@ export namespace google { /** Channel cryptoKeyName. */ public cryptoKeyName: string; + /** Channel satisfiesPzs. */ + public satisfiesPzs: boolean; + /** Channel transport. */ public transport?: "pubsubTopic"; @@ -651,6 +657,163 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an Enrollment. */ + interface IEnrollment { + + /** Enrollment name */ + name?: (string|null); + + /** Enrollment uid */ + uid?: (string|null); + + /** Enrollment etag */ + etag?: (string|null); + + /** Enrollment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Enrollment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Enrollment labels */ + labels?: ({ [k: string]: string }|null); + + /** Enrollment annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Enrollment displayName */ + displayName?: (string|null); + + /** Enrollment celMatch */ + celMatch?: (string|null); + + /** Enrollment messageBus */ + messageBus?: (string|null); + + /** Enrollment destination */ + destination?: (string|null); + } + + /** Represents an Enrollment. */ + class Enrollment implements IEnrollment { + + /** + * Constructs a new Enrollment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IEnrollment); + + /** Enrollment name. */ + public name: string; + + /** Enrollment uid. */ + public uid: string; + + /** Enrollment etag. */ + public etag: string; + + /** Enrollment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Enrollment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Enrollment labels. */ + public labels: { [k: string]: string }; + + /** Enrollment annotations. */ + public annotations: { [k: string]: string }; + + /** Enrollment displayName. */ + public displayName: string; + + /** Enrollment celMatch. */ + public celMatch: string; + + /** Enrollment messageBus. */ + public messageBus: string; + + /** Enrollment destination. */ + public destination: string; + + /** + * Creates a new Enrollment instance using the specified properties. + * @param [properties] Properties to set + * @returns Enrollment instance + */ + public static create(properties?: google.cloud.eventarc.v1.IEnrollment): google.cloud.eventarc.v1.Enrollment; + + /** + * Encodes the specified Enrollment message. Does not implicitly {@link google.cloud.eventarc.v1.Enrollment.verify|verify} messages. + * @param message Enrollment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IEnrollment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Enrollment message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Enrollment.verify|verify} messages. + * @param message Enrollment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IEnrollment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Enrollment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Enrollment + * @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.eventarc.v1.Enrollment; + + /** + * Decodes an Enrollment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Enrollment + * @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.eventarc.v1.Enrollment; + + /** + * Verifies an Enrollment 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 Enrollment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Enrollment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Enrollment; + + /** + * Creates a plain object from an Enrollment message. Also converts values to other types if specified. + * @param message Enrollment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Enrollment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Enrollment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Enrollment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents an Eventarc */ class Eventarc extends $protobuf.rpc.Service { @@ -922,2747 +1085,8057 @@ export namespace google { * @returns Promise */ public updateGoogleChannelConfig(request: google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest): Promise; - } - - namespace Eventarc { /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getTrigger}. - * @param error Error, if any - * @param [response] Trigger + * Calls GetMessageBus. + * @param request GetMessageBusRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MessageBus */ - type GetTriggerCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.Trigger) => void; + public getMessageBus(request: google.cloud.eventarc.v1.IGetMessageBusRequest, callback: google.cloud.eventarc.v1.Eventarc.GetMessageBusCallback): void; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listTriggers}. - * @param error Error, if any - * @param [response] ListTriggersResponse + * Calls GetMessageBus. + * @param request GetMessageBusRequest message or plain object + * @returns Promise */ - type ListTriggersCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListTriggersResponse) => void; + public getMessageBus(request: google.cloud.eventarc.v1.IGetMessageBusRequest): Promise; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createTrigger}. - * @param error Error, if any - * @param [response] Operation + * Calls ListMessageBuses. + * @param request ListMessageBusesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMessageBusesResponse */ - type CreateTriggerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public listMessageBuses(request: google.cloud.eventarc.v1.IListMessageBusesRequest, callback: google.cloud.eventarc.v1.Eventarc.ListMessageBusesCallback): void; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateTrigger}. - * @param error Error, if any - * @param [response] Operation + * Calls ListMessageBuses. + * @param request ListMessageBusesRequest message or plain object + * @returns Promise */ - type UpdateTriggerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public listMessageBuses(request: google.cloud.eventarc.v1.IListMessageBusesRequest): Promise; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteTrigger}. - * @param error Error, if any - * @param [response] Operation + * Calls ListMessageBusEnrollments. + * @param request ListMessageBusEnrollmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMessageBusEnrollmentsResponse */ - type DeleteTriggerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public listMessageBusEnrollments(request: google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, callback: google.cloud.eventarc.v1.Eventarc.ListMessageBusEnrollmentsCallback): void; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getChannel}. - * @param error Error, if any - * @param [response] Channel + * Calls ListMessageBusEnrollments. + * @param request ListMessageBusEnrollmentsRequest message or plain object + * @returns Promise */ - type GetChannelCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.Channel) => void; + public listMessageBusEnrollments(request: google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest): Promise; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listChannels}. - * @param error Error, if any - * @param [response] ListChannelsResponse + * Calls CreateMessageBus. + * @param request CreateMessageBusRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - type ListChannelsCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListChannelsResponse) => void; + public createMessageBus(request: google.cloud.eventarc.v1.ICreateMessageBusRequest, callback: google.cloud.eventarc.v1.Eventarc.CreateMessageBusCallback): void; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createChannel}. - * @param error Error, if any - * @param [response] Operation + * Calls CreateMessageBus. + * @param request CreateMessageBusRequest message or plain object + * @returns Promise */ - type CreateChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public createMessageBus(request: google.cloud.eventarc.v1.ICreateMessageBusRequest): Promise; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateChannel}. - * @param error Error, if any - * @param [response] Operation + * Calls UpdateMessageBus. + * @param request UpdateMessageBusRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - type UpdateChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public updateMessageBus(request: google.cloud.eventarc.v1.IUpdateMessageBusRequest, callback: google.cloud.eventarc.v1.Eventarc.UpdateMessageBusCallback): void; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteChannel}. - * @param error Error, if any - * @param [response] Operation + * Calls UpdateMessageBus. + * @param request UpdateMessageBusRequest message or plain object + * @returns Promise */ - type DeleteChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public updateMessageBus(request: google.cloud.eventarc.v1.IUpdateMessageBusRequest): Promise; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getProvider}. - * @param error Error, if any - * @param [response] Provider + * Calls DeleteMessageBus. + * @param request DeleteMessageBusRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - type GetProviderCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.Provider) => void; + public deleteMessageBus(request: google.cloud.eventarc.v1.IDeleteMessageBusRequest, callback: google.cloud.eventarc.v1.Eventarc.DeleteMessageBusCallback): void; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listProviders}. - * @param error Error, if any - * @param [response] ListProvidersResponse + * Calls DeleteMessageBus. + * @param request DeleteMessageBusRequest message or plain object + * @returns Promise */ - type ListProvidersCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListProvidersResponse) => void; + public deleteMessageBus(request: google.cloud.eventarc.v1.IDeleteMessageBusRequest): Promise; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getChannelConnection}. - * @param error Error, if any - * @param [response] ChannelConnection + * Calls GetEnrollment. + * @param request GetEnrollmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Enrollment */ - type GetChannelConnectionCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ChannelConnection) => void; + public getEnrollment(request: google.cloud.eventarc.v1.IGetEnrollmentRequest, callback: google.cloud.eventarc.v1.Eventarc.GetEnrollmentCallback): void; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listChannelConnections}. - * @param error Error, if any - * @param [response] ListChannelConnectionsResponse + * Calls GetEnrollment. + * @param request GetEnrollmentRequest message or plain object + * @returns Promise */ - type ListChannelConnectionsCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListChannelConnectionsResponse) => void; + public getEnrollment(request: google.cloud.eventarc.v1.IGetEnrollmentRequest): Promise; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createChannelConnection}. - * @param error Error, if any - * @param [response] Operation + * Calls ListEnrollments. + * @param request ListEnrollmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEnrollmentsResponse */ - type CreateChannelConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public listEnrollments(request: google.cloud.eventarc.v1.IListEnrollmentsRequest, callback: google.cloud.eventarc.v1.Eventarc.ListEnrollmentsCallback): void; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteChannelConnection}. - * @param error Error, if any - * @param [response] Operation + * Calls ListEnrollments. + * @param request ListEnrollmentsRequest message or plain object + * @returns Promise */ - type DeleteChannelConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public listEnrollments(request: google.cloud.eventarc.v1.IListEnrollmentsRequest): Promise; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getGoogleChannelConfig}. - * @param error Error, if any - * @param [response] GoogleChannelConfig + * Calls CreateEnrollment. + * @param request CreateEnrollmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - type GetGoogleChannelConfigCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.GoogleChannelConfig) => void; + public createEnrollment(request: google.cloud.eventarc.v1.ICreateEnrollmentRequest, callback: google.cloud.eventarc.v1.Eventarc.CreateEnrollmentCallback): void; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateGoogleChannelConfig}. - * @param error Error, if any - * @param [response] GoogleChannelConfig + * Calls CreateEnrollment. + * @param request CreateEnrollmentRequest message or plain object + * @returns Promise */ - type UpdateGoogleChannelConfigCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.GoogleChannelConfig) => void; - } - - /** Properties of a GetTriggerRequest. */ - interface IGetTriggerRequest { - - /** GetTriggerRequest name */ - name?: (string|null); - } - - /** Represents a GetTriggerRequest. */ - class GetTriggerRequest implements IGetTriggerRequest { + public createEnrollment(request: google.cloud.eventarc.v1.ICreateEnrollmentRequest): Promise; /** - * Constructs a new GetTriggerRequest. - * @param [properties] Properties to set + * Calls UpdateEnrollment. + * @param request UpdateEnrollmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - constructor(properties?: google.cloud.eventarc.v1.IGetTriggerRequest); - - /** GetTriggerRequest name. */ - public name: string; + public updateEnrollment(request: google.cloud.eventarc.v1.IUpdateEnrollmentRequest, callback: google.cloud.eventarc.v1.Eventarc.UpdateEnrollmentCallback): void; /** - * Creates a new GetTriggerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTriggerRequest instance + * Calls UpdateEnrollment. + * @param request UpdateEnrollmentRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.eventarc.v1.IGetTriggerRequest): google.cloud.eventarc.v1.GetTriggerRequest; + public updateEnrollment(request: google.cloud.eventarc.v1.IUpdateEnrollmentRequest): Promise; /** - * Encodes the specified GetTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetTriggerRequest.verify|verify} messages. - * @param message GetTriggerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteEnrollment. + * @param request DeleteEnrollmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encode(message: google.cloud.eventarc.v1.IGetTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteEnrollment(request: google.cloud.eventarc.v1.IDeleteEnrollmentRequest, callback: google.cloud.eventarc.v1.Eventarc.DeleteEnrollmentCallback): void; /** - * Encodes the specified GetTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetTriggerRequest.verify|verify} messages. - * @param message GetTriggerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteEnrollment. + * @param request DeleteEnrollmentRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IGetTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteEnrollment(request: google.cloud.eventarc.v1.IDeleteEnrollmentRequest): Promise; /** - * Decodes a GetTriggerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTriggerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetPipeline. + * @param request GetPipelineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Pipeline */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.GetTriggerRequest; + public getPipeline(request: google.cloud.eventarc.v1.IGetPipelineRequest, callback: google.cloud.eventarc.v1.Eventarc.GetPipelineCallback): void; /** - * Decodes a GetTriggerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTriggerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetPipeline. + * @param request GetPipelineRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.GetTriggerRequest; + public getPipeline(request: google.cloud.eventarc.v1.IGetPipelineRequest): Promise; /** - * Verifies a GetTriggerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListPipelines. + * @param request ListPipelinesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPipelinesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listPipelines(request: google.cloud.eventarc.v1.IListPipelinesRequest, callback: google.cloud.eventarc.v1.Eventarc.ListPipelinesCallback): void; /** - * Creates a GetTriggerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTriggerRequest + * Calls ListPipelines. + * @param request ListPipelinesRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetTriggerRequest; + public listPipelines(request: google.cloud.eventarc.v1.IListPipelinesRequest): Promise; /** - * Creates a plain object from a GetTriggerRequest message. Also converts values to other types if specified. - * @param message GetTriggerRequest - * @param [options] Conversion options - * @returns Plain object + * Calls CreatePipeline. + * @param request CreatePipelineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static toObject(message: google.cloud.eventarc.v1.GetTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createPipeline(request: google.cloud.eventarc.v1.ICreatePipelineRequest, callback: google.cloud.eventarc.v1.Eventarc.CreatePipelineCallback): void; /** - * Converts this GetTriggerRequest to JSON. - * @returns JSON object + * Calls CreatePipeline. + * @param request CreatePipelineRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public createPipeline(request: google.cloud.eventarc.v1.ICreatePipelineRequest): Promise; /** - * Gets the default type url for GetTriggerRequest + * Calls UpdatePipeline. + * @param request UpdatePipelineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updatePipeline(request: google.cloud.eventarc.v1.IUpdatePipelineRequest, callback: google.cloud.eventarc.v1.Eventarc.UpdatePipelineCallback): void; + + /** + * Calls UpdatePipeline. + * @param request UpdatePipelineRequest message or plain object + * @returns Promise + */ + public updatePipeline(request: google.cloud.eventarc.v1.IUpdatePipelineRequest): Promise; + + /** + * Calls DeletePipeline. + * @param request DeletePipelineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deletePipeline(request: google.cloud.eventarc.v1.IDeletePipelineRequest, callback: google.cloud.eventarc.v1.Eventarc.DeletePipelineCallback): void; + + /** + * Calls DeletePipeline. + * @param request DeletePipelineRequest message or plain object + * @returns Promise + */ + public deletePipeline(request: google.cloud.eventarc.v1.IDeletePipelineRequest): Promise; + + /** + * Calls GetGoogleApiSource. + * @param request GetGoogleApiSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GoogleApiSource + */ + public getGoogleApiSource(request: google.cloud.eventarc.v1.IGetGoogleApiSourceRequest, callback: google.cloud.eventarc.v1.Eventarc.GetGoogleApiSourceCallback): void; + + /** + * Calls GetGoogleApiSource. + * @param request GetGoogleApiSourceRequest message or plain object + * @returns Promise + */ + public getGoogleApiSource(request: google.cloud.eventarc.v1.IGetGoogleApiSourceRequest): Promise; + + /** + * Calls ListGoogleApiSources. + * @param request ListGoogleApiSourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListGoogleApiSourcesResponse + */ + public listGoogleApiSources(request: google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, callback: google.cloud.eventarc.v1.Eventarc.ListGoogleApiSourcesCallback): void; + + /** + * Calls ListGoogleApiSources. + * @param request ListGoogleApiSourcesRequest message or plain object + * @returns Promise + */ + public listGoogleApiSources(request: google.cloud.eventarc.v1.IListGoogleApiSourcesRequest): Promise; + + /** + * Calls CreateGoogleApiSource. + * @param request CreateGoogleApiSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createGoogleApiSource(request: google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest, callback: google.cloud.eventarc.v1.Eventarc.CreateGoogleApiSourceCallback): void; + + /** + * Calls CreateGoogleApiSource. + * @param request CreateGoogleApiSourceRequest message or plain object + * @returns Promise + */ + public createGoogleApiSource(request: google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest): Promise; + + /** + * Calls UpdateGoogleApiSource. + * @param request UpdateGoogleApiSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateGoogleApiSource(request: google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest, callback: google.cloud.eventarc.v1.Eventarc.UpdateGoogleApiSourceCallback): void; + + /** + * Calls UpdateGoogleApiSource. + * @param request UpdateGoogleApiSourceRequest message or plain object + * @returns Promise + */ + public updateGoogleApiSource(request: google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest): Promise; + + /** + * Calls DeleteGoogleApiSource. + * @param request DeleteGoogleApiSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteGoogleApiSource(request: google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest, callback: google.cloud.eventarc.v1.Eventarc.DeleteGoogleApiSourceCallback): void; + + /** + * Calls DeleteGoogleApiSource. + * @param request DeleteGoogleApiSourceRequest message or plain object + * @returns Promise + */ + public deleteGoogleApiSource(request: google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest): Promise; + } + + namespace Eventarc { + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getTrigger}. + * @param error Error, if any + * @param [response] Trigger + */ + type GetTriggerCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.Trigger) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listTriggers}. + * @param error Error, if any + * @param [response] ListTriggersResponse + */ + type ListTriggersCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListTriggersResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createTrigger}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateTriggerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateTrigger}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateTriggerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteTrigger}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteTriggerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getChannel}. + * @param error Error, if any + * @param [response] Channel + */ + type GetChannelCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.Channel) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listChannels}. + * @param error Error, if any + * @param [response] ListChannelsResponse + */ + type ListChannelsCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListChannelsResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createChannel}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateChannel}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteChannel}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteChannelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getProvider}. + * @param error Error, if any + * @param [response] Provider + */ + type GetProviderCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.Provider) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listProviders}. + * @param error Error, if any + * @param [response] ListProvidersResponse + */ + type ListProvidersCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListProvidersResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getChannelConnection}. + * @param error Error, if any + * @param [response] ChannelConnection + */ + type GetChannelConnectionCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ChannelConnection) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listChannelConnections}. + * @param error Error, if any + * @param [response] ListChannelConnectionsResponse + */ + type ListChannelConnectionsCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListChannelConnectionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createChannelConnection}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateChannelConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteChannelConnection}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteChannelConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getGoogleChannelConfig}. + * @param error Error, if any + * @param [response] GoogleChannelConfig + */ + type GetGoogleChannelConfigCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.GoogleChannelConfig) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateGoogleChannelConfig}. + * @param error Error, if any + * @param [response] GoogleChannelConfig + */ + type UpdateGoogleChannelConfigCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.GoogleChannelConfig) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getMessageBus}. + * @param error Error, if any + * @param [response] MessageBus + */ + type GetMessageBusCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.MessageBus) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listMessageBuses}. + * @param error Error, if any + * @param [response] ListMessageBusesResponse + */ + type ListMessageBusesCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListMessageBusesResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listMessageBusEnrollments}. + * @param error Error, if any + * @param [response] ListMessageBusEnrollmentsResponse + */ + type ListMessageBusEnrollmentsCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createMessageBus}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateMessageBusCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateMessageBus}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateMessageBusCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteMessageBus}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteMessageBusCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getEnrollment}. + * @param error Error, if any + * @param [response] Enrollment + */ + type GetEnrollmentCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.Enrollment) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listEnrollments}. + * @param error Error, if any + * @param [response] ListEnrollmentsResponse + */ + type ListEnrollmentsCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListEnrollmentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createEnrollment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateEnrollmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateEnrollment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateEnrollmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteEnrollment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteEnrollmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getPipeline}. + * @param error Error, if any + * @param [response] Pipeline + */ + type GetPipelineCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.Pipeline) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listPipelines}. + * @param error Error, if any + * @param [response] ListPipelinesResponse + */ + type ListPipelinesCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListPipelinesResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createPipeline}. + * @param error Error, if any + * @param [response] Operation + */ + type CreatePipelineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updatePipeline}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdatePipelineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deletePipeline}. + * @param error Error, if any + * @param [response] Operation + */ + type DeletePipelineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getGoogleApiSource}. + * @param error Error, if any + * @param [response] GoogleApiSource + */ + type GetGoogleApiSourceCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.GoogleApiSource) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listGoogleApiSources}. + * @param error Error, if any + * @param [response] ListGoogleApiSourcesResponse + */ + type ListGoogleApiSourcesCallback = (error: (Error|null), response?: google.cloud.eventarc.v1.ListGoogleApiSourcesResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createGoogleApiSource}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateGoogleApiSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateGoogleApiSource}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateGoogleApiSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteGoogleApiSource}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteGoogleApiSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a GetTriggerRequest. */ + interface IGetTriggerRequest { + + /** GetTriggerRequest name */ + name?: (string|null); + } + + /** Represents a GetTriggerRequest. */ + class GetTriggerRequest implements IGetTriggerRequest { + + /** + * Constructs a new GetTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IGetTriggerRequest); + + /** GetTriggerRequest name. */ + public name: string; + + /** + * Creates a new GetTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTriggerRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IGetTriggerRequest): google.cloud.eventarc.v1.GetTriggerRequest; + + /** + * Encodes the specified GetTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetTriggerRequest.verify|verify} messages. + * @param message GetTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IGetTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetTriggerRequest.verify|verify} messages. + * @param message GetTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IGetTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTriggerRequest + * @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.eventarc.v1.GetTriggerRequest; + + /** + * Decodes a GetTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTriggerRequest + * @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.eventarc.v1.GetTriggerRequest; + + /** + * Verifies a GetTriggerRequest 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 GetTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetTriggerRequest; + + /** + * Creates a plain object from a GetTriggerRequest message. Also converts values to other types if specified. + * @param message GetTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.GetTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTriggersRequest. */ + interface IListTriggersRequest { + + /** ListTriggersRequest parent */ + parent?: (string|null); + + /** ListTriggersRequest pageSize */ + pageSize?: (number|null); + + /** ListTriggersRequest pageToken */ + pageToken?: (string|null); + + /** ListTriggersRequest orderBy */ + orderBy?: (string|null); + + /** ListTriggersRequest filter */ + filter?: (string|null); + } + + /** Represents a ListTriggersRequest. */ + class ListTriggersRequest implements IListTriggersRequest { + + /** + * Constructs a new ListTriggersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListTriggersRequest); + + /** ListTriggersRequest parent. */ + public parent: string; + + /** ListTriggersRequest pageSize. */ + public pageSize: number; + + /** ListTriggersRequest pageToken. */ + public pageToken: string; + + /** ListTriggersRequest orderBy. */ + public orderBy: string; + + /** ListTriggersRequest filter. */ + public filter: string; + + /** + * Creates a new ListTriggersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTriggersRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListTriggersRequest): google.cloud.eventarc.v1.ListTriggersRequest; + + /** + * Encodes the specified ListTriggersRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersRequest.verify|verify} messages. + * @param message ListTriggersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListTriggersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTriggersRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersRequest.verify|verify} messages. + * @param message ListTriggersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListTriggersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTriggersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTriggersRequest + * @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.eventarc.v1.ListTriggersRequest; + + /** + * Decodes a ListTriggersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTriggersRequest + * @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.eventarc.v1.ListTriggersRequest; + + /** + * Verifies a ListTriggersRequest 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 ListTriggersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTriggersRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListTriggersRequest; + + /** + * Creates a plain object from a ListTriggersRequest message. Also converts values to other types if specified. + * @param message ListTriggersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListTriggersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTriggersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTriggersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTriggersResponse. */ + interface IListTriggersResponse { + + /** ListTriggersResponse triggers */ + triggers?: (google.cloud.eventarc.v1.ITrigger[]|null); + + /** ListTriggersResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListTriggersResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListTriggersResponse. */ + class ListTriggersResponse implements IListTriggersResponse { + + /** + * Constructs a new ListTriggersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListTriggersResponse); + + /** ListTriggersResponse triggers. */ + public triggers: google.cloud.eventarc.v1.ITrigger[]; + + /** ListTriggersResponse nextPageToken. */ + public nextPageToken: string; + + /** ListTriggersResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListTriggersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTriggersResponse instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListTriggersResponse): google.cloud.eventarc.v1.ListTriggersResponse; + + /** + * Encodes the specified ListTriggersResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersResponse.verify|verify} messages. + * @param message ListTriggersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListTriggersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTriggersResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersResponse.verify|verify} messages. + * @param message ListTriggersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListTriggersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTriggersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTriggersResponse + * @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.eventarc.v1.ListTriggersResponse; + + /** + * Decodes a ListTriggersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTriggersResponse + * @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.eventarc.v1.ListTriggersResponse; + + /** + * Verifies a ListTriggersResponse 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 ListTriggersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTriggersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListTriggersResponse; + + /** + * Creates a plain object from a ListTriggersResponse message. Also converts values to other types if specified. + * @param message ListTriggersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListTriggersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTriggersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTriggersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateTriggerRequest. */ + interface ICreateTriggerRequest { + + /** CreateTriggerRequest parent */ + parent?: (string|null); + + /** CreateTriggerRequest trigger */ + trigger?: (google.cloud.eventarc.v1.ITrigger|null); + + /** CreateTriggerRequest triggerId */ + triggerId?: (string|null); + + /** CreateTriggerRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateTriggerRequest. */ + class CreateTriggerRequest implements ICreateTriggerRequest { + + /** + * Constructs a new CreateTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.ICreateTriggerRequest); + + /** CreateTriggerRequest parent. */ + public parent: string; + + /** CreateTriggerRequest trigger. */ + public trigger?: (google.cloud.eventarc.v1.ITrigger|null); + + /** CreateTriggerRequest triggerId. */ + public triggerId: string; + + /** CreateTriggerRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTriggerRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.ICreateTriggerRequest): google.cloud.eventarc.v1.CreateTriggerRequest; + + /** + * Encodes the specified CreateTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateTriggerRequest.verify|verify} messages. + * @param message CreateTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.ICreateTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateTriggerRequest.verify|verify} messages. + * @param message CreateTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.ICreateTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTriggerRequest + * @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.eventarc.v1.CreateTriggerRequest; + + /** + * Decodes a CreateTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTriggerRequest + * @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.eventarc.v1.CreateTriggerRequest; + + /** + * Verifies a CreateTriggerRequest 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 CreateTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.CreateTriggerRequest; + + /** + * Creates a plain object from a CreateTriggerRequest message. Also converts values to other types if specified. + * @param message CreateTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.CreateTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateTriggerRequest. */ + interface IUpdateTriggerRequest { + + /** UpdateTriggerRequest trigger */ + trigger?: (google.cloud.eventarc.v1.ITrigger|null); + + /** UpdateTriggerRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTriggerRequest allowMissing */ + allowMissing?: (boolean|null); + + /** UpdateTriggerRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateTriggerRequest. */ + class UpdateTriggerRequest implements IUpdateTriggerRequest { + + /** + * Constructs a new UpdateTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IUpdateTriggerRequest); + + /** UpdateTriggerRequest trigger. */ + public trigger?: (google.cloud.eventarc.v1.ITrigger|null); + + /** UpdateTriggerRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateTriggerRequest allowMissing. */ + public allowMissing: boolean; + + /** UpdateTriggerRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTriggerRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IUpdateTriggerRequest): google.cloud.eventarc.v1.UpdateTriggerRequest; + + /** + * Encodes the specified UpdateTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateTriggerRequest.verify|verify} messages. + * @param message UpdateTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IUpdateTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateTriggerRequest.verify|verify} messages. + * @param message UpdateTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IUpdateTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTriggerRequest + * @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.eventarc.v1.UpdateTriggerRequest; + + /** + * Decodes an UpdateTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTriggerRequest + * @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.eventarc.v1.UpdateTriggerRequest; + + /** + * Verifies an UpdateTriggerRequest 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 UpdateTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.UpdateTriggerRequest; + + /** + * Creates a plain object from an UpdateTriggerRequest message. Also converts values to other types if specified. + * @param message UpdateTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.UpdateTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteTriggerRequest. */ + interface IDeleteTriggerRequest { + + /** DeleteTriggerRequest name */ + name?: (string|null); + + /** DeleteTriggerRequest etag */ + etag?: (string|null); + + /** DeleteTriggerRequest allowMissing */ + allowMissing?: (boolean|null); + + /** DeleteTriggerRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a DeleteTriggerRequest. */ + class DeleteTriggerRequest implements IDeleteTriggerRequest { + + /** + * Constructs a new DeleteTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IDeleteTriggerRequest); + + /** DeleteTriggerRequest name. */ + public name: string; + + /** DeleteTriggerRequest etag. */ + public etag: string; + + /** DeleteTriggerRequest allowMissing. */ + public allowMissing: boolean; + + /** DeleteTriggerRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new DeleteTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTriggerRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IDeleteTriggerRequest): google.cloud.eventarc.v1.DeleteTriggerRequest; + + /** + * Encodes the specified DeleteTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteTriggerRequest.verify|verify} messages. + * @param message DeleteTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IDeleteTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteTriggerRequest.verify|verify} messages. + * @param message DeleteTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IDeleteTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTriggerRequest + * @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.eventarc.v1.DeleteTriggerRequest; + + /** + * Decodes a DeleteTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTriggerRequest + * @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.eventarc.v1.DeleteTriggerRequest; + + /** + * Verifies a DeleteTriggerRequest 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 DeleteTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.DeleteTriggerRequest; + + /** + * Creates a plain object from a DeleteTriggerRequest message. Also converts values to other types if specified. + * @param message DeleteTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.DeleteTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetChannelRequest. */ + interface IGetChannelRequest { + + /** GetChannelRequest name */ + name?: (string|null); + } + + /** Represents a GetChannelRequest. */ + class GetChannelRequest implements IGetChannelRequest { + + /** + * Constructs a new GetChannelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IGetChannelRequest); + + /** GetChannelRequest name. */ + public name: string; + + /** + * Creates a new GetChannelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetChannelRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IGetChannelRequest): google.cloud.eventarc.v1.GetChannelRequest; + + /** + * Encodes the specified GetChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelRequest.verify|verify} messages. + * @param message GetChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IGetChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelRequest.verify|verify} messages. + * @param message GetChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IGetChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetChannelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetChannelRequest + * @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.eventarc.v1.GetChannelRequest; + + /** + * Decodes a GetChannelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetChannelRequest + * @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.eventarc.v1.GetChannelRequest; + + /** + * Verifies a GetChannelRequest 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 GetChannelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetChannelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetChannelRequest; + + /** + * Creates a plain object from a GetChannelRequest message. Also converts values to other types if specified. + * @param message GetChannelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.GetChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetChannelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetChannelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListChannelsRequest. */ + interface IListChannelsRequest { + + /** ListChannelsRequest parent */ + parent?: (string|null); + + /** ListChannelsRequest pageSize */ + pageSize?: (number|null); + + /** ListChannelsRequest pageToken */ + pageToken?: (string|null); + + /** ListChannelsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListChannelsRequest. */ + class ListChannelsRequest implements IListChannelsRequest { + + /** + * Constructs a new ListChannelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListChannelsRequest); + + /** ListChannelsRequest parent. */ + public parent: string; + + /** ListChannelsRequest pageSize. */ + public pageSize: number; + + /** ListChannelsRequest pageToken. */ + public pageToken: string; + + /** ListChannelsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListChannelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListChannelsRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListChannelsRequest): google.cloud.eventarc.v1.ListChannelsRequest; + + /** + * Encodes the specified ListChannelsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsRequest.verify|verify} messages. + * @param message ListChannelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListChannelsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsRequest.verify|verify} messages. + * @param message ListChannelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListChannelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListChannelsRequest + * @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.eventarc.v1.ListChannelsRequest; + + /** + * Decodes a ListChannelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListChannelsRequest + * @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.eventarc.v1.ListChannelsRequest; + + /** + * Verifies a ListChannelsRequest 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 ListChannelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListChannelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListChannelsRequest; + + /** + * Creates a plain object from a ListChannelsRequest message. Also converts values to other types if specified. + * @param message ListChannelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListChannelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListChannelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListChannelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListChannelsResponse. */ + interface IListChannelsResponse { + + /** ListChannelsResponse channels */ + channels?: (google.cloud.eventarc.v1.IChannel[]|null); + + /** ListChannelsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListChannelsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListChannelsResponse. */ + class ListChannelsResponse implements IListChannelsResponse { + + /** + * Constructs a new ListChannelsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListChannelsResponse); + + /** ListChannelsResponse channels. */ + public channels: google.cloud.eventarc.v1.IChannel[]; + + /** ListChannelsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListChannelsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListChannelsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListChannelsResponse instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListChannelsResponse): google.cloud.eventarc.v1.ListChannelsResponse; + + /** + * Encodes the specified ListChannelsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsResponse.verify|verify} messages. + * @param message ListChannelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListChannelsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsResponse.verify|verify} messages. + * @param message ListChannelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListChannelsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListChannelsResponse + * @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.eventarc.v1.ListChannelsResponse; + + /** + * Decodes a ListChannelsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListChannelsResponse + * @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.eventarc.v1.ListChannelsResponse; + + /** + * Verifies a ListChannelsResponse 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 ListChannelsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListChannelsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListChannelsResponse; + + /** + * Creates a plain object from a ListChannelsResponse message. Also converts values to other types if specified. + * @param message ListChannelsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListChannelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListChannelsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListChannelsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateChannelRequest. */ + interface ICreateChannelRequest { + + /** CreateChannelRequest parent */ + parent?: (string|null); + + /** CreateChannelRequest channel */ + channel?: (google.cloud.eventarc.v1.IChannel|null); + + /** CreateChannelRequest channelId */ + channelId?: (string|null); + + /** CreateChannelRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateChannelRequest. */ + class CreateChannelRequest implements ICreateChannelRequest { + + /** + * Constructs a new CreateChannelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.ICreateChannelRequest); + + /** CreateChannelRequest parent. */ + public parent: string; + + /** CreateChannelRequest channel. */ + public channel?: (google.cloud.eventarc.v1.IChannel|null); + + /** CreateChannelRequest channelId. */ + public channelId: string; + + /** CreateChannelRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateChannelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateChannelRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.ICreateChannelRequest): google.cloud.eventarc.v1.CreateChannelRequest; + + /** + * Encodes the specified CreateChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelRequest.verify|verify} messages. + * @param message CreateChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.ICreateChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelRequest.verify|verify} messages. + * @param message CreateChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.ICreateChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateChannelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateChannelRequest + * @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.eventarc.v1.CreateChannelRequest; + + /** + * Decodes a CreateChannelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateChannelRequest + * @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.eventarc.v1.CreateChannelRequest; + + /** + * Verifies a CreateChannelRequest 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 CreateChannelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateChannelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.CreateChannelRequest; + + /** + * Creates a plain object from a CreateChannelRequest message. Also converts values to other types if specified. + * @param message CreateChannelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.CreateChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateChannelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateChannelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateChannelRequest. */ + interface IUpdateChannelRequest { + + /** UpdateChannelRequest channel */ + channel?: (google.cloud.eventarc.v1.IChannel|null); + + /** UpdateChannelRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateChannelRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateChannelRequest. */ + class UpdateChannelRequest implements IUpdateChannelRequest { + + /** + * Constructs a new UpdateChannelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IUpdateChannelRequest); + + /** UpdateChannelRequest channel. */ + public channel?: (google.cloud.eventarc.v1.IChannel|null); + + /** UpdateChannelRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateChannelRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateChannelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateChannelRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IUpdateChannelRequest): google.cloud.eventarc.v1.UpdateChannelRequest; + + /** + * Encodes the specified UpdateChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateChannelRequest.verify|verify} messages. + * @param message UpdateChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IUpdateChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateChannelRequest.verify|verify} messages. + * @param message UpdateChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IUpdateChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateChannelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateChannelRequest + * @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.eventarc.v1.UpdateChannelRequest; + + /** + * Decodes an UpdateChannelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateChannelRequest + * @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.eventarc.v1.UpdateChannelRequest; + + /** + * Verifies an UpdateChannelRequest 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 UpdateChannelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateChannelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.UpdateChannelRequest; + + /** + * Creates a plain object from an UpdateChannelRequest message. Also converts values to other types if specified. + * @param message UpdateChannelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.UpdateChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateChannelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateChannelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteChannelRequest. */ + interface IDeleteChannelRequest { + + /** DeleteChannelRequest name */ + name?: (string|null); + + /** DeleteChannelRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a DeleteChannelRequest. */ + class DeleteChannelRequest implements IDeleteChannelRequest { + + /** + * Constructs a new DeleteChannelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IDeleteChannelRequest); + + /** DeleteChannelRequest name. */ + public name: string; + + /** DeleteChannelRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new DeleteChannelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteChannelRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IDeleteChannelRequest): google.cloud.eventarc.v1.DeleteChannelRequest; + + /** + * Encodes the specified DeleteChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelRequest.verify|verify} messages. + * @param message DeleteChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IDeleteChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelRequest.verify|verify} messages. + * @param message DeleteChannelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IDeleteChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteChannelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteChannelRequest + * @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.eventarc.v1.DeleteChannelRequest; + + /** + * Decodes a DeleteChannelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteChannelRequest + * @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.eventarc.v1.DeleteChannelRequest; + + /** + * Verifies a DeleteChannelRequest 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 DeleteChannelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteChannelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.DeleteChannelRequest; + + /** + * Creates a plain object from a DeleteChannelRequest message. Also converts values to other types if specified. + * @param message DeleteChannelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.DeleteChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteChannelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteChannelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetProviderRequest. */ + interface IGetProviderRequest { + + /** GetProviderRequest name */ + name?: (string|null); + } + + /** Represents a GetProviderRequest. */ + class GetProviderRequest implements IGetProviderRequest { + + /** + * Constructs a new GetProviderRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IGetProviderRequest); + + /** GetProviderRequest name. */ + public name: string; + + /** + * Creates a new GetProviderRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetProviderRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IGetProviderRequest): google.cloud.eventarc.v1.GetProviderRequest; + + /** + * Encodes the specified GetProviderRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetProviderRequest.verify|verify} messages. + * @param message GetProviderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IGetProviderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetProviderRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetProviderRequest.verify|verify} messages. + * @param message GetProviderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IGetProviderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetProviderRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetProviderRequest + * @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.eventarc.v1.GetProviderRequest; + + /** + * Decodes a GetProviderRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetProviderRequest + * @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.eventarc.v1.GetProviderRequest; + + /** + * Verifies a GetProviderRequest 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 GetProviderRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetProviderRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetProviderRequest; + + /** + * Creates a plain object from a GetProviderRequest message. Also converts values to other types if specified. + * @param message GetProviderRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.GetProviderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetProviderRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetProviderRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListProvidersRequest. */ + interface IListProvidersRequest { + + /** ListProvidersRequest parent */ + parent?: (string|null); + + /** ListProvidersRequest pageSize */ + pageSize?: (number|null); + + /** ListProvidersRequest pageToken */ + pageToken?: (string|null); + + /** ListProvidersRequest orderBy */ + orderBy?: (string|null); + + /** ListProvidersRequest filter */ + filter?: (string|null); + } + + /** Represents a ListProvidersRequest. */ + class ListProvidersRequest implements IListProvidersRequest { + + /** + * Constructs a new ListProvidersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListProvidersRequest); + + /** ListProvidersRequest parent. */ + public parent: string; + + /** ListProvidersRequest pageSize. */ + public pageSize: number; + + /** ListProvidersRequest pageToken. */ + public pageToken: string; + + /** ListProvidersRequest orderBy. */ + public orderBy: string; + + /** ListProvidersRequest filter. */ + public filter: string; + + /** + * Creates a new ListProvidersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListProvidersRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListProvidersRequest): google.cloud.eventarc.v1.ListProvidersRequest; + + /** + * Encodes the specified ListProvidersRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersRequest.verify|verify} messages. + * @param message ListProvidersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListProvidersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListProvidersRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersRequest.verify|verify} messages. + * @param message ListProvidersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListProvidersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListProvidersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListProvidersRequest + * @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.eventarc.v1.ListProvidersRequest; + + /** + * Decodes a ListProvidersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListProvidersRequest + * @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.eventarc.v1.ListProvidersRequest; + + /** + * Verifies a ListProvidersRequest 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 ListProvidersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListProvidersRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListProvidersRequest; + + /** + * Creates a plain object from a ListProvidersRequest message. Also converts values to other types if specified. + * @param message ListProvidersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListProvidersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListProvidersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListProvidersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListProvidersResponse. */ + interface IListProvidersResponse { + + /** ListProvidersResponse providers */ + providers?: (google.cloud.eventarc.v1.IProvider[]|null); + + /** ListProvidersResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListProvidersResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListProvidersResponse. */ + class ListProvidersResponse implements IListProvidersResponse { + + /** + * Constructs a new ListProvidersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListProvidersResponse); + + /** ListProvidersResponse providers. */ + public providers: google.cloud.eventarc.v1.IProvider[]; + + /** ListProvidersResponse nextPageToken. */ + public nextPageToken: string; + + /** ListProvidersResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListProvidersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListProvidersResponse instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListProvidersResponse): google.cloud.eventarc.v1.ListProvidersResponse; + + /** + * Encodes the specified ListProvidersResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersResponse.verify|verify} messages. + * @param message ListProvidersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListProvidersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListProvidersResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersResponse.verify|verify} messages. + * @param message ListProvidersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListProvidersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListProvidersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListProvidersResponse + * @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.eventarc.v1.ListProvidersResponse; + + /** + * Decodes a ListProvidersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListProvidersResponse + * @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.eventarc.v1.ListProvidersResponse; + + /** + * Verifies a ListProvidersResponse 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 ListProvidersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListProvidersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListProvidersResponse; + + /** + * Creates a plain object from a ListProvidersResponse message. Also converts values to other types if specified. + * @param message ListProvidersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListProvidersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListProvidersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListProvidersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetChannelConnectionRequest. */ + interface IGetChannelConnectionRequest { + + /** GetChannelConnectionRequest name */ + name?: (string|null); + } + + /** Represents a GetChannelConnectionRequest. */ + class GetChannelConnectionRequest implements IGetChannelConnectionRequest { + + /** + * Constructs a new GetChannelConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IGetChannelConnectionRequest); + + /** GetChannelConnectionRequest name. */ + public name: string; + + /** + * Creates a new GetChannelConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetChannelConnectionRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IGetChannelConnectionRequest): google.cloud.eventarc.v1.GetChannelConnectionRequest; + + /** + * Encodes the specified GetChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelConnectionRequest.verify|verify} messages. + * @param message GetChannelConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IGetChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelConnectionRequest.verify|verify} messages. + * @param message GetChannelConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IGetChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetChannelConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetChannelConnectionRequest + * @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.eventarc.v1.GetChannelConnectionRequest; + + /** + * Decodes a GetChannelConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetChannelConnectionRequest + * @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.eventarc.v1.GetChannelConnectionRequest; + + /** + * Verifies a GetChannelConnectionRequest 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 GetChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetChannelConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetChannelConnectionRequest; + + /** + * Creates a plain object from a GetChannelConnectionRequest message. Also converts values to other types if specified. + * @param message GetChannelConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.GetChannelConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetChannelConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetChannelConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListChannelConnectionsRequest. */ + interface IListChannelConnectionsRequest { + + /** ListChannelConnectionsRequest parent */ + parent?: (string|null); + + /** ListChannelConnectionsRequest pageSize */ + pageSize?: (number|null); + + /** ListChannelConnectionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListChannelConnectionsRequest. */ + class ListChannelConnectionsRequest implements IListChannelConnectionsRequest { + + /** + * Constructs a new ListChannelConnectionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListChannelConnectionsRequest); + + /** ListChannelConnectionsRequest parent. */ + public parent: string; + + /** ListChannelConnectionsRequest pageSize. */ + public pageSize: number; + + /** ListChannelConnectionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListChannelConnectionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListChannelConnectionsRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListChannelConnectionsRequest): google.cloud.eventarc.v1.ListChannelConnectionsRequest; + + /** + * Encodes the specified ListChannelConnectionsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsRequest.verify|verify} messages. + * @param message ListChannelConnectionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListChannelConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListChannelConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsRequest.verify|verify} messages. + * @param message ListChannelConnectionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListChannelConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListChannelConnectionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListChannelConnectionsRequest + * @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.eventarc.v1.ListChannelConnectionsRequest; + + /** + * Decodes a ListChannelConnectionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListChannelConnectionsRequest + * @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.eventarc.v1.ListChannelConnectionsRequest; + + /** + * Verifies a ListChannelConnectionsRequest 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 ListChannelConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListChannelConnectionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListChannelConnectionsRequest; + + /** + * Creates a plain object from a ListChannelConnectionsRequest message. Also converts values to other types if specified. + * @param message ListChannelConnectionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListChannelConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListChannelConnectionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListChannelConnectionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListChannelConnectionsResponse. */ + interface IListChannelConnectionsResponse { + + /** ListChannelConnectionsResponse channelConnections */ + channelConnections?: (google.cloud.eventarc.v1.IChannelConnection[]|null); + + /** ListChannelConnectionsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListChannelConnectionsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListChannelConnectionsResponse. */ + class ListChannelConnectionsResponse implements IListChannelConnectionsResponse { + + /** + * Constructs a new ListChannelConnectionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListChannelConnectionsResponse); + + /** ListChannelConnectionsResponse channelConnections. */ + public channelConnections: google.cloud.eventarc.v1.IChannelConnection[]; + + /** ListChannelConnectionsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListChannelConnectionsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListChannelConnectionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListChannelConnectionsResponse instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListChannelConnectionsResponse): google.cloud.eventarc.v1.ListChannelConnectionsResponse; + + /** + * Encodes the specified ListChannelConnectionsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsResponse.verify|verify} messages. + * @param message ListChannelConnectionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListChannelConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListChannelConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsResponse.verify|verify} messages. + * @param message ListChannelConnectionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListChannelConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListChannelConnectionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListChannelConnectionsResponse + * @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.eventarc.v1.ListChannelConnectionsResponse; + + /** + * Decodes a ListChannelConnectionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListChannelConnectionsResponse + * @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.eventarc.v1.ListChannelConnectionsResponse; + + /** + * Verifies a ListChannelConnectionsResponse 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 ListChannelConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListChannelConnectionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListChannelConnectionsResponse; + + /** + * Creates a plain object from a ListChannelConnectionsResponse message. Also converts values to other types if specified. + * @param message ListChannelConnectionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListChannelConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListChannelConnectionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListChannelConnectionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateChannelConnectionRequest. */ + interface ICreateChannelConnectionRequest { + + /** CreateChannelConnectionRequest parent */ + parent?: (string|null); + + /** CreateChannelConnectionRequest channelConnection */ + channelConnection?: (google.cloud.eventarc.v1.IChannelConnection|null); + + /** CreateChannelConnectionRequest channelConnectionId */ + channelConnectionId?: (string|null); + } + + /** Represents a CreateChannelConnectionRequest. */ + class CreateChannelConnectionRequest implements ICreateChannelConnectionRequest { + + /** + * Constructs a new CreateChannelConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.ICreateChannelConnectionRequest); + + /** CreateChannelConnectionRequest parent. */ + public parent: string; + + /** CreateChannelConnectionRequest channelConnection. */ + public channelConnection?: (google.cloud.eventarc.v1.IChannelConnection|null); + + /** CreateChannelConnectionRequest channelConnectionId. */ + public channelConnectionId: string; + + /** + * Creates a new CreateChannelConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateChannelConnectionRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.ICreateChannelConnectionRequest): google.cloud.eventarc.v1.CreateChannelConnectionRequest; + + /** + * Encodes the specified CreateChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelConnectionRequest.verify|verify} messages. + * @param message CreateChannelConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.ICreateChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelConnectionRequest.verify|verify} messages. + * @param message CreateChannelConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.ICreateChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateChannelConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateChannelConnectionRequest + * @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.eventarc.v1.CreateChannelConnectionRequest; + + /** + * Decodes a CreateChannelConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateChannelConnectionRequest + * @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.eventarc.v1.CreateChannelConnectionRequest; + + /** + * Verifies a CreateChannelConnectionRequest 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 CreateChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateChannelConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.CreateChannelConnectionRequest; + + /** + * Creates a plain object from a CreateChannelConnectionRequest message. Also converts values to other types if specified. + * @param message CreateChannelConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.CreateChannelConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateChannelConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateChannelConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteChannelConnectionRequest. */ + interface IDeleteChannelConnectionRequest { + + /** DeleteChannelConnectionRequest name */ + name?: (string|null); + } + + /** Represents a DeleteChannelConnectionRequest. */ + class DeleteChannelConnectionRequest implements IDeleteChannelConnectionRequest { + + /** + * Constructs a new DeleteChannelConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IDeleteChannelConnectionRequest); + + /** DeleteChannelConnectionRequest name. */ + public name: string; + + /** + * Creates a new DeleteChannelConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteChannelConnectionRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IDeleteChannelConnectionRequest): google.cloud.eventarc.v1.DeleteChannelConnectionRequest; + + /** + * Encodes the specified DeleteChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelConnectionRequest.verify|verify} messages. + * @param message DeleteChannelConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelConnectionRequest.verify|verify} messages. + * @param message DeleteChannelConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteChannelConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteChannelConnectionRequest + * @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.eventarc.v1.DeleteChannelConnectionRequest; + + /** + * Decodes a DeleteChannelConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteChannelConnectionRequest + * @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.eventarc.v1.DeleteChannelConnectionRequest; + + /** + * Verifies a DeleteChannelConnectionRequest 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 DeleteChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteChannelConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.DeleteChannelConnectionRequest; + + /** + * Creates a plain object from a DeleteChannelConnectionRequest message. Also converts values to other types if specified. + * @param message DeleteChannelConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.DeleteChannelConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteChannelConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteChannelConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGoogleChannelConfigRequest. */ + interface IUpdateGoogleChannelConfigRequest { + + /** UpdateGoogleChannelConfigRequest googleChannelConfig */ + googleChannelConfig?: (google.cloud.eventarc.v1.IGoogleChannelConfig|null); + + /** UpdateGoogleChannelConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateGoogleChannelConfigRequest. */ + class UpdateGoogleChannelConfigRequest implements IUpdateGoogleChannelConfigRequest { + + /** + * Constructs a new UpdateGoogleChannelConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest); + + /** UpdateGoogleChannelConfigRequest googleChannelConfig. */ + public googleChannelConfig?: (google.cloud.eventarc.v1.IGoogleChannelConfig|null); + + /** UpdateGoogleChannelConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateGoogleChannelConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGoogleChannelConfigRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest): google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest; + + /** + * Encodes the specified UpdateGoogleChannelConfigRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.verify|verify} messages. + * @param message UpdateGoogleChannelConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateGoogleChannelConfigRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.verify|verify} messages. + * @param message UpdateGoogleChannelConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateGoogleChannelConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGoogleChannelConfigRequest + * @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.eventarc.v1.UpdateGoogleChannelConfigRequest; + + /** + * Decodes an UpdateGoogleChannelConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGoogleChannelConfigRequest + * @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.eventarc.v1.UpdateGoogleChannelConfigRequest; + + /** + * Verifies an UpdateGoogleChannelConfigRequest 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 UpdateGoogleChannelConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGoogleChannelConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest; + + /** + * Creates a plain object from an UpdateGoogleChannelConfigRequest message. Also converts values to other types if specified. + * @param message UpdateGoogleChannelConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateGoogleChannelConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGoogleChannelConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetGoogleChannelConfigRequest. */ + interface IGetGoogleChannelConfigRequest { + + /** GetGoogleChannelConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetGoogleChannelConfigRequest. */ + class GetGoogleChannelConfigRequest implements IGetGoogleChannelConfigRequest { + + /** + * Constructs a new GetGoogleChannelConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest); + + /** GetGoogleChannelConfigRequest name. */ + public name: string; + + /** + * Creates a new GetGoogleChannelConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetGoogleChannelConfigRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest): google.cloud.eventarc.v1.GetGoogleChannelConfigRequest; + + /** + * Encodes the specified GetGoogleChannelConfigRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleChannelConfigRequest.verify|verify} messages. + * @param message GetGoogleChannelConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetGoogleChannelConfigRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleChannelConfigRequest.verify|verify} messages. + * @param message GetGoogleChannelConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetGoogleChannelConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetGoogleChannelConfigRequest + * @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.eventarc.v1.GetGoogleChannelConfigRequest; + + /** + * Decodes a GetGoogleChannelConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetGoogleChannelConfigRequest + * @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.eventarc.v1.GetGoogleChannelConfigRequest; + + /** + * Verifies a GetGoogleChannelConfigRequest 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 GetGoogleChannelConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetGoogleChannelConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetGoogleChannelConfigRequest; + + /** + * Creates a plain object from a GetGoogleChannelConfigRequest message. Also converts values to other types if specified. + * @param message GetGoogleChannelConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.GetGoogleChannelConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetGoogleChannelConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetGoogleChannelConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMessageBusRequest. */ + interface IGetMessageBusRequest { + + /** GetMessageBusRequest name */ + name?: (string|null); + } + + /** Represents a GetMessageBusRequest. */ + class GetMessageBusRequest implements IGetMessageBusRequest { + + /** + * Constructs a new GetMessageBusRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IGetMessageBusRequest); + + /** GetMessageBusRequest name. */ + public name: string; + + /** + * Creates a new GetMessageBusRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMessageBusRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IGetMessageBusRequest): google.cloud.eventarc.v1.GetMessageBusRequest; + + /** + * Encodes the specified GetMessageBusRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetMessageBusRequest.verify|verify} messages. + * @param message GetMessageBusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IGetMessageBusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMessageBusRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetMessageBusRequest.verify|verify} messages. + * @param message GetMessageBusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IGetMessageBusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMessageBusRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMessageBusRequest + * @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.eventarc.v1.GetMessageBusRequest; + + /** + * Decodes a GetMessageBusRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMessageBusRequest + * @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.eventarc.v1.GetMessageBusRequest; + + /** + * Verifies a GetMessageBusRequest 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 GetMessageBusRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMessageBusRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetMessageBusRequest; + + /** + * Creates a plain object from a GetMessageBusRequest message. Also converts values to other types if specified. + * @param message GetMessageBusRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.GetMessageBusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMessageBusRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMessageBusRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMessageBusesRequest. */ + interface IListMessageBusesRequest { + + /** ListMessageBusesRequest parent */ + parent?: (string|null); + + /** ListMessageBusesRequest pageSize */ + pageSize?: (number|null); + + /** ListMessageBusesRequest pageToken */ + pageToken?: (string|null); + + /** ListMessageBusesRequest orderBy */ + orderBy?: (string|null); + + /** ListMessageBusesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListMessageBusesRequest. */ + class ListMessageBusesRequest implements IListMessageBusesRequest { + + /** + * Constructs a new ListMessageBusesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListMessageBusesRequest); + + /** ListMessageBusesRequest parent. */ + public parent: string; + + /** ListMessageBusesRequest pageSize. */ + public pageSize: number; + + /** ListMessageBusesRequest pageToken. */ + public pageToken: string; + + /** ListMessageBusesRequest orderBy. */ + public orderBy: string; + + /** ListMessageBusesRequest filter. */ + public filter: string; + + /** + * Creates a new ListMessageBusesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessageBusesRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListMessageBusesRequest): google.cloud.eventarc.v1.ListMessageBusesRequest; + + /** + * Encodes the specified ListMessageBusesRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusesRequest.verify|verify} messages. + * @param message ListMessageBusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListMessageBusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessageBusesRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusesRequest.verify|verify} messages. + * @param message ListMessageBusesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListMessageBusesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessageBusesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessageBusesRequest + * @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.eventarc.v1.ListMessageBusesRequest; + + /** + * Decodes a ListMessageBusesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessageBusesRequest + * @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.eventarc.v1.ListMessageBusesRequest; + + /** + * Verifies a ListMessageBusesRequest 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 ListMessageBusesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessageBusesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListMessageBusesRequest; + + /** + * Creates a plain object from a ListMessageBusesRequest message. Also converts values to other types if specified. + * @param message ListMessageBusesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListMessageBusesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessageBusesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMessageBusesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMessageBusesResponse. */ + interface IListMessageBusesResponse { + + /** ListMessageBusesResponse messageBuses */ + messageBuses?: (google.cloud.eventarc.v1.IMessageBus[]|null); + + /** ListMessageBusesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMessageBusesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListMessageBusesResponse. */ + class ListMessageBusesResponse implements IListMessageBusesResponse { + + /** + * Constructs a new ListMessageBusesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListMessageBusesResponse); + + /** ListMessageBusesResponse messageBuses. */ + public messageBuses: google.cloud.eventarc.v1.IMessageBus[]; + + /** ListMessageBusesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMessageBusesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListMessageBusesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessageBusesResponse instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListMessageBusesResponse): google.cloud.eventarc.v1.ListMessageBusesResponse; + + /** + * Encodes the specified ListMessageBusesResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusesResponse.verify|verify} messages. + * @param message ListMessageBusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListMessageBusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessageBusesResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusesResponse.verify|verify} messages. + * @param message ListMessageBusesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListMessageBusesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessageBusesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessageBusesResponse + * @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.eventarc.v1.ListMessageBusesResponse; + + /** + * Decodes a ListMessageBusesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessageBusesResponse + * @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.eventarc.v1.ListMessageBusesResponse; + + /** + * Verifies a ListMessageBusesResponse 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 ListMessageBusesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessageBusesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListMessageBusesResponse; + + /** + * Creates a plain object from a ListMessageBusesResponse message. Also converts values to other types if specified. + * @param message ListMessageBusesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListMessageBusesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessageBusesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMessageBusesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMessageBusEnrollmentsRequest. */ + interface IListMessageBusEnrollmentsRequest { + + /** ListMessageBusEnrollmentsRequest parent */ + parent?: (string|null); + + /** ListMessageBusEnrollmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListMessageBusEnrollmentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMessageBusEnrollmentsRequest. */ + class ListMessageBusEnrollmentsRequest implements IListMessageBusEnrollmentsRequest { + + /** + * Constructs a new ListMessageBusEnrollmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest); + + /** ListMessageBusEnrollmentsRequest parent. */ + public parent: string; + + /** ListMessageBusEnrollmentsRequest pageSize. */ + public pageSize: number; + + /** ListMessageBusEnrollmentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMessageBusEnrollmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessageBusEnrollmentsRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest): google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest; + + /** + * Encodes the specified ListMessageBusEnrollmentsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest.verify|verify} messages. + * @param message ListMessageBusEnrollmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessageBusEnrollmentsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest.verify|verify} messages. + * @param message ListMessageBusEnrollmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessageBusEnrollmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessageBusEnrollmentsRequest + * @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.eventarc.v1.ListMessageBusEnrollmentsRequest; + + /** + * Decodes a ListMessageBusEnrollmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessageBusEnrollmentsRequest + * @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.eventarc.v1.ListMessageBusEnrollmentsRequest; + + /** + * Verifies a ListMessageBusEnrollmentsRequest 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 ListMessageBusEnrollmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessageBusEnrollmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest; + + /** + * Creates a plain object from a ListMessageBusEnrollmentsRequest message. Also converts values to other types if specified. + * @param message ListMessageBusEnrollmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessageBusEnrollmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMessageBusEnrollmentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMessageBusEnrollmentsResponse. */ + interface IListMessageBusEnrollmentsResponse { + + /** ListMessageBusEnrollmentsResponse enrollments */ + enrollments?: (string[]|null); + + /** ListMessageBusEnrollmentsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMessageBusEnrollmentsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListMessageBusEnrollmentsResponse. */ + class ListMessageBusEnrollmentsResponse implements IListMessageBusEnrollmentsResponse { + + /** + * Constructs a new ListMessageBusEnrollmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse); + + /** ListMessageBusEnrollmentsResponse enrollments. */ + public enrollments: string[]; + + /** ListMessageBusEnrollmentsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMessageBusEnrollmentsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListMessageBusEnrollmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMessageBusEnrollmentsResponse instance + */ + public static create(properties?: google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse): google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse; + + /** + * Encodes the specified ListMessageBusEnrollmentsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse.verify|verify} messages. + * @param message ListMessageBusEnrollmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMessageBusEnrollmentsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse.verify|verify} messages. + * @param message ListMessageBusEnrollmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMessageBusEnrollmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMessageBusEnrollmentsResponse + * @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.eventarc.v1.ListMessageBusEnrollmentsResponse; + + /** + * Decodes a ListMessageBusEnrollmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMessageBusEnrollmentsResponse + * @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.eventarc.v1.ListMessageBusEnrollmentsResponse; + + /** + * Verifies a ListMessageBusEnrollmentsResponse 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 ListMessageBusEnrollmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMessageBusEnrollmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse; + + /** + * Creates a plain object from a ListMessageBusEnrollmentsResponse message. Also converts values to other types if specified. + * @param message ListMessageBusEnrollmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMessageBusEnrollmentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMessageBusEnrollmentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateMessageBusRequest. */ + interface ICreateMessageBusRequest { + + /** CreateMessageBusRequest parent */ + parent?: (string|null); + + /** CreateMessageBusRequest messageBus */ + messageBus?: (google.cloud.eventarc.v1.IMessageBus|null); + + /** CreateMessageBusRequest messageBusId */ + messageBusId?: (string|null); + + /** CreateMessageBusRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateMessageBusRequest. */ + class CreateMessageBusRequest implements ICreateMessageBusRequest { + + /** + * Constructs a new CreateMessageBusRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.ICreateMessageBusRequest); + + /** CreateMessageBusRequest parent. */ + public parent: string; + + /** CreateMessageBusRequest messageBus. */ + public messageBus?: (google.cloud.eventarc.v1.IMessageBus|null); + + /** CreateMessageBusRequest messageBusId. */ + public messageBusId: string; + + /** CreateMessageBusRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateMessageBusRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMessageBusRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.ICreateMessageBusRequest): google.cloud.eventarc.v1.CreateMessageBusRequest; + + /** + * Encodes the specified CreateMessageBusRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateMessageBusRequest.verify|verify} messages. + * @param message CreateMessageBusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.ICreateMessageBusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMessageBusRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateMessageBusRequest.verify|verify} messages. + * @param message CreateMessageBusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.ICreateMessageBusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMessageBusRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMessageBusRequest + * @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.eventarc.v1.CreateMessageBusRequest; + + /** + * Decodes a CreateMessageBusRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMessageBusRequest + * @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.eventarc.v1.CreateMessageBusRequest; + + /** + * Verifies a CreateMessageBusRequest 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 CreateMessageBusRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMessageBusRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.CreateMessageBusRequest; + + /** + * Creates a plain object from a CreateMessageBusRequest message. Also converts values to other types if specified. + * @param message CreateMessageBusRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.CreateMessageBusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMessageBusRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMessageBusRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateMessageBusRequest. */ + interface IUpdateMessageBusRequest { + + /** UpdateMessageBusRequest messageBus */ + messageBus?: (google.cloud.eventarc.v1.IMessageBus|null); + + /** UpdateMessageBusRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateMessageBusRequest allowMissing */ + allowMissing?: (boolean|null); + + /** UpdateMessageBusRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateMessageBusRequest. */ + class UpdateMessageBusRequest implements IUpdateMessageBusRequest { + + /** + * Constructs a new UpdateMessageBusRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IUpdateMessageBusRequest); + + /** UpdateMessageBusRequest messageBus. */ + public messageBus?: (google.cloud.eventarc.v1.IMessageBus|null); + + /** UpdateMessageBusRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateMessageBusRequest allowMissing. */ + public allowMissing: boolean; + + /** UpdateMessageBusRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateMessageBusRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateMessageBusRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IUpdateMessageBusRequest): google.cloud.eventarc.v1.UpdateMessageBusRequest; + + /** + * Encodes the specified UpdateMessageBusRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateMessageBusRequest.verify|verify} messages. + * @param message UpdateMessageBusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IUpdateMessageBusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateMessageBusRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateMessageBusRequest.verify|verify} messages. + * @param message UpdateMessageBusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IUpdateMessageBusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateMessageBusRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateMessageBusRequest + * @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.eventarc.v1.UpdateMessageBusRequest; + + /** + * Decodes an UpdateMessageBusRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateMessageBusRequest + * @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.eventarc.v1.UpdateMessageBusRequest; + + /** + * Verifies an UpdateMessageBusRequest 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 UpdateMessageBusRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateMessageBusRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.UpdateMessageBusRequest; + + /** + * Creates a plain object from an UpdateMessageBusRequest message. Also converts values to other types if specified. + * @param message UpdateMessageBusRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.UpdateMessageBusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateMessageBusRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateMessageBusRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListTriggersRequest. */ - interface IListTriggersRequest { + /** Properties of a DeleteMessageBusRequest. */ + interface IDeleteMessageBusRequest { - /** ListTriggersRequest parent */ + /** DeleteMessageBusRequest name */ + name?: (string|null); + + /** DeleteMessageBusRequest etag */ + etag?: (string|null); + + /** DeleteMessageBusRequest allowMissing */ + allowMissing?: (boolean|null); + + /** DeleteMessageBusRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a DeleteMessageBusRequest. */ + class DeleteMessageBusRequest implements IDeleteMessageBusRequest { + + /** + * Constructs a new DeleteMessageBusRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IDeleteMessageBusRequest); + + /** DeleteMessageBusRequest name. */ + public name: string; + + /** DeleteMessageBusRequest etag. */ + public etag: string; + + /** DeleteMessageBusRequest allowMissing. */ + public allowMissing: boolean; + + /** DeleteMessageBusRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new DeleteMessageBusRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMessageBusRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IDeleteMessageBusRequest): google.cloud.eventarc.v1.DeleteMessageBusRequest; + + /** + * Encodes the specified DeleteMessageBusRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteMessageBusRequest.verify|verify} messages. + * @param message DeleteMessageBusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IDeleteMessageBusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMessageBusRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteMessageBusRequest.verify|verify} messages. + * @param message DeleteMessageBusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IDeleteMessageBusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMessageBusRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMessageBusRequest + * @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.eventarc.v1.DeleteMessageBusRequest; + + /** + * Decodes a DeleteMessageBusRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMessageBusRequest + * @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.eventarc.v1.DeleteMessageBusRequest; + + /** + * Verifies a DeleteMessageBusRequest 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 DeleteMessageBusRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMessageBusRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.DeleteMessageBusRequest; + + /** + * Creates a plain object from a DeleteMessageBusRequest message. Also converts values to other types if specified. + * @param message DeleteMessageBusRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.DeleteMessageBusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMessageBusRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMessageBusRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEnrollmentRequest. */ + interface IGetEnrollmentRequest { + + /** GetEnrollmentRequest name */ + name?: (string|null); + } + + /** Represents a GetEnrollmentRequest. */ + class GetEnrollmentRequest implements IGetEnrollmentRequest { + + /** + * Constructs a new GetEnrollmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IGetEnrollmentRequest); + + /** GetEnrollmentRequest name. */ + public name: string; + + /** + * Creates a new GetEnrollmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEnrollmentRequest instance + */ + public static create(properties?: google.cloud.eventarc.v1.IGetEnrollmentRequest): google.cloud.eventarc.v1.GetEnrollmentRequest; + + /** + * Encodes the specified GetEnrollmentRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetEnrollmentRequest.verify|verify} messages. + * @param message GetEnrollmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IGetEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetEnrollmentRequest.verify|verify} messages. + * @param message GetEnrollmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IGetEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEnrollmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEnrollmentRequest + * @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.eventarc.v1.GetEnrollmentRequest; + + /** + * Decodes a GetEnrollmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEnrollmentRequest + * @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.eventarc.v1.GetEnrollmentRequest; + + /** + * Verifies a GetEnrollmentRequest 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 GetEnrollmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEnrollmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetEnrollmentRequest; + + /** + * Creates a plain object from a GetEnrollmentRequest message. Also converts values to other types if specified. + * @param message GetEnrollmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.GetEnrollmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEnrollmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEnrollmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEnrollmentsRequest. */ + interface IListEnrollmentsRequest { + + /** ListEnrollmentsRequest parent */ parent?: (string|null); - /** ListTriggersRequest pageSize */ + /** ListEnrollmentsRequest pageSize */ pageSize?: (number|null); - /** ListTriggersRequest pageToken */ + /** ListEnrollmentsRequest pageToken */ pageToken?: (string|null); - /** ListTriggersRequest orderBy */ + /** ListEnrollmentsRequest orderBy */ orderBy?: (string|null); - /** ListTriggersRequest filter */ + /** ListEnrollmentsRequest filter */ filter?: (string|null); } - /** Represents a ListTriggersRequest. */ - class ListTriggersRequest implements IListTriggersRequest { + /** Represents a ListEnrollmentsRequest. */ + class ListEnrollmentsRequest implements IListEnrollmentsRequest { /** - * Constructs a new ListTriggersRequest. + * Constructs a new ListEnrollmentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IListTriggersRequest); + constructor(properties?: google.cloud.eventarc.v1.IListEnrollmentsRequest); - /** ListTriggersRequest parent. */ + /** ListEnrollmentsRequest parent. */ public parent: string; - /** ListTriggersRequest pageSize. */ + /** ListEnrollmentsRequest pageSize. */ public pageSize: number; - /** ListTriggersRequest pageToken. */ + /** ListEnrollmentsRequest pageToken. */ public pageToken: string; - /** ListTriggersRequest orderBy. */ + /** ListEnrollmentsRequest orderBy. */ public orderBy: string; - /** ListTriggersRequest filter. */ + /** ListEnrollmentsRequest filter. */ public filter: string; /** - * Creates a new ListTriggersRequest instance using the specified properties. + * Creates a new ListEnrollmentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListTriggersRequest instance + * @returns ListEnrollmentsRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IListTriggersRequest): google.cloud.eventarc.v1.ListTriggersRequest; + public static create(properties?: google.cloud.eventarc.v1.IListEnrollmentsRequest): google.cloud.eventarc.v1.ListEnrollmentsRequest; /** - * Encodes the specified ListTriggersRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersRequest.verify|verify} messages. - * @param message ListTriggersRequest message or plain object to encode + * Encodes the specified ListEnrollmentsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListEnrollmentsRequest.verify|verify} messages. + * @param message ListEnrollmentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IListTriggersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IListEnrollmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTriggersRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersRequest.verify|verify} messages. - * @param message ListTriggersRequest message or plain object to encode + * Encodes the specified ListEnrollmentsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListEnrollmentsRequest.verify|verify} messages. + * @param message ListEnrollmentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IListTriggersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IListEnrollmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTriggersRequest message from the specified reader or buffer. + * Decodes a ListEnrollmentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTriggersRequest + * @returns ListEnrollmentsRequest * @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.eventarc.v1.ListTriggersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.ListEnrollmentsRequest; /** - * Decodes a ListTriggersRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEnrollmentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTriggersRequest + * @returns ListEnrollmentsRequest * @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.eventarc.v1.ListTriggersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.ListEnrollmentsRequest; /** - * Verifies a ListTriggersRequest message. + * Verifies a ListEnrollmentsRequest 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 ListTriggersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnrollmentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTriggersRequest + * @returns ListEnrollmentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListTriggersRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListEnrollmentsRequest; /** - * Creates a plain object from a ListTriggersRequest message. Also converts values to other types if specified. - * @param message ListTriggersRequest + * Creates a plain object from a ListEnrollmentsRequest message. Also converts values to other types if specified. + * @param message ListEnrollmentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.ListTriggersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.ListEnrollmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTriggersRequest to JSON. + * Converts this ListEnrollmentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListTriggersRequest + * Gets the default type url for ListEnrollmentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListTriggersResponse. */ - interface IListTriggersResponse { + /** Properties of a ListEnrollmentsResponse. */ + interface IListEnrollmentsResponse { - /** ListTriggersResponse triggers */ - triggers?: (google.cloud.eventarc.v1.ITrigger[]|null); + /** ListEnrollmentsResponse enrollments */ + enrollments?: (google.cloud.eventarc.v1.IEnrollment[]|null); - /** ListTriggersResponse nextPageToken */ + /** ListEnrollmentsResponse nextPageToken */ nextPageToken?: (string|null); - /** ListTriggersResponse unreachable */ + /** ListEnrollmentsResponse unreachable */ unreachable?: (string[]|null); } - /** Represents a ListTriggersResponse. */ - class ListTriggersResponse implements IListTriggersResponse { + /** Represents a ListEnrollmentsResponse. */ + class ListEnrollmentsResponse implements IListEnrollmentsResponse { /** - * Constructs a new ListTriggersResponse. + * Constructs a new ListEnrollmentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IListTriggersResponse); + constructor(properties?: google.cloud.eventarc.v1.IListEnrollmentsResponse); - /** ListTriggersResponse triggers. */ - public triggers: google.cloud.eventarc.v1.ITrigger[]; + /** ListEnrollmentsResponse enrollments. */ + public enrollments: google.cloud.eventarc.v1.IEnrollment[]; - /** ListTriggersResponse nextPageToken. */ + /** ListEnrollmentsResponse nextPageToken. */ public nextPageToken: string; - /** ListTriggersResponse unreachable. */ + /** ListEnrollmentsResponse unreachable. */ public unreachable: string[]; /** - * Creates a new ListTriggersResponse instance using the specified properties. + * Creates a new ListEnrollmentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListTriggersResponse instance + * @returns ListEnrollmentsResponse instance */ - public static create(properties?: google.cloud.eventarc.v1.IListTriggersResponse): google.cloud.eventarc.v1.ListTriggersResponse; + public static create(properties?: google.cloud.eventarc.v1.IListEnrollmentsResponse): google.cloud.eventarc.v1.ListEnrollmentsResponse; /** - * Encodes the specified ListTriggersResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersResponse.verify|verify} messages. - * @param message ListTriggersResponse message or plain object to encode + * Encodes the specified ListEnrollmentsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListEnrollmentsResponse.verify|verify} messages. + * @param message ListEnrollmentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IListTriggersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IListEnrollmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTriggersResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersResponse.verify|verify} messages. - * @param message ListTriggersResponse message or plain object to encode + * Encodes the specified ListEnrollmentsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListEnrollmentsResponse.verify|verify} messages. + * @param message ListEnrollmentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IListTriggersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IListEnrollmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTriggersResponse message from the specified reader or buffer. + * Decodes a ListEnrollmentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTriggersResponse + * @returns ListEnrollmentsResponse * @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.eventarc.v1.ListTriggersResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.ListEnrollmentsResponse; /** - * Decodes a ListTriggersResponse message from the specified reader or buffer, length delimited. + * Decodes a ListEnrollmentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTriggersResponse + * @returns ListEnrollmentsResponse * @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.eventarc.v1.ListTriggersResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.ListEnrollmentsResponse; /** - * Verifies a ListTriggersResponse message. + * Verifies a ListEnrollmentsResponse 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 ListTriggersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnrollmentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTriggersResponse + * @returns ListEnrollmentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListTriggersResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListEnrollmentsResponse; /** - * Creates a plain object from a ListTriggersResponse message. Also converts values to other types if specified. - * @param message ListTriggersResponse + * Creates a plain object from a ListEnrollmentsResponse message. Also converts values to other types if specified. + * @param message ListEnrollmentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.ListTriggersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.ListEnrollmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTriggersResponse to JSON. + * Converts this ListEnrollmentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListTriggersResponse + * Gets the default type url for ListEnrollmentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateTriggerRequest. */ - interface ICreateTriggerRequest { + /** Properties of a CreateEnrollmentRequest. */ + interface ICreateEnrollmentRequest { - /** CreateTriggerRequest parent */ + /** CreateEnrollmentRequest parent */ parent?: (string|null); - /** CreateTriggerRequest trigger */ - trigger?: (google.cloud.eventarc.v1.ITrigger|null); + /** CreateEnrollmentRequest enrollment */ + enrollment?: (google.cloud.eventarc.v1.IEnrollment|null); - /** CreateTriggerRequest triggerId */ - triggerId?: (string|null); + /** CreateEnrollmentRequest enrollmentId */ + enrollmentId?: (string|null); - /** CreateTriggerRequest validateOnly */ + /** CreateEnrollmentRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents a CreateTriggerRequest. */ - class CreateTriggerRequest implements ICreateTriggerRequest { + /** Represents a CreateEnrollmentRequest. */ + class CreateEnrollmentRequest implements ICreateEnrollmentRequest { /** - * Constructs a new CreateTriggerRequest. + * Constructs a new CreateEnrollmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.ICreateTriggerRequest); + constructor(properties?: google.cloud.eventarc.v1.ICreateEnrollmentRequest); - /** CreateTriggerRequest parent. */ + /** CreateEnrollmentRequest parent. */ public parent: string; - /** CreateTriggerRequest trigger. */ - public trigger?: (google.cloud.eventarc.v1.ITrigger|null); + /** CreateEnrollmentRequest enrollment. */ + public enrollment?: (google.cloud.eventarc.v1.IEnrollment|null); - /** CreateTriggerRequest triggerId. */ - public triggerId: string; + /** CreateEnrollmentRequest enrollmentId. */ + public enrollmentId: string; - /** CreateTriggerRequest validateOnly. */ + /** CreateEnrollmentRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new CreateTriggerRequest instance using the specified properties. + * Creates a new CreateEnrollmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTriggerRequest instance + * @returns CreateEnrollmentRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.ICreateTriggerRequest): google.cloud.eventarc.v1.CreateTriggerRequest; + public static create(properties?: google.cloud.eventarc.v1.ICreateEnrollmentRequest): google.cloud.eventarc.v1.CreateEnrollmentRequest; /** - * Encodes the specified CreateTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateTriggerRequest.verify|verify} messages. - * @param message CreateTriggerRequest message or plain object to encode + * Encodes the specified CreateEnrollmentRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateEnrollmentRequest.verify|verify} messages. + * @param message CreateEnrollmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.ICreateTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.ICreateEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateTriggerRequest.verify|verify} messages. - * @param message CreateTriggerRequest message or plain object to encode + * Encodes the specified CreateEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateEnrollmentRequest.verify|verify} messages. + * @param message CreateEnrollmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.ICreateTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.ICreateEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTriggerRequest message from the specified reader or buffer. + * Decodes a CreateEnrollmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTriggerRequest + * @returns CreateEnrollmentRequest * @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.eventarc.v1.CreateTriggerRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.CreateEnrollmentRequest; /** - * Decodes a CreateTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEnrollmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTriggerRequest + * @returns CreateEnrollmentRequest * @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.eventarc.v1.CreateTriggerRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.CreateEnrollmentRequest; /** - * Verifies a CreateTriggerRequest message. + * Verifies a CreateEnrollmentRequest 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 CreateTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEnrollmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTriggerRequest + * @returns CreateEnrollmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.CreateTriggerRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.CreateEnrollmentRequest; /** - * Creates a plain object from a CreateTriggerRequest message. Also converts values to other types if specified. - * @param message CreateTriggerRequest + * Creates a plain object from a CreateEnrollmentRequest message. Also converts values to other types if specified. + * @param message CreateEnrollmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.CreateTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.CreateEnrollmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTriggerRequest to JSON. + * Converts this CreateEnrollmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateTriggerRequest + * Gets the default type url for CreateEnrollmentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateTriggerRequest. */ - interface IUpdateTriggerRequest { + /** Properties of an UpdateEnrollmentRequest. */ + interface IUpdateEnrollmentRequest { - /** UpdateTriggerRequest trigger */ - trigger?: (google.cloud.eventarc.v1.ITrigger|null); + /** UpdateEnrollmentRequest enrollment */ + enrollment?: (google.cloud.eventarc.v1.IEnrollment|null); - /** UpdateTriggerRequest updateMask */ + /** UpdateEnrollmentRequest updateMask */ updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateTriggerRequest allowMissing */ + /** UpdateEnrollmentRequest allowMissing */ allowMissing?: (boolean|null); - /** UpdateTriggerRequest validateOnly */ + /** UpdateEnrollmentRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents an UpdateTriggerRequest. */ - class UpdateTriggerRequest implements IUpdateTriggerRequest { + /** Represents an UpdateEnrollmentRequest. */ + class UpdateEnrollmentRequest implements IUpdateEnrollmentRequest { /** - * Constructs a new UpdateTriggerRequest. + * Constructs a new UpdateEnrollmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IUpdateTriggerRequest); + constructor(properties?: google.cloud.eventarc.v1.IUpdateEnrollmentRequest); - /** UpdateTriggerRequest trigger. */ - public trigger?: (google.cloud.eventarc.v1.ITrigger|null); + /** UpdateEnrollmentRequest enrollment. */ + public enrollment?: (google.cloud.eventarc.v1.IEnrollment|null); - /** UpdateTriggerRequest updateMask. */ + /** UpdateEnrollmentRequest updateMask. */ public updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateTriggerRequest allowMissing. */ + /** UpdateEnrollmentRequest allowMissing. */ public allowMissing: boolean; - /** UpdateTriggerRequest validateOnly. */ + /** UpdateEnrollmentRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new UpdateTriggerRequest instance using the specified properties. + * Creates a new UpdateEnrollmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateTriggerRequest instance + * @returns UpdateEnrollmentRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IUpdateTriggerRequest): google.cloud.eventarc.v1.UpdateTriggerRequest; + public static create(properties?: google.cloud.eventarc.v1.IUpdateEnrollmentRequest): google.cloud.eventarc.v1.UpdateEnrollmentRequest; /** - * Encodes the specified UpdateTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateTriggerRequest.verify|verify} messages. - * @param message UpdateTriggerRequest message or plain object to encode + * Encodes the specified UpdateEnrollmentRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateEnrollmentRequest.verify|verify} messages. + * @param message UpdateEnrollmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IUpdateTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IUpdateEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateTriggerRequest.verify|verify} messages. - * @param message UpdateTriggerRequest message or plain object to encode + * Encodes the specified UpdateEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateEnrollmentRequest.verify|verify} messages. + * @param message UpdateEnrollmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IUpdateTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IUpdateEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateTriggerRequest message from the specified reader or buffer. + * Decodes an UpdateEnrollmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateTriggerRequest + * @returns UpdateEnrollmentRequest * @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.eventarc.v1.UpdateTriggerRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.UpdateEnrollmentRequest; /** - * Decodes an UpdateTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateEnrollmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateTriggerRequest + * @returns UpdateEnrollmentRequest * @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.eventarc.v1.UpdateTriggerRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.UpdateEnrollmentRequest; /** - * Verifies an UpdateTriggerRequest message. + * Verifies an UpdateEnrollmentRequest 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 UpdateTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEnrollmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateTriggerRequest + * @returns UpdateEnrollmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.UpdateTriggerRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.UpdateEnrollmentRequest; /** - * Creates a plain object from an UpdateTriggerRequest message. Also converts values to other types if specified. - * @param message UpdateTriggerRequest + * Creates a plain object from an UpdateEnrollmentRequest message. Also converts values to other types if specified. + * @param message UpdateEnrollmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.UpdateTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.UpdateEnrollmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateTriggerRequest to JSON. + * Converts this UpdateEnrollmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateTriggerRequest + * Gets the default type url for UpdateEnrollmentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteTriggerRequest. */ - interface IDeleteTriggerRequest { + /** Properties of a DeleteEnrollmentRequest. */ + interface IDeleteEnrollmentRequest { - /** DeleteTriggerRequest name */ + /** DeleteEnrollmentRequest name */ name?: (string|null); - /** DeleteTriggerRequest etag */ + /** DeleteEnrollmentRequest etag */ etag?: (string|null); - /** DeleteTriggerRequest allowMissing */ + /** DeleteEnrollmentRequest allowMissing */ allowMissing?: (boolean|null); - /** DeleteTriggerRequest validateOnly */ + /** DeleteEnrollmentRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents a DeleteTriggerRequest. */ - class DeleteTriggerRequest implements IDeleteTriggerRequest { + /** Represents a DeleteEnrollmentRequest. */ + class DeleteEnrollmentRequest implements IDeleteEnrollmentRequest { /** - * Constructs a new DeleteTriggerRequest. + * Constructs a new DeleteEnrollmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IDeleteTriggerRequest); + constructor(properties?: google.cloud.eventarc.v1.IDeleteEnrollmentRequest); - /** DeleteTriggerRequest name. */ + /** DeleteEnrollmentRequest name. */ public name: string; - /** DeleteTriggerRequest etag. */ + /** DeleteEnrollmentRequest etag. */ public etag: string; - /** DeleteTriggerRequest allowMissing. */ + /** DeleteEnrollmentRequest allowMissing. */ public allowMissing: boolean; - /** DeleteTriggerRequest validateOnly. */ + /** DeleteEnrollmentRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new DeleteTriggerRequest instance using the specified properties. + * Creates a new DeleteEnrollmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteTriggerRequest instance + * @returns DeleteEnrollmentRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IDeleteTriggerRequest): google.cloud.eventarc.v1.DeleteTriggerRequest; + public static create(properties?: google.cloud.eventarc.v1.IDeleteEnrollmentRequest): google.cloud.eventarc.v1.DeleteEnrollmentRequest; /** - * Encodes the specified DeleteTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteTriggerRequest.verify|verify} messages. - * @param message DeleteTriggerRequest message or plain object to encode + * Encodes the specified DeleteEnrollmentRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteEnrollmentRequest.verify|verify} messages. + * @param message DeleteEnrollmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IDeleteTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IDeleteEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteTriggerRequest.verify|verify} messages. - * @param message DeleteTriggerRequest message or plain object to encode + * Encodes the specified DeleteEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteEnrollmentRequest.verify|verify} messages. + * @param message DeleteEnrollmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IDeleteTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IDeleteEnrollmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTriggerRequest message from the specified reader or buffer. + * Decodes a DeleteEnrollmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteTriggerRequest + * @returns DeleteEnrollmentRequest * @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.eventarc.v1.DeleteTriggerRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.DeleteEnrollmentRequest; /** - * Decodes a DeleteTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEnrollmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTriggerRequest + * @returns DeleteEnrollmentRequest * @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.eventarc.v1.DeleteTriggerRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.DeleteEnrollmentRequest; /** - * Verifies a DeleteTriggerRequest message. + * Verifies a DeleteEnrollmentRequest 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 DeleteTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEnrollmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTriggerRequest + * @returns DeleteEnrollmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.DeleteTriggerRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.DeleteEnrollmentRequest; /** - * Creates a plain object from a DeleteTriggerRequest message. Also converts values to other types if specified. - * @param message DeleteTriggerRequest + * Creates a plain object from a DeleteEnrollmentRequest message. Also converts values to other types if specified. + * @param message DeleteEnrollmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.DeleteTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.DeleteEnrollmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTriggerRequest to JSON. + * Converts this DeleteEnrollmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteTriggerRequest + * Gets the default type url for DeleteEnrollmentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetChannelRequest. */ - interface IGetChannelRequest { + /** Properties of a GetPipelineRequest. */ + interface IGetPipelineRequest { - /** GetChannelRequest name */ + /** GetPipelineRequest name */ name?: (string|null); } - /** Represents a GetChannelRequest. */ - class GetChannelRequest implements IGetChannelRequest { + /** Represents a GetPipelineRequest. */ + class GetPipelineRequest implements IGetPipelineRequest { /** - * Constructs a new GetChannelRequest. + * Constructs a new GetPipelineRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IGetChannelRequest); + constructor(properties?: google.cloud.eventarc.v1.IGetPipelineRequest); - /** GetChannelRequest name. */ + /** GetPipelineRequest name. */ public name: string; /** - * Creates a new GetChannelRequest instance using the specified properties. + * Creates a new GetPipelineRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetChannelRequest instance + * @returns GetPipelineRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IGetChannelRequest): google.cloud.eventarc.v1.GetChannelRequest; + public static create(properties?: google.cloud.eventarc.v1.IGetPipelineRequest): google.cloud.eventarc.v1.GetPipelineRequest; /** - * Encodes the specified GetChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelRequest.verify|verify} messages. - * @param message GetChannelRequest message or plain object to encode + * Encodes the specified GetPipelineRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetPipelineRequest.verify|verify} messages. + * @param message GetPipelineRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IGetChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IGetPipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelRequest.verify|verify} messages. - * @param message GetChannelRequest message or plain object to encode + * Encodes the specified GetPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetPipelineRequest.verify|verify} messages. + * @param message GetPipelineRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IGetChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IGetPipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetChannelRequest message from the specified reader or buffer. + * Decodes a GetPipelineRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetChannelRequest + * @returns GetPipelineRequest * @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.eventarc.v1.GetChannelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.GetPipelineRequest; /** - * Decodes a GetChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a GetPipelineRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetChannelRequest + * @returns GetPipelineRequest * @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.eventarc.v1.GetChannelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.GetPipelineRequest; /** - * Verifies a GetChannelRequest message. + * Verifies a GetPipelineRequest 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 GetChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetPipelineRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetChannelRequest + * @returns GetPipelineRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetChannelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetPipelineRequest; /** - * Creates a plain object from a GetChannelRequest message. Also converts values to other types if specified. - * @param message GetChannelRequest + * Creates a plain object from a GetPipelineRequest message. Also converts values to other types if specified. + * @param message GetPipelineRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.GetChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.GetPipelineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetChannelRequest to JSON. + * Converts this GetPipelineRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetChannelRequest + * Gets the default type url for GetPipelineRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListChannelsRequest. */ - interface IListChannelsRequest { + /** Properties of a ListPipelinesRequest. */ + interface IListPipelinesRequest { - /** ListChannelsRequest parent */ + /** ListPipelinesRequest parent */ parent?: (string|null); - /** ListChannelsRequest pageSize */ + /** ListPipelinesRequest pageSize */ pageSize?: (number|null); - /** ListChannelsRequest pageToken */ + /** ListPipelinesRequest pageToken */ pageToken?: (string|null); - /** ListChannelsRequest orderBy */ + /** ListPipelinesRequest orderBy */ orderBy?: (string|null); + + /** ListPipelinesRequest filter */ + filter?: (string|null); } - /** Represents a ListChannelsRequest. */ - class ListChannelsRequest implements IListChannelsRequest { + /** Represents a ListPipelinesRequest. */ + class ListPipelinesRequest implements IListPipelinesRequest { /** - * Constructs a new ListChannelsRequest. + * Constructs a new ListPipelinesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IListChannelsRequest); + constructor(properties?: google.cloud.eventarc.v1.IListPipelinesRequest); - /** ListChannelsRequest parent. */ + /** ListPipelinesRequest parent. */ public parent: string; - /** ListChannelsRequest pageSize. */ + /** ListPipelinesRequest pageSize. */ public pageSize: number; - /** ListChannelsRequest pageToken. */ + /** ListPipelinesRequest pageToken. */ public pageToken: string; - /** ListChannelsRequest orderBy. */ + /** ListPipelinesRequest orderBy. */ public orderBy: string; + /** ListPipelinesRequest filter. */ + public filter: string; + /** - * Creates a new ListChannelsRequest instance using the specified properties. + * Creates a new ListPipelinesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListChannelsRequest instance + * @returns ListPipelinesRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IListChannelsRequest): google.cloud.eventarc.v1.ListChannelsRequest; + public static create(properties?: google.cloud.eventarc.v1.IListPipelinesRequest): google.cloud.eventarc.v1.ListPipelinesRequest; /** - * Encodes the specified ListChannelsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsRequest.verify|verify} messages. - * @param message ListChannelsRequest message or plain object to encode + * Encodes the specified ListPipelinesRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListPipelinesRequest.verify|verify} messages. + * @param message ListPipelinesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IListChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IListPipelinesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListChannelsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsRequest.verify|verify} messages. - * @param message ListChannelsRequest message or plain object to encode + * Encodes the specified ListPipelinesRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListPipelinesRequest.verify|verify} messages. + * @param message ListPipelinesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IListChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IListPipelinesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListChannelsRequest message from the specified reader or buffer. + * Decodes a ListPipelinesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListChannelsRequest + * @returns ListPipelinesRequest * @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.eventarc.v1.ListChannelsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.ListPipelinesRequest; /** - * Decodes a ListChannelsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPipelinesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListChannelsRequest + * @returns ListPipelinesRequest * @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.eventarc.v1.ListChannelsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.ListPipelinesRequest; /** - * Verifies a ListChannelsRequest message. + * Verifies a ListPipelinesRequest 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 ListChannelsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPipelinesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListChannelsRequest + * @returns ListPipelinesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListChannelsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListPipelinesRequest; /** - * Creates a plain object from a ListChannelsRequest message. Also converts values to other types if specified. - * @param message ListChannelsRequest + * Creates a plain object from a ListPipelinesRequest message. Also converts values to other types if specified. + * @param message ListPipelinesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.ListChannelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.ListPipelinesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListChannelsRequest to JSON. + * Converts this ListPipelinesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListChannelsRequest + * Gets the default type url for ListPipelinesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListChannelsResponse. */ - interface IListChannelsResponse { + /** Properties of a ListPipelinesResponse. */ + interface IListPipelinesResponse { - /** ListChannelsResponse channels */ - channels?: (google.cloud.eventarc.v1.IChannel[]|null); + /** ListPipelinesResponse pipelines */ + pipelines?: (google.cloud.eventarc.v1.IPipeline[]|null); - /** ListChannelsResponse nextPageToken */ + /** ListPipelinesResponse nextPageToken */ nextPageToken?: (string|null); - /** ListChannelsResponse unreachable */ + /** ListPipelinesResponse unreachable */ unreachable?: (string[]|null); } - /** Represents a ListChannelsResponse. */ - class ListChannelsResponse implements IListChannelsResponse { + /** Represents a ListPipelinesResponse. */ + class ListPipelinesResponse implements IListPipelinesResponse { /** - * Constructs a new ListChannelsResponse. + * Constructs a new ListPipelinesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IListChannelsResponse); + constructor(properties?: google.cloud.eventarc.v1.IListPipelinesResponse); - /** ListChannelsResponse channels. */ - public channels: google.cloud.eventarc.v1.IChannel[]; + /** ListPipelinesResponse pipelines. */ + public pipelines: google.cloud.eventarc.v1.IPipeline[]; - /** ListChannelsResponse nextPageToken. */ + /** ListPipelinesResponse nextPageToken. */ public nextPageToken: string; - /** ListChannelsResponse unreachable. */ + /** ListPipelinesResponse unreachable. */ public unreachable: string[]; /** - * Creates a new ListChannelsResponse instance using the specified properties. + * Creates a new ListPipelinesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListChannelsResponse instance + * @returns ListPipelinesResponse instance */ - public static create(properties?: google.cloud.eventarc.v1.IListChannelsResponse): google.cloud.eventarc.v1.ListChannelsResponse; + public static create(properties?: google.cloud.eventarc.v1.IListPipelinesResponse): google.cloud.eventarc.v1.ListPipelinesResponse; /** - * Encodes the specified ListChannelsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsResponse.verify|verify} messages. - * @param message ListChannelsResponse message or plain object to encode + * Encodes the specified ListPipelinesResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListPipelinesResponse.verify|verify} messages. + * @param message ListPipelinesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IListChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IListPipelinesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListChannelsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsResponse.verify|verify} messages. - * @param message ListChannelsResponse message or plain object to encode + * Encodes the specified ListPipelinesResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListPipelinesResponse.verify|verify} messages. + * @param message ListPipelinesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IListChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IListPipelinesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListChannelsResponse message from the specified reader or buffer. + * Decodes a ListPipelinesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListChannelsResponse + * @returns ListPipelinesResponse * @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.eventarc.v1.ListChannelsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.ListPipelinesResponse; /** - * Decodes a ListChannelsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListPipelinesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListChannelsResponse + * @returns ListPipelinesResponse * @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.eventarc.v1.ListChannelsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.ListPipelinesResponse; /** - * Verifies a ListChannelsResponse message. + * Verifies a ListPipelinesResponse 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 ListChannelsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListPipelinesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListChannelsResponse + * @returns ListPipelinesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListChannelsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListPipelinesResponse; /** - * Creates a plain object from a ListChannelsResponse message. Also converts values to other types if specified. - * @param message ListChannelsResponse + * Creates a plain object from a ListPipelinesResponse message. Also converts values to other types if specified. + * @param message ListPipelinesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.ListChannelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.ListPipelinesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListChannelsResponse to JSON. + * Converts this ListPipelinesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListChannelsResponse + * Gets the default type url for ListPipelinesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateChannelRequest. */ - interface ICreateChannelRequest { + /** Properties of a CreatePipelineRequest. */ + interface ICreatePipelineRequest { - /** CreateChannelRequest parent */ + /** CreatePipelineRequest parent */ parent?: (string|null); - /** CreateChannelRequest channel */ - channel?: (google.cloud.eventarc.v1.IChannel|null); + /** CreatePipelineRequest pipeline */ + pipeline?: (google.cloud.eventarc.v1.IPipeline|null); - /** CreateChannelRequest channelId */ - channelId?: (string|null); + /** CreatePipelineRequest pipelineId */ + pipelineId?: (string|null); - /** CreateChannelRequest validateOnly */ + /** CreatePipelineRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents a CreateChannelRequest. */ - class CreateChannelRequest implements ICreateChannelRequest { + /** Represents a CreatePipelineRequest. */ + class CreatePipelineRequest implements ICreatePipelineRequest { /** - * Constructs a new CreateChannelRequest. + * Constructs a new CreatePipelineRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.ICreateChannelRequest); + constructor(properties?: google.cloud.eventarc.v1.ICreatePipelineRequest); - /** CreateChannelRequest parent. */ + /** CreatePipelineRequest parent. */ public parent: string; - /** CreateChannelRequest channel. */ - public channel?: (google.cloud.eventarc.v1.IChannel|null); + /** CreatePipelineRequest pipeline. */ + public pipeline?: (google.cloud.eventarc.v1.IPipeline|null); - /** CreateChannelRequest channelId. */ - public channelId: string; + /** CreatePipelineRequest pipelineId. */ + public pipelineId: string; - /** CreateChannelRequest validateOnly. */ + /** CreatePipelineRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new CreateChannelRequest instance using the specified properties. + * Creates a new CreatePipelineRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateChannelRequest instance + * @returns CreatePipelineRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.ICreateChannelRequest): google.cloud.eventarc.v1.CreateChannelRequest; + public static create(properties?: google.cloud.eventarc.v1.ICreatePipelineRequest): google.cloud.eventarc.v1.CreatePipelineRequest; /** - * Encodes the specified CreateChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelRequest.verify|verify} messages. - * @param message CreateChannelRequest message or plain object to encode + * Encodes the specified CreatePipelineRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreatePipelineRequest.verify|verify} messages. + * @param message CreatePipelineRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.ICreateChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.ICreatePipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelRequest.verify|verify} messages. - * @param message CreateChannelRequest message or plain object to encode + * Encodes the specified CreatePipelineRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreatePipelineRequest.verify|verify} messages. + * @param message CreatePipelineRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.ICreateChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.ICreatePipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateChannelRequest message from the specified reader or buffer. + * Decodes a CreatePipelineRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateChannelRequest + * @returns CreatePipelineRequest * @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.eventarc.v1.CreateChannelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.CreatePipelineRequest; /** - * Decodes a CreateChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a CreatePipelineRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateChannelRequest + * @returns CreatePipelineRequest * @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.eventarc.v1.CreateChannelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.CreatePipelineRequest; /** - * Verifies a CreateChannelRequest message. + * Verifies a CreatePipelineRequest 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 CreateChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreatePipelineRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateChannelRequest + * @returns CreatePipelineRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.CreateChannelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.CreatePipelineRequest; /** - * Creates a plain object from a CreateChannelRequest message. Also converts values to other types if specified. - * @param message CreateChannelRequest + * Creates a plain object from a CreatePipelineRequest message. Also converts values to other types if specified. + * @param message CreatePipelineRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.CreateChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.CreatePipelineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateChannelRequest to JSON. + * Converts this CreatePipelineRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateChannelRequest + * Gets the default type url for CreatePipelineRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateChannelRequest. */ - interface IUpdateChannelRequest { + /** Properties of an UpdatePipelineRequest. */ + interface IUpdatePipelineRequest { - /** UpdateChannelRequest channel */ - channel?: (google.cloud.eventarc.v1.IChannel|null); + /** UpdatePipelineRequest pipeline */ + pipeline?: (google.cloud.eventarc.v1.IPipeline|null); - /** UpdateChannelRequest updateMask */ + /** UpdatePipelineRequest updateMask */ updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateChannelRequest validateOnly */ + /** UpdatePipelineRequest allowMissing */ + allowMissing?: (boolean|null); + + /** UpdatePipelineRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents an UpdateChannelRequest. */ - class UpdateChannelRequest implements IUpdateChannelRequest { + /** Represents an UpdatePipelineRequest. */ + class UpdatePipelineRequest implements IUpdatePipelineRequest { /** - * Constructs a new UpdateChannelRequest. + * Constructs a new UpdatePipelineRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IUpdateChannelRequest); + constructor(properties?: google.cloud.eventarc.v1.IUpdatePipelineRequest); - /** UpdateChannelRequest channel. */ - public channel?: (google.cloud.eventarc.v1.IChannel|null); + /** UpdatePipelineRequest pipeline. */ + public pipeline?: (google.cloud.eventarc.v1.IPipeline|null); - /** UpdateChannelRequest updateMask. */ + /** UpdatePipelineRequest updateMask. */ public updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateChannelRequest validateOnly. */ + /** UpdatePipelineRequest allowMissing. */ + public allowMissing: boolean; + + /** UpdatePipelineRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new UpdateChannelRequest instance using the specified properties. + * Creates a new UpdatePipelineRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateChannelRequest instance + * @returns UpdatePipelineRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IUpdateChannelRequest): google.cloud.eventarc.v1.UpdateChannelRequest; + public static create(properties?: google.cloud.eventarc.v1.IUpdatePipelineRequest): google.cloud.eventarc.v1.UpdatePipelineRequest; /** - * Encodes the specified UpdateChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateChannelRequest.verify|verify} messages. - * @param message UpdateChannelRequest message or plain object to encode + * Encodes the specified UpdatePipelineRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdatePipelineRequest.verify|verify} messages. + * @param message UpdatePipelineRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IUpdateChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IUpdatePipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateChannelRequest.verify|verify} messages. - * @param message UpdateChannelRequest message or plain object to encode + * Encodes the specified UpdatePipelineRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdatePipelineRequest.verify|verify} messages. + * @param message UpdatePipelineRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IUpdateChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IUpdatePipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateChannelRequest message from the specified reader or buffer. + * Decodes an UpdatePipelineRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateChannelRequest + * @returns UpdatePipelineRequest * @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.eventarc.v1.UpdateChannelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.UpdatePipelineRequest; /** - * Decodes an UpdateChannelRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdatePipelineRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateChannelRequest + * @returns UpdatePipelineRequest * @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.eventarc.v1.UpdateChannelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.UpdatePipelineRequest; /** - * Verifies an UpdateChannelRequest message. + * Verifies an UpdatePipelineRequest 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 UpdateChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdatePipelineRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateChannelRequest + * @returns UpdatePipelineRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.UpdateChannelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.UpdatePipelineRequest; /** - * Creates a plain object from an UpdateChannelRequest message. Also converts values to other types if specified. - * @param message UpdateChannelRequest + * Creates a plain object from an UpdatePipelineRequest message. Also converts values to other types if specified. + * @param message UpdatePipelineRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.UpdateChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.UpdatePipelineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateChannelRequest to JSON. + * Converts this UpdatePipelineRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateChannelRequest + * Gets the default type url for UpdatePipelineRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteChannelRequest. */ - interface IDeleteChannelRequest { + /** Properties of a DeletePipelineRequest. */ + interface IDeletePipelineRequest { - /** DeleteChannelRequest name */ + /** DeletePipelineRequest name */ name?: (string|null); - /** DeleteChannelRequest validateOnly */ + /** DeletePipelineRequest etag */ + etag?: (string|null); + + /** DeletePipelineRequest allowMissing */ + allowMissing?: (boolean|null); + + /** DeletePipelineRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents a DeleteChannelRequest. */ - class DeleteChannelRequest implements IDeleteChannelRequest { + /** Represents a DeletePipelineRequest. */ + class DeletePipelineRequest implements IDeletePipelineRequest { /** - * Constructs a new DeleteChannelRequest. + * Constructs a new DeletePipelineRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IDeleteChannelRequest); + constructor(properties?: google.cloud.eventarc.v1.IDeletePipelineRequest); - /** DeleteChannelRequest name. */ + /** DeletePipelineRequest name. */ public name: string; - /** DeleteChannelRequest validateOnly. */ + /** DeletePipelineRequest etag. */ + public etag: string; + + /** DeletePipelineRequest allowMissing. */ + public allowMissing: boolean; + + /** DeletePipelineRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new DeleteChannelRequest instance using the specified properties. + * Creates a new DeletePipelineRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteChannelRequest instance + * @returns DeletePipelineRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IDeleteChannelRequest): google.cloud.eventarc.v1.DeleteChannelRequest; + public static create(properties?: google.cloud.eventarc.v1.IDeletePipelineRequest): google.cloud.eventarc.v1.DeletePipelineRequest; /** - * Encodes the specified DeleteChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelRequest.verify|verify} messages. - * @param message DeleteChannelRequest message or plain object to encode + * Encodes the specified DeletePipelineRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeletePipelineRequest.verify|verify} messages. + * @param message DeletePipelineRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IDeleteChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IDeletePipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelRequest.verify|verify} messages. - * @param message DeleteChannelRequest message or plain object to encode + * Encodes the specified DeletePipelineRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeletePipelineRequest.verify|verify} messages. + * @param message DeletePipelineRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IDeleteChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IDeletePipelineRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteChannelRequest message from the specified reader or buffer. + * Decodes a DeletePipelineRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteChannelRequest + * @returns DeletePipelineRequest * @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.eventarc.v1.DeleteChannelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.DeletePipelineRequest; /** - * Decodes a DeleteChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a DeletePipelineRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteChannelRequest + * @returns DeletePipelineRequest * @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.eventarc.v1.DeleteChannelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.DeletePipelineRequest; /** - * Verifies a DeleteChannelRequest message. + * Verifies a DeletePipelineRequest 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 DeleteChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePipelineRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteChannelRequest + * @returns DeletePipelineRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.DeleteChannelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.DeletePipelineRequest; /** - * Creates a plain object from a DeleteChannelRequest message. Also converts values to other types if specified. - * @param message DeleteChannelRequest + * Creates a plain object from a DeletePipelineRequest message. Also converts values to other types if specified. + * @param message DeletePipelineRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.DeleteChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.DeletePipelineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteChannelRequest to JSON. + * Converts this DeletePipelineRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteChannelRequest + * Gets the default type url for DeletePipelineRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetProviderRequest. */ - interface IGetProviderRequest { + /** Properties of a GetGoogleApiSourceRequest. */ + interface IGetGoogleApiSourceRequest { - /** GetProviderRequest name */ + /** GetGoogleApiSourceRequest name */ name?: (string|null); } - /** Represents a GetProviderRequest. */ - class GetProviderRequest implements IGetProviderRequest { + /** Represents a GetGoogleApiSourceRequest. */ + class GetGoogleApiSourceRequest implements IGetGoogleApiSourceRequest { /** - * Constructs a new GetProviderRequest. + * Constructs a new GetGoogleApiSourceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IGetProviderRequest); + constructor(properties?: google.cloud.eventarc.v1.IGetGoogleApiSourceRequest); - /** GetProviderRequest name. */ + /** GetGoogleApiSourceRequest name. */ public name: string; /** - * Creates a new GetProviderRequest instance using the specified properties. + * Creates a new GetGoogleApiSourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetProviderRequest instance + * @returns GetGoogleApiSourceRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IGetProviderRequest): google.cloud.eventarc.v1.GetProviderRequest; + public static create(properties?: google.cloud.eventarc.v1.IGetGoogleApiSourceRequest): google.cloud.eventarc.v1.GetGoogleApiSourceRequest; /** - * Encodes the specified GetProviderRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetProviderRequest.verify|verify} messages. - * @param message GetProviderRequest message or plain object to encode + * Encodes the specified GetGoogleApiSourceRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleApiSourceRequest.verify|verify} messages. + * @param message GetGoogleApiSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IGetProviderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IGetGoogleApiSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetProviderRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetProviderRequest.verify|verify} messages. - * @param message GetProviderRequest message or plain object to encode + * Encodes the specified GetGoogleApiSourceRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleApiSourceRequest.verify|verify} messages. + * @param message GetGoogleApiSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IGetProviderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IGetGoogleApiSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetProviderRequest message from the specified reader or buffer. + * Decodes a GetGoogleApiSourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetProviderRequest + * @returns GetGoogleApiSourceRequest * @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.eventarc.v1.GetProviderRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.GetGoogleApiSourceRequest; /** - * Decodes a GetProviderRequest message from the specified reader or buffer, length delimited. + * Decodes a GetGoogleApiSourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetProviderRequest + * @returns GetGoogleApiSourceRequest * @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.eventarc.v1.GetProviderRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.GetGoogleApiSourceRequest; /** - * Verifies a GetProviderRequest message. + * Verifies a GetGoogleApiSourceRequest 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 GetProviderRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetGoogleApiSourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetProviderRequest + * @returns GetGoogleApiSourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetProviderRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetGoogleApiSourceRequest; /** - * Creates a plain object from a GetProviderRequest message. Also converts values to other types if specified. - * @param message GetProviderRequest + * Creates a plain object from a GetGoogleApiSourceRequest message. Also converts values to other types if specified. + * @param message GetGoogleApiSourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.GetProviderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.GetGoogleApiSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetProviderRequest to JSON. + * Converts this GetGoogleApiSourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetProviderRequest + * Gets the default type url for GetGoogleApiSourceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListProvidersRequest. */ - interface IListProvidersRequest { + /** Properties of a ListGoogleApiSourcesRequest. */ + interface IListGoogleApiSourcesRequest { - /** ListProvidersRequest parent */ + /** ListGoogleApiSourcesRequest parent */ parent?: (string|null); - /** ListProvidersRequest pageSize */ + /** ListGoogleApiSourcesRequest pageSize */ pageSize?: (number|null); - /** ListProvidersRequest pageToken */ + /** ListGoogleApiSourcesRequest pageToken */ pageToken?: (string|null); - /** ListProvidersRequest orderBy */ + /** ListGoogleApiSourcesRequest orderBy */ orderBy?: (string|null); - /** ListProvidersRequest filter */ + /** ListGoogleApiSourcesRequest filter */ filter?: (string|null); } - /** Represents a ListProvidersRequest. */ - class ListProvidersRequest implements IListProvidersRequest { + /** Represents a ListGoogleApiSourcesRequest. */ + class ListGoogleApiSourcesRequest implements IListGoogleApiSourcesRequest { /** - * Constructs a new ListProvidersRequest. + * Constructs a new ListGoogleApiSourcesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IListProvidersRequest); + constructor(properties?: google.cloud.eventarc.v1.IListGoogleApiSourcesRequest); - /** ListProvidersRequest parent. */ + /** ListGoogleApiSourcesRequest parent. */ public parent: string; - /** ListProvidersRequest pageSize. */ + /** ListGoogleApiSourcesRequest pageSize. */ public pageSize: number; - /** ListProvidersRequest pageToken. */ + /** ListGoogleApiSourcesRequest pageToken. */ public pageToken: string; - /** ListProvidersRequest orderBy. */ + /** ListGoogleApiSourcesRequest orderBy. */ public orderBy: string; - /** ListProvidersRequest filter. */ + /** ListGoogleApiSourcesRequest filter. */ public filter: string; /** - * Creates a new ListProvidersRequest instance using the specified properties. + * Creates a new ListGoogleApiSourcesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListProvidersRequest instance + * @returns ListGoogleApiSourcesRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IListProvidersRequest): google.cloud.eventarc.v1.ListProvidersRequest; + public static create(properties?: google.cloud.eventarc.v1.IListGoogleApiSourcesRequest): google.cloud.eventarc.v1.ListGoogleApiSourcesRequest; /** - * Encodes the specified ListProvidersRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersRequest.verify|verify} messages. - * @param message ListProvidersRequest message or plain object to encode + * Encodes the specified ListGoogleApiSourcesRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListGoogleApiSourcesRequest.verify|verify} messages. + * @param message ListGoogleApiSourcesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IListProvidersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListProvidersRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersRequest.verify|verify} messages. - * @param message ListProvidersRequest message or plain object to encode + * Encodes the specified ListGoogleApiSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListGoogleApiSourcesRequest.verify|verify} messages. + * @param message ListGoogleApiSourcesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IListProvidersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListProvidersRequest message from the specified reader or buffer. + * Decodes a ListGoogleApiSourcesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListProvidersRequest + * @returns ListGoogleApiSourcesRequest * @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.eventarc.v1.ListProvidersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.ListGoogleApiSourcesRequest; /** - * Decodes a ListProvidersRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGoogleApiSourcesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListProvidersRequest + * @returns ListGoogleApiSourcesRequest * @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.eventarc.v1.ListProvidersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.ListGoogleApiSourcesRequest; /** - * Verifies a ListProvidersRequest message. + * Verifies a ListGoogleApiSourcesRequest 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 ListProvidersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGoogleApiSourcesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListProvidersRequest + * @returns ListGoogleApiSourcesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListProvidersRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListGoogleApiSourcesRequest; /** - * Creates a plain object from a ListProvidersRequest message. Also converts values to other types if specified. - * @param message ListProvidersRequest + * Creates a plain object from a ListGoogleApiSourcesRequest message. Also converts values to other types if specified. + * @param message ListGoogleApiSourcesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.ListProvidersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.ListGoogleApiSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListProvidersRequest to JSON. + * Converts this ListGoogleApiSourcesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListProvidersRequest + * Gets the default type url for ListGoogleApiSourcesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListProvidersResponse. */ - interface IListProvidersResponse { + /** Properties of a ListGoogleApiSourcesResponse. */ + interface IListGoogleApiSourcesResponse { - /** ListProvidersResponse providers */ - providers?: (google.cloud.eventarc.v1.IProvider[]|null); + /** ListGoogleApiSourcesResponse googleApiSources */ + googleApiSources?: (google.cloud.eventarc.v1.IGoogleApiSource[]|null); - /** ListProvidersResponse nextPageToken */ + /** ListGoogleApiSourcesResponse nextPageToken */ nextPageToken?: (string|null); - /** ListProvidersResponse unreachable */ + /** ListGoogleApiSourcesResponse unreachable */ unreachable?: (string[]|null); } - /** Represents a ListProvidersResponse. */ - class ListProvidersResponse implements IListProvidersResponse { + /** Represents a ListGoogleApiSourcesResponse. */ + class ListGoogleApiSourcesResponse implements IListGoogleApiSourcesResponse { /** - * Constructs a new ListProvidersResponse. + * Constructs a new ListGoogleApiSourcesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IListProvidersResponse); + constructor(properties?: google.cloud.eventarc.v1.IListGoogleApiSourcesResponse); - /** ListProvidersResponse providers. */ - public providers: google.cloud.eventarc.v1.IProvider[]; + /** ListGoogleApiSourcesResponse googleApiSources. */ + public googleApiSources: google.cloud.eventarc.v1.IGoogleApiSource[]; - /** ListProvidersResponse nextPageToken. */ + /** ListGoogleApiSourcesResponse nextPageToken. */ public nextPageToken: string; - /** ListProvidersResponse unreachable. */ + /** ListGoogleApiSourcesResponse unreachable. */ public unreachable: string[]; /** - * Creates a new ListProvidersResponse instance using the specified properties. + * Creates a new ListGoogleApiSourcesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListProvidersResponse instance + * @returns ListGoogleApiSourcesResponse instance */ - public static create(properties?: google.cloud.eventarc.v1.IListProvidersResponse): google.cloud.eventarc.v1.ListProvidersResponse; + public static create(properties?: google.cloud.eventarc.v1.IListGoogleApiSourcesResponse): google.cloud.eventarc.v1.ListGoogleApiSourcesResponse; /** - * Encodes the specified ListProvidersResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersResponse.verify|verify} messages. - * @param message ListProvidersResponse message or plain object to encode + * Encodes the specified ListGoogleApiSourcesResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListGoogleApiSourcesResponse.verify|verify} messages. + * @param message ListGoogleApiSourcesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IListProvidersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IListGoogleApiSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListProvidersResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersResponse.verify|verify} messages. - * @param message ListProvidersResponse message or plain object to encode + * Encodes the specified ListGoogleApiSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListGoogleApiSourcesResponse.verify|verify} messages. + * @param message ListGoogleApiSourcesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IListProvidersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IListGoogleApiSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListProvidersResponse message from the specified reader or buffer. + * Decodes a ListGoogleApiSourcesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListProvidersResponse + * @returns ListGoogleApiSourcesResponse * @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.eventarc.v1.ListProvidersResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.ListGoogleApiSourcesResponse; /** - * Decodes a ListProvidersResponse message from the specified reader or buffer, length delimited. + * Decodes a ListGoogleApiSourcesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListProvidersResponse + * @returns ListGoogleApiSourcesResponse * @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.eventarc.v1.ListProvidersResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.ListGoogleApiSourcesResponse; /** - * Verifies a ListProvidersResponse message. + * Verifies a ListGoogleApiSourcesResponse 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 ListProvidersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListGoogleApiSourcesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListProvidersResponse + * @returns ListGoogleApiSourcesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListProvidersResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListGoogleApiSourcesResponse; /** - * Creates a plain object from a ListProvidersResponse message. Also converts values to other types if specified. - * @param message ListProvidersResponse + * Creates a plain object from a ListGoogleApiSourcesResponse message. Also converts values to other types if specified. + * @param message ListGoogleApiSourcesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.ListProvidersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.ListGoogleApiSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListProvidersResponse to JSON. + * Converts this ListGoogleApiSourcesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListProvidersResponse + * Gets the default type url for ListGoogleApiSourcesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetChannelConnectionRequest. */ - interface IGetChannelConnectionRequest { + /** Properties of a CreateGoogleApiSourceRequest. */ + interface ICreateGoogleApiSourceRequest { - /** GetChannelConnectionRequest name */ - name?: (string|null); + /** CreateGoogleApiSourceRequest parent */ + parent?: (string|null); + + /** CreateGoogleApiSourceRequest googleApiSource */ + googleApiSource?: (google.cloud.eventarc.v1.IGoogleApiSource|null); + + /** CreateGoogleApiSourceRequest googleApiSourceId */ + googleApiSourceId?: (string|null); + + /** CreateGoogleApiSourceRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a GetChannelConnectionRequest. */ - class GetChannelConnectionRequest implements IGetChannelConnectionRequest { + /** Represents a CreateGoogleApiSourceRequest. */ + class CreateGoogleApiSourceRequest implements ICreateGoogleApiSourceRequest { /** - * Constructs a new GetChannelConnectionRequest. + * Constructs a new CreateGoogleApiSourceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IGetChannelConnectionRequest); + constructor(properties?: google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest); - /** GetChannelConnectionRequest name. */ - public name: string; + /** CreateGoogleApiSourceRequest parent. */ + public parent: string; + + /** CreateGoogleApiSourceRequest googleApiSource. */ + public googleApiSource?: (google.cloud.eventarc.v1.IGoogleApiSource|null); + + /** CreateGoogleApiSourceRequest googleApiSourceId. */ + public googleApiSourceId: string; + + /** CreateGoogleApiSourceRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new GetChannelConnectionRequest instance using the specified properties. + * Creates a new CreateGoogleApiSourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetChannelConnectionRequest instance + * @returns CreateGoogleApiSourceRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IGetChannelConnectionRequest): google.cloud.eventarc.v1.GetChannelConnectionRequest; + public static create(properties?: google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest): google.cloud.eventarc.v1.CreateGoogleApiSourceRequest; /** - * Encodes the specified GetChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelConnectionRequest.verify|verify} messages. - * @param message GetChannelConnectionRequest message or plain object to encode + * Encodes the specified CreateGoogleApiSourceRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateGoogleApiSourceRequest.verify|verify} messages. + * @param message CreateGoogleApiSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IGetChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelConnectionRequest.verify|verify} messages. - * @param message GetChannelConnectionRequest message or plain object to encode + * Encodes the specified CreateGoogleApiSourceRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateGoogleApiSourceRequest.verify|verify} messages. + * @param message CreateGoogleApiSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IGetChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetChannelConnectionRequest message from the specified reader or buffer. + * Decodes a CreateGoogleApiSourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetChannelConnectionRequest + * @returns CreateGoogleApiSourceRequest * @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.eventarc.v1.GetChannelConnectionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.CreateGoogleApiSourceRequest; /** - * Decodes a GetChannelConnectionRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateGoogleApiSourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetChannelConnectionRequest + * @returns CreateGoogleApiSourceRequest * @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.eventarc.v1.GetChannelConnectionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.CreateGoogleApiSourceRequest; /** - * Verifies a GetChannelConnectionRequest message. + * Verifies a CreateGoogleApiSourceRequest 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 GetChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateGoogleApiSourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetChannelConnectionRequest + * @returns CreateGoogleApiSourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetChannelConnectionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.CreateGoogleApiSourceRequest; /** - * Creates a plain object from a GetChannelConnectionRequest message. Also converts values to other types if specified. - * @param message GetChannelConnectionRequest + * Creates a plain object from a CreateGoogleApiSourceRequest message. Also converts values to other types if specified. + * @param message CreateGoogleApiSourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.GetChannelConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.CreateGoogleApiSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetChannelConnectionRequest to JSON. + * Converts this CreateGoogleApiSourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetChannelConnectionRequest + * Gets the default type url for CreateGoogleApiSourceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListChannelConnectionsRequest. */ - interface IListChannelConnectionsRequest { + /** Properties of an UpdateGoogleApiSourceRequest. */ + interface IUpdateGoogleApiSourceRequest { - /** ListChannelConnectionsRequest parent */ - parent?: (string|null); + /** UpdateGoogleApiSourceRequest googleApiSource */ + googleApiSource?: (google.cloud.eventarc.v1.IGoogleApiSource|null); - /** ListChannelConnectionsRequest pageSize */ - pageSize?: (number|null); + /** UpdateGoogleApiSourceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** ListChannelConnectionsRequest pageToken */ - pageToken?: (string|null); + /** UpdateGoogleApiSourceRequest allowMissing */ + allowMissing?: (boolean|null); + + /** UpdateGoogleApiSourceRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a ListChannelConnectionsRequest. */ - class ListChannelConnectionsRequest implements IListChannelConnectionsRequest { + /** Represents an UpdateGoogleApiSourceRequest. */ + class UpdateGoogleApiSourceRequest implements IUpdateGoogleApiSourceRequest { /** - * Constructs a new ListChannelConnectionsRequest. + * Constructs a new UpdateGoogleApiSourceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IListChannelConnectionsRequest); + constructor(properties?: google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest); - /** ListChannelConnectionsRequest parent. */ - public parent: string; + /** UpdateGoogleApiSourceRequest googleApiSource. */ + public googleApiSource?: (google.cloud.eventarc.v1.IGoogleApiSource|null); - /** ListChannelConnectionsRequest pageSize. */ - public pageSize: number; + /** UpdateGoogleApiSourceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** ListChannelConnectionsRequest pageToken. */ - public pageToken: string; + /** UpdateGoogleApiSourceRequest allowMissing. */ + public allowMissing: boolean; + + /** UpdateGoogleApiSourceRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new ListChannelConnectionsRequest instance using the specified properties. + * Creates a new UpdateGoogleApiSourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListChannelConnectionsRequest instance + * @returns UpdateGoogleApiSourceRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IListChannelConnectionsRequest): google.cloud.eventarc.v1.ListChannelConnectionsRequest; + public static create(properties?: google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest): google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest; /** - * Encodes the specified ListChannelConnectionsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsRequest.verify|verify} messages. - * @param message ListChannelConnectionsRequest message or plain object to encode + * Encodes the specified UpdateGoogleApiSourceRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest.verify|verify} messages. + * @param message UpdateGoogleApiSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IListChannelConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListChannelConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsRequest.verify|verify} messages. - * @param message ListChannelConnectionsRequest message or plain object to encode + * Encodes the specified UpdateGoogleApiSourceRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest.verify|verify} messages. + * @param message UpdateGoogleApiSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IListChannelConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListChannelConnectionsRequest message from the specified reader or buffer. + * Decodes an UpdateGoogleApiSourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListChannelConnectionsRequest + * @returns UpdateGoogleApiSourceRequest * @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.eventarc.v1.ListChannelConnectionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest; /** - * Decodes a ListChannelConnectionsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateGoogleApiSourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListChannelConnectionsRequest + * @returns UpdateGoogleApiSourceRequest * @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.eventarc.v1.ListChannelConnectionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest; /** - * Verifies a ListChannelConnectionsRequest message. + * Verifies an UpdateGoogleApiSourceRequest 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 ListChannelConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateGoogleApiSourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListChannelConnectionsRequest + * @returns UpdateGoogleApiSourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListChannelConnectionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest; /** - * Creates a plain object from a ListChannelConnectionsRequest message. Also converts values to other types if specified. - * @param message ListChannelConnectionsRequest + * Creates a plain object from an UpdateGoogleApiSourceRequest message. Also converts values to other types if specified. + * @param message UpdateGoogleApiSourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.ListChannelConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListChannelConnectionsRequest to JSON. + * Converts this UpdateGoogleApiSourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListChannelConnectionsRequest + * Gets the default type url for UpdateGoogleApiSourceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListChannelConnectionsResponse. */ - interface IListChannelConnectionsResponse { + /** Properties of a DeleteGoogleApiSourceRequest. */ + interface IDeleteGoogleApiSourceRequest { - /** ListChannelConnectionsResponse channelConnections */ - channelConnections?: (google.cloud.eventarc.v1.IChannelConnection[]|null); + /** DeleteGoogleApiSourceRequest name */ + name?: (string|null); - /** ListChannelConnectionsResponse nextPageToken */ - nextPageToken?: (string|null); + /** DeleteGoogleApiSourceRequest etag */ + etag?: (string|null); - /** ListChannelConnectionsResponse unreachable */ - unreachable?: (string[]|null); + /** DeleteGoogleApiSourceRequest allowMissing */ + allowMissing?: (boolean|null); + + /** DeleteGoogleApiSourceRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a ListChannelConnectionsResponse. */ - class ListChannelConnectionsResponse implements IListChannelConnectionsResponse { + /** Represents a DeleteGoogleApiSourceRequest. */ + class DeleteGoogleApiSourceRequest implements IDeleteGoogleApiSourceRequest { /** - * Constructs a new ListChannelConnectionsResponse. + * Constructs a new DeleteGoogleApiSourceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IListChannelConnectionsResponse); + constructor(properties?: google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest); - /** ListChannelConnectionsResponse channelConnections. */ - public channelConnections: google.cloud.eventarc.v1.IChannelConnection[]; + /** DeleteGoogleApiSourceRequest name. */ + public name: string; - /** ListChannelConnectionsResponse nextPageToken. */ - public nextPageToken: string; + /** DeleteGoogleApiSourceRequest etag. */ + public etag: string; - /** ListChannelConnectionsResponse unreachable. */ - public unreachable: string[]; + /** DeleteGoogleApiSourceRequest allowMissing. */ + public allowMissing: boolean; + + /** DeleteGoogleApiSourceRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new ListChannelConnectionsResponse instance using the specified properties. + * Creates a new DeleteGoogleApiSourceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListChannelConnectionsResponse instance + * @returns DeleteGoogleApiSourceRequest instance */ - public static create(properties?: google.cloud.eventarc.v1.IListChannelConnectionsResponse): google.cloud.eventarc.v1.ListChannelConnectionsResponse; + public static create(properties?: google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest): google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest; /** - * Encodes the specified ListChannelConnectionsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsResponse.verify|verify} messages. - * @param message ListChannelConnectionsResponse message or plain object to encode + * Encodes the specified DeleteGoogleApiSourceRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest.verify|verify} messages. + * @param message DeleteGoogleApiSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IListChannelConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListChannelConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsResponse.verify|verify} messages. - * @param message ListChannelConnectionsResponse message or plain object to encode + * Encodes the specified DeleteGoogleApiSourceRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest.verify|verify} messages. + * @param message DeleteGoogleApiSourceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IListChannelConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListChannelConnectionsResponse message from the specified reader or buffer. + * Decodes a DeleteGoogleApiSourceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListChannelConnectionsResponse + * @returns DeleteGoogleApiSourceRequest * @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.eventarc.v1.ListChannelConnectionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest; /** - * Decodes a ListChannelConnectionsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteGoogleApiSourceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListChannelConnectionsResponse + * @returns DeleteGoogleApiSourceRequest * @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.eventarc.v1.ListChannelConnectionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest; /** - * Verifies a ListChannelConnectionsResponse message. + * Verifies a DeleteGoogleApiSourceRequest 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 ListChannelConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteGoogleApiSourceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListChannelConnectionsResponse + * @returns DeleteGoogleApiSourceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.ListChannelConnectionsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest; /** - * Creates a plain object from a ListChannelConnectionsResponse message. Also converts values to other types if specified. - * @param message ListChannelConnectionsResponse + * Creates a plain object from a DeleteGoogleApiSourceRequest message. Also converts values to other types if specified. + * @param message DeleteGoogleApiSourceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.ListChannelConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListChannelConnectionsResponse to JSON. + * Converts this DeleteGoogleApiSourceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListChannelConnectionsResponse + * Gets the default type url for DeleteGoogleApiSourceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateChannelConnectionRequest. */ - interface ICreateChannelConnectionRequest { + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { - /** CreateChannelConnectionRequest parent */ - parent?: (string|null); + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** CreateChannelConnectionRequest channelConnection */ - channelConnection?: (google.cloud.eventarc.v1.IChannelConnection|null); + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** CreateChannelConnectionRequest channelConnectionId */ - channelConnectionId?: (string|null); + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); } - /** Represents a CreateChannelConnectionRequest. */ - class CreateChannelConnectionRequest implements ICreateChannelConnectionRequest { + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { /** - * Constructs a new CreateChannelConnectionRequest. + * Constructs a new OperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.ICreateChannelConnectionRequest); + constructor(properties?: google.cloud.eventarc.v1.IOperationMetadata); - /** CreateChannelConnectionRequest parent. */ - public parent: string; + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** CreateChannelConnectionRequest channelConnection. */ - public channelConnection?: (google.cloud.eventarc.v1.IChannelConnection|null); + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** CreateChannelConnectionRequest channelConnectionId. */ - public channelConnectionId: string; + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; /** - * Creates a new CreateChannelConnectionRequest instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns CreateChannelConnectionRequest instance + * @returns OperationMetadata instance */ - public static create(properties?: google.cloud.eventarc.v1.ICreateChannelConnectionRequest): google.cloud.eventarc.v1.CreateChannelConnectionRequest; + public static create(properties?: google.cloud.eventarc.v1.IOperationMetadata): google.cloud.eventarc.v1.OperationMetadata; /** - * Encodes the specified CreateChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelConnectionRequest.verify|verify} messages. - * @param message CreateChannelConnectionRequest message or plain object to encode + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.eventarc.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.ICreateChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelConnectionRequest.verify|verify} messages. - * @param message CreateChannelConnectionRequest message or plain object to encode + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.ICreateChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateChannelConnectionRequest message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateChannelConnectionRequest + * @returns OperationMetadata * @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.eventarc.v1.CreateChannelConnectionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.OperationMetadata; /** - * Decodes a CreateChannelConnectionRequest message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateChannelConnectionRequest + * @returns OperationMetadata * @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.eventarc.v1.CreateChannelConnectionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.OperationMetadata; /** - * Verifies a CreateChannelConnectionRequest message. + * Verifies an OperationMetadata 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 CreateChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateChannelConnectionRequest + * @returns OperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.CreateChannelConnectionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.OperationMetadata; /** - * Creates a plain object from a CreateChannelConnectionRequest message. Also converts values to other types if specified. - * @param message CreateChannelConnectionRequest + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.CreateChannelConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateChannelConnectionRequest to JSON. + * Converts this OperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateChannelConnectionRequest + * Gets the default type url for OperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteChannelConnectionRequest. */ - interface IDeleteChannelConnectionRequest { + /** Properties of a GoogleApiSource. */ + interface IGoogleApiSource { - /** DeleteChannelConnectionRequest name */ + /** GoogleApiSource name */ name?: (string|null); + + /** GoogleApiSource uid */ + uid?: (string|null); + + /** GoogleApiSource etag */ + etag?: (string|null); + + /** GoogleApiSource createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** GoogleApiSource updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** GoogleApiSource labels */ + labels?: ({ [k: string]: string }|null); + + /** GoogleApiSource annotations */ + annotations?: ({ [k: string]: string }|null); + + /** GoogleApiSource displayName */ + displayName?: (string|null); + + /** GoogleApiSource destination */ + destination?: (string|null); + + /** GoogleApiSource cryptoKeyName */ + cryptoKeyName?: (string|null); + + /** GoogleApiSource loggingConfig */ + loggingConfig?: (google.cloud.eventarc.v1.ILoggingConfig|null); } - /** Represents a DeleteChannelConnectionRequest. */ - class DeleteChannelConnectionRequest implements IDeleteChannelConnectionRequest { + /** Represents a GoogleApiSource. */ + class GoogleApiSource implements IGoogleApiSource { /** - * Constructs a new DeleteChannelConnectionRequest. + * Constructs a new GoogleApiSource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IDeleteChannelConnectionRequest); + constructor(properties?: google.cloud.eventarc.v1.IGoogleApiSource); - /** DeleteChannelConnectionRequest name. */ + /** GoogleApiSource name. */ public name: string; + /** GoogleApiSource uid. */ + public uid: string; + + /** GoogleApiSource etag. */ + public etag: string; + + /** GoogleApiSource createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** GoogleApiSource updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** GoogleApiSource labels. */ + public labels: { [k: string]: string }; + + /** GoogleApiSource annotations. */ + public annotations: { [k: string]: string }; + + /** GoogleApiSource displayName. */ + public displayName: string; + + /** GoogleApiSource destination. */ + public destination: string; + + /** GoogleApiSource cryptoKeyName. */ + public cryptoKeyName: string; + + /** GoogleApiSource loggingConfig. */ + public loggingConfig?: (google.cloud.eventarc.v1.ILoggingConfig|null); + /** - * Creates a new DeleteChannelConnectionRequest instance using the specified properties. + * Creates a new GoogleApiSource instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteChannelConnectionRequest instance + * @returns GoogleApiSource instance */ - public static create(properties?: google.cloud.eventarc.v1.IDeleteChannelConnectionRequest): google.cloud.eventarc.v1.DeleteChannelConnectionRequest; + public static create(properties?: google.cloud.eventarc.v1.IGoogleApiSource): google.cloud.eventarc.v1.GoogleApiSource; /** - * Encodes the specified DeleteChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelConnectionRequest.verify|verify} messages. - * @param message DeleteChannelConnectionRequest message or plain object to encode + * Encodes the specified GoogleApiSource message. Does not implicitly {@link google.cloud.eventarc.v1.GoogleApiSource.verify|verify} messages. + * @param message GoogleApiSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IGoogleApiSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelConnectionRequest.verify|verify} messages. - * @param message DeleteChannelConnectionRequest message or plain object to encode + * Encodes the specified GoogleApiSource message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GoogleApiSource.verify|verify} messages. + * @param message GoogleApiSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IGoogleApiSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteChannelConnectionRequest message from the specified reader or buffer. + * Decodes a GoogleApiSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteChannelConnectionRequest + * @returns GoogleApiSource * @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.eventarc.v1.DeleteChannelConnectionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.GoogleApiSource; /** - * Decodes a DeleteChannelConnectionRequest message from the specified reader or buffer, length delimited. + * Decodes a GoogleApiSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteChannelConnectionRequest + * @returns GoogleApiSource * @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.eventarc.v1.DeleteChannelConnectionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.GoogleApiSource; /** - * Verifies a DeleteChannelConnectionRequest message. + * Verifies a GoogleApiSource 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 DeleteChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GoogleApiSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteChannelConnectionRequest + * @returns GoogleApiSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.DeleteChannelConnectionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GoogleApiSource; /** - * Creates a plain object from a DeleteChannelConnectionRequest message. Also converts values to other types if specified. - * @param message DeleteChannelConnectionRequest + * Creates a plain object from a GoogleApiSource message. Also converts values to other types if specified. + * @param message GoogleApiSource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.DeleteChannelConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.GoogleApiSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteChannelConnectionRequest to JSON. + * Converts this GoogleApiSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteChannelConnectionRequest + * Gets the default type url for GoogleApiSource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateGoogleChannelConfigRequest. */ - interface IUpdateGoogleChannelConfigRequest { - - /** UpdateGoogleChannelConfigRequest googleChannelConfig */ - googleChannelConfig?: (google.cloud.eventarc.v1.IGoogleChannelConfig|null); + /** Properties of a LoggingConfig. */ + interface ILoggingConfig { - /** UpdateGoogleChannelConfigRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** LoggingConfig logSeverity */ + logSeverity?: (google.cloud.eventarc.v1.LoggingConfig.LogSeverity|keyof typeof google.cloud.eventarc.v1.LoggingConfig.LogSeverity|null); } - /** Represents an UpdateGoogleChannelConfigRequest. */ - class UpdateGoogleChannelConfigRequest implements IUpdateGoogleChannelConfigRequest { + /** Represents a LoggingConfig. */ + class LoggingConfig implements ILoggingConfig { /** - * Constructs a new UpdateGoogleChannelConfigRequest. + * Constructs a new LoggingConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest); + constructor(properties?: google.cloud.eventarc.v1.ILoggingConfig); - /** UpdateGoogleChannelConfigRequest googleChannelConfig. */ - public googleChannelConfig?: (google.cloud.eventarc.v1.IGoogleChannelConfig|null); - - /** UpdateGoogleChannelConfigRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** LoggingConfig logSeverity. */ + public logSeverity: (google.cloud.eventarc.v1.LoggingConfig.LogSeverity|keyof typeof google.cloud.eventarc.v1.LoggingConfig.LogSeverity); /** - * Creates a new UpdateGoogleChannelConfigRequest instance using the specified properties. + * Creates a new LoggingConfig instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateGoogleChannelConfigRequest instance + * @returns LoggingConfig instance */ - public static create(properties?: google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest): google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest; + public static create(properties?: google.cloud.eventarc.v1.ILoggingConfig): google.cloud.eventarc.v1.LoggingConfig; /** - * Encodes the specified UpdateGoogleChannelConfigRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.verify|verify} messages. - * @param message UpdateGoogleChannelConfigRequest message or plain object to encode + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.eventarc.v1.LoggingConfig.verify|verify} messages. + * @param message LoggingConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateGoogleChannelConfigRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.verify|verify} messages. - * @param message UpdateGoogleChannelConfigRequest message or plain object to encode + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.LoggingConfig.verify|verify} messages. + * @param message LoggingConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateGoogleChannelConfigRequest message from the specified reader or buffer. + * Decodes a LoggingConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateGoogleChannelConfigRequest + * @returns LoggingConfig * @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.eventarc.v1.UpdateGoogleChannelConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.LoggingConfig; /** - * Decodes an UpdateGoogleChannelConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateGoogleChannelConfigRequest + * @returns LoggingConfig * @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.eventarc.v1.UpdateGoogleChannelConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.LoggingConfig; /** - * Verifies an UpdateGoogleChannelConfigRequest message. + * Verifies a LoggingConfig 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 UpdateGoogleChannelConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateGoogleChannelConfigRequest + * @returns LoggingConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.LoggingConfig; /** - * Creates a plain object from an UpdateGoogleChannelConfigRequest message. Also converts values to other types if specified. - * @param message UpdateGoogleChannelConfigRequest + * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. + * @param message LoggingConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.LoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateGoogleChannelConfigRequest to JSON. + * Converts this LoggingConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateGoogleChannelConfigRequest + * Gets the default type url for LoggingConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetGoogleChannelConfigRequest. */ - interface IGetGoogleChannelConfigRequest { + namespace LoggingConfig { + + /** LogSeverity enum. */ + enum LogSeverity { + LOG_SEVERITY_UNSPECIFIED = 0, + NONE = 1, + DEBUG = 2, + INFO = 3, + NOTICE = 4, + WARNING = 5, + ERROR = 6, + CRITICAL = 7, + ALERT = 8, + EMERGENCY = 9 + } + } - /** GetGoogleChannelConfigRequest name */ + /** Properties of a GoogleChannelConfig. */ + interface IGoogleChannelConfig { + + /** GoogleChannelConfig name */ name?: (string|null); + + /** GoogleChannelConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** GoogleChannelConfig cryptoKeyName */ + cryptoKeyName?: (string|null); } - /** Represents a GetGoogleChannelConfigRequest. */ - class GetGoogleChannelConfigRequest implements IGetGoogleChannelConfigRequest { + /** Represents a GoogleChannelConfig. */ + class GoogleChannelConfig implements IGoogleChannelConfig { /** - * Constructs a new GetGoogleChannelConfigRequest. + * Constructs a new GoogleChannelConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest); + constructor(properties?: google.cloud.eventarc.v1.IGoogleChannelConfig); - /** GetGoogleChannelConfigRequest name. */ + /** GoogleChannelConfig name. */ public name: string; + /** GoogleChannelConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** GoogleChannelConfig cryptoKeyName. */ + public cryptoKeyName: string; + /** - * Creates a new GetGoogleChannelConfigRequest instance using the specified properties. + * Creates a new GoogleChannelConfig instance using the specified properties. * @param [properties] Properties to set - * @returns GetGoogleChannelConfigRequest instance + * @returns GoogleChannelConfig instance */ - public static create(properties?: google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest): google.cloud.eventarc.v1.GetGoogleChannelConfigRequest; + public static create(properties?: google.cloud.eventarc.v1.IGoogleChannelConfig): google.cloud.eventarc.v1.GoogleChannelConfig; /** - * Encodes the specified GetGoogleChannelConfigRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleChannelConfigRequest.verify|verify} messages. - * @param message GetGoogleChannelConfigRequest message or plain object to encode + * Encodes the specified GoogleChannelConfig message. Does not implicitly {@link google.cloud.eventarc.v1.GoogleChannelConfig.verify|verify} messages. + * @param message GoogleChannelConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IGoogleChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetGoogleChannelConfigRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleChannelConfigRequest.verify|verify} messages. - * @param message GetGoogleChannelConfigRequest message or plain object to encode + * Encodes the specified GoogleChannelConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GoogleChannelConfig.verify|verify} messages. + * @param message GoogleChannelConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IGoogleChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetGoogleChannelConfigRequest message from the specified reader or buffer. + * Decodes a GoogleChannelConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetGoogleChannelConfigRequest + * @returns GoogleChannelConfig * @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.eventarc.v1.GetGoogleChannelConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.GoogleChannelConfig; /** - * Decodes a GetGoogleChannelConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a GoogleChannelConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetGoogleChannelConfigRequest + * @returns GoogleChannelConfig * @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.eventarc.v1.GetGoogleChannelConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.GoogleChannelConfig; /** - * Verifies a GetGoogleChannelConfigRequest message. + * Verifies a GoogleChannelConfig 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 GetGoogleChannelConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GoogleChannelConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetGoogleChannelConfigRequest + * @returns GoogleChannelConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GetGoogleChannelConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GoogleChannelConfig; /** - * Creates a plain object from a GetGoogleChannelConfigRequest message. Also converts values to other types if specified. - * @param message GetGoogleChannelConfigRequest + * Creates a plain object from a GoogleChannelConfig message. Also converts values to other types if specified. + * @param message GoogleChannelConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.GetGoogleChannelConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.GoogleChannelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetGoogleChannelConfigRequest to JSON. + * Converts this GoogleChannelConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetGoogleChannelConfigRequest + * Gets the default type url for GoogleChannelConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { + /** Properties of a MessageBus. */ + interface IMessageBus { - /** OperationMetadata createTime */ + /** MessageBus name */ + name?: (string|null); + + /** MessageBus uid */ + uid?: (string|null); + + /** MessageBus etag */ + etag?: (string|null); + + /** MessageBus createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** MessageBus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** OperationMetadata target */ - target?: (string|null); + /** MessageBus labels */ + labels?: ({ [k: string]: string }|null); - /** OperationMetadata verb */ - verb?: (string|null); + /** MessageBus annotations */ + annotations?: ({ [k: string]: string }|null); - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); + /** MessageBus displayName */ + displayName?: (string|null); - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); + /** MessageBus cryptoKeyName */ + cryptoKeyName?: (string|null); - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); + /** MessageBus loggingConfig */ + loggingConfig?: (google.cloud.eventarc.v1.ILoggingConfig|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a MessageBus. */ + class MessageBus implements IMessageBus { /** - * Constructs a new OperationMetadata. + * Constructs a new MessageBus. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IOperationMetadata); + constructor(properties?: google.cloud.eventarc.v1.IMessageBus); - /** OperationMetadata createTime. */ + /** MessageBus name. */ + public name: string; + + /** MessageBus uid. */ + public uid: string; + + /** MessageBus etag. */ + public etag: string; + + /** MessageBus createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** MessageBus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** OperationMetadata target. */ - public target: string; + /** MessageBus labels. */ + public labels: { [k: string]: string }; - /** OperationMetadata verb. */ - public verb: string; + /** MessageBus annotations. */ + public annotations: { [k: string]: string }; - /** OperationMetadata statusMessage. */ - public statusMessage: string; + /** MessageBus displayName. */ + public displayName: string; - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + /** MessageBus cryptoKeyName. */ + public cryptoKeyName: string; - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** MessageBus loggingConfig. */ + public loggingConfig?: (google.cloud.eventarc.v1.ILoggingConfig|null); /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new MessageBus instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns MessageBus instance */ - public static create(properties?: google.cloud.eventarc.v1.IOperationMetadata): google.cloud.eventarc.v1.OperationMetadata; + public static create(properties?: google.cloud.eventarc.v1.IMessageBus): google.cloud.eventarc.v1.MessageBus; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.eventarc.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified MessageBus message. Does not implicitly {@link google.cloud.eventarc.v1.MessageBus.verify|verify} messages. + * @param message MessageBus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IMessageBus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified MessageBus message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.MessageBus.verify|verify} messages. + * @param message MessageBus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IMessageBus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a MessageBus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns MessageBus * @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.eventarc.v1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.MessageBus; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a MessageBus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns MessageBus * @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.eventarc.v1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.MessageBus; /** - * Verifies an OperationMetadata message. + * Verifies a MessageBus 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a MessageBus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns MessageBus */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.MessageBus; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a MessageBus message. Also converts values to other types if specified. + * @param message MessageBus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.MessageBus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this MessageBus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for MessageBus * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GoogleChannelConfig. */ - interface IGoogleChannelConfig { + /** Properties of a Pipeline. */ + interface IPipeline { - /** GoogleChannelConfig name */ + /** Pipeline name */ name?: (string|null); - /** GoogleChannelConfig updateTime */ + /** Pipeline createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Pipeline updateTime */ updateTime?: (google.protobuf.ITimestamp|null); - /** GoogleChannelConfig cryptoKeyName */ + /** Pipeline labels */ + labels?: ({ [k: string]: string }|null); + + /** Pipeline uid */ + uid?: (string|null); + + /** Pipeline annotations */ + annotations?: ({ [k: string]: string }|null); + + /** Pipeline displayName */ + displayName?: (string|null); + + /** Pipeline destinations */ + destinations?: (google.cloud.eventarc.v1.Pipeline.IDestination[]|null); + + /** Pipeline mediations */ + mediations?: (google.cloud.eventarc.v1.Pipeline.IMediation[]|null); + + /** Pipeline cryptoKeyName */ cryptoKeyName?: (string|null); + + /** Pipeline inputPayloadFormat */ + inputPayloadFormat?: (google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat|null); + + /** Pipeline loggingConfig */ + loggingConfig?: (google.cloud.eventarc.v1.ILoggingConfig|null); + + /** Pipeline retryPolicy */ + retryPolicy?: (google.cloud.eventarc.v1.Pipeline.IRetryPolicy|null); + + /** Pipeline etag */ + etag?: (string|null); } - /** Represents a GoogleChannelConfig. */ - class GoogleChannelConfig implements IGoogleChannelConfig { + /** Represents a Pipeline. */ + class Pipeline implements IPipeline { /** - * Constructs a new GoogleChannelConfig. + * Constructs a new Pipeline. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.eventarc.v1.IGoogleChannelConfig); + constructor(properties?: google.cloud.eventarc.v1.IPipeline); - /** GoogleChannelConfig name. */ + /** Pipeline name. */ public name: string; - /** GoogleChannelConfig updateTime. */ + /** Pipeline createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Pipeline updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); - /** GoogleChannelConfig cryptoKeyName. */ + /** Pipeline labels. */ + public labels: { [k: string]: string }; + + /** Pipeline uid. */ + public uid: string; + + /** Pipeline annotations. */ + public annotations: { [k: string]: string }; + + /** Pipeline displayName. */ + public displayName: string; + + /** Pipeline destinations. */ + public destinations: google.cloud.eventarc.v1.Pipeline.IDestination[]; + + /** Pipeline mediations. */ + public mediations: google.cloud.eventarc.v1.Pipeline.IMediation[]; + + /** Pipeline cryptoKeyName. */ public cryptoKeyName: string; + /** Pipeline inputPayloadFormat. */ + public inputPayloadFormat?: (google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat|null); + + /** Pipeline loggingConfig. */ + public loggingConfig?: (google.cloud.eventarc.v1.ILoggingConfig|null); + + /** Pipeline retryPolicy. */ + public retryPolicy?: (google.cloud.eventarc.v1.Pipeline.IRetryPolicy|null); + + /** Pipeline etag. */ + public etag: string; + /** - * Creates a new GoogleChannelConfig instance using the specified properties. + * Creates a new Pipeline instance using the specified properties. * @param [properties] Properties to set - * @returns GoogleChannelConfig instance + * @returns Pipeline instance */ - public static create(properties?: google.cloud.eventarc.v1.IGoogleChannelConfig): google.cloud.eventarc.v1.GoogleChannelConfig; + public static create(properties?: google.cloud.eventarc.v1.IPipeline): google.cloud.eventarc.v1.Pipeline; /** - * Encodes the specified GoogleChannelConfig message. Does not implicitly {@link google.cloud.eventarc.v1.GoogleChannelConfig.verify|verify} messages. - * @param message GoogleChannelConfig message or plain object to encode + * Encodes the specified Pipeline message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.verify|verify} messages. + * @param message Pipeline message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.eventarc.v1.IGoogleChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.eventarc.v1.IPipeline, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GoogleChannelConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GoogleChannelConfig.verify|verify} messages. - * @param message GoogleChannelConfig message or plain object to encode + * Encodes the specified Pipeline message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.verify|verify} messages. + * @param message Pipeline message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.eventarc.v1.IGoogleChannelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.eventarc.v1.IPipeline, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GoogleChannelConfig message from the specified reader or buffer. + * Decodes a Pipeline message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GoogleChannelConfig + * @returns Pipeline * @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.eventarc.v1.GoogleChannelConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.v1.Pipeline; /** - * Decodes a GoogleChannelConfig message from the specified reader or buffer, length delimited. + * Decodes a Pipeline message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GoogleChannelConfig + * @returns Pipeline * @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.eventarc.v1.GoogleChannelConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.v1.Pipeline; /** - * Verifies a GoogleChannelConfig message. + * Verifies a Pipeline 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 GoogleChannelConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Pipeline message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GoogleChannelConfig + * @returns Pipeline */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.GoogleChannelConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline; /** - * Creates a plain object from a GoogleChannelConfig message. Also converts values to other types if specified. - * @param message GoogleChannelConfig + * Creates a plain object from a Pipeline message. Also converts values to other types if specified. + * @param message Pipeline * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.eventarc.v1.GoogleChannelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.eventarc.v1.Pipeline, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GoogleChannelConfig to JSON. + * Converts this Pipeline to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GoogleChannelConfig + * Gets the default type url for Pipeline * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace Pipeline { + + /** Properties of a MessagePayloadFormat. */ + interface IMessagePayloadFormat { + + /** MessagePayloadFormat protobuf */ + protobuf?: (google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat|null); + + /** MessagePayloadFormat avro */ + avro?: (google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat|null); + + /** MessagePayloadFormat json */ + json?: (google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat|null); + } + + /** Represents a MessagePayloadFormat. */ + class MessagePayloadFormat implements IMessagePayloadFormat { + + /** + * Constructs a new MessagePayloadFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat); + + /** MessagePayloadFormat protobuf. */ + public protobuf?: (google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat|null); + + /** MessagePayloadFormat avro. */ + public avro?: (google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat|null); + + /** MessagePayloadFormat json. */ + public json?: (google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat|null); + + /** MessagePayloadFormat kind. */ + public kind?: ("protobuf"|"avro"|"json"); + + /** + * Creates a new MessagePayloadFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns MessagePayloadFormat instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat): google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat; + + /** + * Encodes the specified MessagePayloadFormat message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.verify|verify} messages. + * @param message MessagePayloadFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessagePayloadFormat message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.verify|verify} messages. + * @param message MessagePayloadFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessagePayloadFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessagePayloadFormat + * @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.eventarc.v1.Pipeline.MessagePayloadFormat; + + /** + * Decodes a MessagePayloadFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessagePayloadFormat + * @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.eventarc.v1.Pipeline.MessagePayloadFormat; + + /** + * Verifies a MessagePayloadFormat 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 MessagePayloadFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessagePayloadFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat; + + /** + * Creates a plain object from a MessagePayloadFormat message. Also converts values to other types if specified. + * @param message MessagePayloadFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessagePayloadFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessagePayloadFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MessagePayloadFormat { + + /** Properties of a JsonFormat. */ + interface IJsonFormat { + } + + /** Represents a JsonFormat. */ + class JsonFormat implements IJsonFormat { + + /** + * Constructs a new JsonFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat); + + /** + * Creates a new JsonFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns JsonFormat instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat): google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat; + + /** + * Encodes the specified JsonFormat message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat.verify|verify} messages. + * @param message JsonFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JsonFormat message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat.verify|verify} messages. + * @param message JsonFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JsonFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JsonFormat + * @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.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat; + + /** + * Decodes a JsonFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JsonFormat + * @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.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat; + + /** + * Verifies a JsonFormat 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 JsonFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JsonFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat; + + /** + * Creates a plain object from a JsonFormat message. Also converts values to other types if specified. + * @param message JsonFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JsonFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JsonFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProtobufFormat. */ + interface IProtobufFormat { + + /** ProtobufFormat schemaDefinition */ + schemaDefinition?: (string|null); + } + + /** Represents a ProtobufFormat. */ + class ProtobufFormat implements IProtobufFormat { + + /** + * Constructs a new ProtobufFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat); + + /** ProtobufFormat schemaDefinition. */ + public schemaDefinition: string; + + /** + * Creates a new ProtobufFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns ProtobufFormat instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat): google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat; + + /** + * Encodes the specified ProtobufFormat message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat.verify|verify} messages. + * @param message ProtobufFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProtobufFormat message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat.verify|verify} messages. + * @param message ProtobufFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProtobufFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProtobufFormat + * @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.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat; + + /** + * Decodes a ProtobufFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProtobufFormat + * @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.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat; + + /** + * Verifies a ProtobufFormat 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 ProtobufFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProtobufFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat; + + /** + * Creates a plain object from a ProtobufFormat message. Also converts values to other types if specified. + * @param message ProtobufFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProtobufFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtobufFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AvroFormat. */ + interface IAvroFormat { + + /** AvroFormat schemaDefinition */ + schemaDefinition?: (string|null); + } + + /** Represents an AvroFormat. */ + class AvroFormat implements IAvroFormat { + + /** + * Constructs a new AvroFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat); + + /** AvroFormat schemaDefinition. */ + public schemaDefinition: string; + + /** + * Creates a new AvroFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns AvroFormat instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat): google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat; + + /** + * Encodes the specified AvroFormat message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat.verify|verify} messages. + * @param message AvroFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AvroFormat message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat.verify|verify} messages. + * @param message AvroFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AvroFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AvroFormat + * @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.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat; + + /** + * Decodes an AvroFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AvroFormat + * @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.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat; + + /** + * Verifies an AvroFormat 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 AvroFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AvroFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat; + + /** + * Creates a plain object from an AvroFormat message. Also converts values to other types if specified. + * @param message AvroFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AvroFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AvroFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Destination. */ + interface IDestination { + + /** Destination networkConfig */ + networkConfig?: (google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig|null); + + /** Destination httpEndpoint */ + httpEndpoint?: (google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint|null); + + /** Destination workflow */ + workflow?: (string|null); + + /** Destination messageBus */ + messageBus?: (string|null); + + /** Destination topic */ + topic?: (string|null); + + /** Destination authenticationConfig */ + authenticationConfig?: (google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig|null); + + /** Destination outputPayloadFormat */ + outputPayloadFormat?: (google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat|null); + } + + /** Represents a Destination. */ + class Destination implements IDestination { + + /** + * Constructs a new Destination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.IDestination); + + /** Destination networkConfig. */ + public networkConfig?: (google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig|null); + + /** Destination httpEndpoint. */ + public httpEndpoint?: (google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint|null); + + /** Destination workflow. */ + public workflow?: (string|null); + + /** Destination messageBus. */ + public messageBus?: (string|null); + + /** Destination topic. */ + public topic?: (string|null); + + /** Destination authenticationConfig. */ + public authenticationConfig?: (google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig|null); + + /** Destination outputPayloadFormat. */ + public outputPayloadFormat?: (google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat|null); + + /** Destination destinationDescriptor. */ + public destinationDescriptor?: ("httpEndpoint"|"workflow"|"messageBus"|"topic"); + + /** + * Creates a new Destination instance using the specified properties. + * @param [properties] Properties to set + * @returns Destination instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.IDestination): google.cloud.eventarc.v1.Pipeline.Destination; + + /** + * Encodes the specified Destination message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.verify|verify} messages. + * @param message Destination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.IDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.verify|verify} messages. + * @param message Destination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.IDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Destination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Destination + * @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.eventarc.v1.Pipeline.Destination; + + /** + * Decodes a Destination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Destination + * @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.eventarc.v1.Pipeline.Destination; + + /** + * Verifies a Destination 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 Destination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Destination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.Destination; + + /** + * Creates a plain object from a Destination message. Also converts values to other types if specified. + * @param message Destination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.Destination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Destination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Destination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Destination { + + /** Properties of a NetworkConfig. */ + interface INetworkConfig { + + /** NetworkConfig networkAttachment */ + networkAttachment?: (string|null); + } + + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { + + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig); + + /** NetworkConfig networkAttachment. */ + public networkAttachment: string; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig): google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @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.eventarc.v1.Pipeline.Destination.NetworkConfig; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @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.eventarc.v1.Pipeline.Destination.NetworkConfig; + + /** + * Verifies a NetworkConfig 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 NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpEndpoint. */ + interface IHttpEndpoint { + + /** HttpEndpoint uri */ + uri?: (string|null); + + /** HttpEndpoint messageBindingTemplate */ + messageBindingTemplate?: (string|null); + } + + /** Represents a HttpEndpoint. */ + class HttpEndpoint implements IHttpEndpoint { + + /** + * Constructs a new HttpEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint); + + /** HttpEndpoint uri. */ + public uri: string; + + /** HttpEndpoint messageBindingTemplate. */ + public messageBindingTemplate: string; + + /** + * Creates a new HttpEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpEndpoint instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint): google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint; + + /** + * Encodes the specified HttpEndpoint message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint.verify|verify} messages. + * @param message HttpEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpEndpoint message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint.verify|verify} messages. + * @param message HttpEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpEndpoint + * @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.eventarc.v1.Pipeline.Destination.HttpEndpoint; + + /** + * Decodes a HttpEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpEndpoint + * @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.eventarc.v1.Pipeline.Destination.HttpEndpoint; + + /** + * Verifies a HttpEndpoint 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 HttpEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint; + + /** + * Creates a plain object from a HttpEndpoint message. Also converts values to other types if specified. + * @param message HttpEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuthenticationConfig. */ + interface IAuthenticationConfig { + + /** AuthenticationConfig googleOidc */ + googleOidc?: (google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken|null); + + /** AuthenticationConfig oauthToken */ + oauthToken?: (google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken|null); + } + + /** Represents an AuthenticationConfig. */ + class AuthenticationConfig implements IAuthenticationConfig { + + /** + * Constructs a new AuthenticationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig); + + /** AuthenticationConfig googleOidc. */ + public googleOidc?: (google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken|null); + + /** AuthenticationConfig oauthToken. */ + public oauthToken?: (google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken|null); + + /** AuthenticationConfig authenticationMethodDescriptor. */ + public authenticationMethodDescriptor?: ("googleOidc"|"oauthToken"); + + /** + * Creates a new AuthenticationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthenticationConfig instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig): google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig; + + /** + * Encodes the specified AuthenticationConfig message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.verify|verify} messages. + * @param message AuthenticationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthenticationConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.verify|verify} messages. + * @param message AuthenticationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthenticationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuthenticationConfig + * @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.eventarc.v1.Pipeline.Destination.AuthenticationConfig; + + /** + * Decodes an AuthenticationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuthenticationConfig + * @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.eventarc.v1.Pipeline.Destination.AuthenticationConfig; + + /** + * Verifies an AuthenticationConfig 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 AuthenticationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthenticationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig; + + /** + * Creates a plain object from an AuthenticationConfig message. Also converts values to other types if specified. + * @param message AuthenticationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthenticationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuthenticationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuthenticationConfig { + + /** Properties of an OidcToken. */ + interface IOidcToken { + + /** OidcToken serviceAccount */ + serviceAccount?: (string|null); + + /** OidcToken audience */ + audience?: (string|null); + } + + /** Represents an OidcToken. */ + class OidcToken implements IOidcToken { + + /** + * Constructs a new OidcToken. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken); + + /** OidcToken serviceAccount. */ + public serviceAccount: string; + + /** OidcToken audience. */ + public audience: string; + + /** + * Creates a new OidcToken instance using the specified properties. + * @param [properties] Properties to set + * @returns OidcToken instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken): google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken; + + /** + * Encodes the specified OidcToken message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken.verify|verify} messages. + * @param message OidcToken message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OidcToken message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken.verify|verify} messages. + * @param message OidcToken message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OidcToken message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OidcToken + * @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.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken; + + /** + * Decodes an OidcToken message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OidcToken + * @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.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken; + + /** + * Verifies an OidcToken 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 OidcToken message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OidcToken + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken; + + /** + * Creates a plain object from an OidcToken message. Also converts values to other types if specified. + * @param message OidcToken + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OidcToken to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OidcToken + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a OAuthToken. */ + interface IOAuthToken { + + /** OAuthToken serviceAccount */ + serviceAccount?: (string|null); + + /** OAuthToken scope */ + scope?: (string|null); + } + + /** Represents a OAuthToken. */ + class OAuthToken implements IOAuthToken { + + /** + * Constructs a new OAuthToken. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken); + + /** OAuthToken serviceAccount. */ + public serviceAccount: string; + + /** OAuthToken scope. */ + public scope: string; + + /** + * Creates a new OAuthToken instance using the specified properties. + * @param [properties] Properties to set + * @returns OAuthToken instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken): google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken; + + /** + * Encodes the specified OAuthToken message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken.verify|verify} messages. + * @param message OAuthToken message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OAuthToken message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken.verify|verify} messages. + * @param message OAuthToken message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a OAuthToken message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OAuthToken + * @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.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken; + + /** + * Decodes a OAuthToken message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OAuthToken + * @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.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken; + + /** + * Verifies a OAuthToken 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 OAuthToken message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OAuthToken + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken; + + /** + * Creates a plain object from a OAuthToken message. Also converts values to other types if specified. + * @param message OAuthToken + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OAuthToken to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OAuthToken + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a Mediation. */ + interface IMediation { + + /** Mediation transformation */ + transformation?: (google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation|null); + } + + /** Represents a Mediation. */ + class Mediation implements IMediation { + + /** + * Constructs a new Mediation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.IMediation); + + /** Mediation transformation. */ + public transformation?: (google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation|null); + + /** Mediation mediationDescriptor. */ + public mediationDescriptor?: "transformation"; + + /** + * Creates a new Mediation instance using the specified properties. + * @param [properties] Properties to set + * @returns Mediation instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.IMediation): google.cloud.eventarc.v1.Pipeline.Mediation; + + /** + * Encodes the specified Mediation message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Mediation.verify|verify} messages. + * @param message Mediation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.IMediation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Mediation message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Mediation.verify|verify} messages. + * @param message Mediation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.IMediation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Mediation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Mediation + * @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.eventarc.v1.Pipeline.Mediation; + + /** + * Decodes a Mediation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Mediation + * @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.eventarc.v1.Pipeline.Mediation; + + /** + * Verifies a Mediation 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 Mediation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Mediation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.Mediation; + + /** + * Creates a plain object from a Mediation message. Also converts values to other types if specified. + * @param message Mediation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.Mediation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Mediation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Mediation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Mediation { + + /** Properties of a Transformation. */ + interface ITransformation { + + /** Transformation transformationTemplate */ + transformationTemplate?: (string|null); + } + + /** Represents a Transformation. */ + class Transformation implements ITransformation { + + /** + * Constructs a new Transformation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation); + + /** Transformation transformationTemplate. */ + public transformationTemplate: string; + + /** + * Creates a new Transformation instance using the specified properties. + * @param [properties] Properties to set + * @returns Transformation instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation): google.cloud.eventarc.v1.Pipeline.Mediation.Transformation; + + /** + * Encodes the specified Transformation message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Mediation.Transformation.verify|verify} messages. + * @param message Transformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Transformation message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Mediation.Transformation.verify|verify} messages. + * @param message Transformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Transformation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Transformation + * @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.eventarc.v1.Pipeline.Mediation.Transformation; + + /** + * Decodes a Transformation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Transformation + * @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.eventarc.v1.Pipeline.Mediation.Transformation; + + /** + * Verifies a Transformation 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 Transformation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Transformation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.Mediation.Transformation; + + /** + * Creates a plain object from a Transformation message. Also converts values to other types if specified. + * @param message Transformation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.Mediation.Transformation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Transformation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Transformation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RetryPolicy. */ + interface IRetryPolicy { + + /** RetryPolicy maxAttempts */ + maxAttempts?: (number|null); + + /** RetryPolicy minRetryDelay */ + minRetryDelay?: (google.protobuf.IDuration|null); + + /** RetryPolicy maxRetryDelay */ + maxRetryDelay?: (google.protobuf.IDuration|null); + } + + /** Represents a RetryPolicy. */ + class RetryPolicy implements IRetryPolicy { + + /** + * Constructs a new RetryPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.Pipeline.IRetryPolicy); + + /** RetryPolicy maxAttempts. */ + public maxAttempts: number; + + /** RetryPolicy minRetryDelay. */ + public minRetryDelay?: (google.protobuf.IDuration|null); + + /** RetryPolicy maxRetryDelay. */ + public maxRetryDelay?: (google.protobuf.IDuration|null); + + /** + * Creates a new RetryPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns RetryPolicy instance + */ + public static create(properties?: google.cloud.eventarc.v1.Pipeline.IRetryPolicy): google.cloud.eventarc.v1.Pipeline.RetryPolicy; + + /** + * Encodes the specified RetryPolicy message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.RetryPolicy.verify|verify} messages. + * @param message RetryPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.Pipeline.IRetryPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetryPolicy message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.RetryPolicy.verify|verify} messages. + * @param message RetryPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.Pipeline.IRetryPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetryPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetryPolicy + * @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.eventarc.v1.Pipeline.RetryPolicy; + + /** + * Decodes a RetryPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetryPolicy + * @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.eventarc.v1.Pipeline.RetryPolicy; + + /** + * Verifies a RetryPolicy 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 RetryPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetryPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.Pipeline.RetryPolicy; + + /** + * Creates a plain object from a RetryPolicy message. Also converts values to other types if specified. + * @param message RetryPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.Pipeline.RetryPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetryPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetryPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a Trigger. */ interface ITrigger { @@ -3699,6 +9172,12 @@ export namespace google { /** Trigger conditions */ conditions?: ({ [k: string]: google.cloud.eventarc.v1.IStateCondition }|null); + /** Trigger eventDataContentType */ + eventDataContentType?: (string|null); + + /** Trigger satisfiesPzs */ + satisfiesPzs?: (boolean|null); + /** Trigger etag */ etag?: (string|null); } @@ -3745,6 +9224,12 @@ export namespace google { /** Trigger conditions. */ public conditions: { [k: string]: google.cloud.eventarc.v1.IStateCondition }; + /** Trigger eventDataContentType. */ + public eventDataContentType: string; + + /** Trigger satisfiesPzs. */ + public satisfiesPzs: boolean; + /** Trigger etag. */ public etag: string; @@ -4052,6 +9537,12 @@ export namespace google { /** Destination workflow */ workflow?: (string|null); + + /** Destination httpEndpoint */ + httpEndpoint?: (google.cloud.eventarc.v1.IHttpEndpoint|null); + + /** Destination networkConfig */ + networkConfig?: (google.cloud.eventarc.v1.INetworkConfig|null); } /** Represents a Destination. */ @@ -4075,8 +9566,14 @@ export namespace google { /** Destination workflow. */ public workflow?: (string|null); + /** Destination httpEndpoint. */ + public httpEndpoint?: (google.cloud.eventarc.v1.IHttpEndpoint|null); + + /** Destination networkConfig. */ + public networkConfig?: (google.cloud.eventarc.v1.INetworkConfig|null); + /** Destination descriptor. */ - public descriptor?: ("cloudRun"|"cloudFunction"|"gke"|"workflow"); + public descriptor?: ("cloudRun"|"cloudFunction"|"gke"|"workflow"|"httpEndpoint"); /** * Creates a new Destination instance using the specified properties. @@ -4588,6 +10085,200 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a HttpEndpoint. */ + interface IHttpEndpoint { + + /** HttpEndpoint uri */ + uri?: (string|null); + } + + /** Represents a HttpEndpoint. */ + class HttpEndpoint implements IHttpEndpoint { + + /** + * Constructs a new HttpEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.IHttpEndpoint); + + /** HttpEndpoint uri. */ + public uri: string; + + /** + * Creates a new HttpEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpEndpoint instance + */ + public static create(properties?: google.cloud.eventarc.v1.IHttpEndpoint): google.cloud.eventarc.v1.HttpEndpoint; + + /** + * Encodes the specified HttpEndpoint message. Does not implicitly {@link google.cloud.eventarc.v1.HttpEndpoint.verify|verify} messages. + * @param message HttpEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.IHttpEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpEndpoint message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.HttpEndpoint.verify|verify} messages. + * @param message HttpEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.IHttpEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpEndpoint + * @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.eventarc.v1.HttpEndpoint; + + /** + * Decodes a HttpEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpEndpoint + * @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.eventarc.v1.HttpEndpoint; + + /** + * Verifies a HttpEndpoint 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 HttpEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.HttpEndpoint; + + /** + * Creates a plain object from a HttpEndpoint message. Also converts values to other types if specified. + * @param message HttpEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.HttpEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkConfig. */ + interface INetworkConfig { + + /** NetworkConfig networkAttachment */ + networkAttachment?: (string|null); + } + + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { + + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.v1.INetworkConfig); + + /** NetworkConfig networkAttachment. */ + public networkAttachment: string; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance + */ + public static create(properties?: google.cloud.eventarc.v1.INetworkConfig): google.cloud.eventarc.v1.NetworkConfig; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.eventarc.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @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.eventarc.v1.NetworkConfig; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @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.eventarc.v1.NetworkConfig; + + /** + * Verifies a NetworkConfig 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 NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.v1.NetworkConfig; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } } @@ -6706,6 +12397,115 @@ export namespace google { GA = 4, DEPRECATED = 5 } + + /** Properties of a FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.FieldInfo; + + /** + * Verifies a FieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } } /** Namespace protobuf. */ @@ -8880,6 +14680,9 @@ export namespace google { /** FieldOptions .google.api.resourceReference */ ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); } /** Represents a FieldOptions. */ diff --git a/packages/google-cloud-eventarc/protos/protos.js b/packages/google-cloud-eventarc/protos/protos.js index d3d48b06a3d..ac4449d2073 100644 --- a/packages/google-cloud-eventarc/protos/protos.js +++ b/packages/google-cloud-eventarc/protos/protos.js @@ -81,6 +81,7 @@ * @property {google.cloud.eventarc.v1.Channel.State|null} [state] Channel state * @property {string|null} [activationToken] Channel activationToken * @property {string|null} [cryptoKeyName] Channel cryptoKeyName + * @property {boolean|null} [satisfiesPzs] Channel satisfiesPzs */ /** @@ -170,6 +171,14 @@ */ Channel.prototype.cryptoKeyName = ""; + /** + * Channel satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.eventarc.v1.Channel + * @instance + */ + Channel.prototype.satisfiesPzs = false; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -226,6 +235,8 @@ writer.uint32(/* id 10, wireType 2 =*/82).string(message.activationToken); if (message.cryptoKeyName != null && Object.hasOwnProperty.call(message, "cryptoKeyName")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.cryptoKeyName); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.satisfiesPzs); return writer; }; @@ -296,6 +307,10 @@ message.cryptoKeyName = reader.string(); break; } + case 12: { + message.satisfiesPzs = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -372,6 +387,9 @@ if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) if (!$util.isString(message.cryptoKeyName)) return "cryptoKeyName: string expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; return null; }; @@ -433,6 +451,8 @@ message.activationToken = String(object.activationToken); if (object.cryptoKeyName != null) message.cryptoKeyName = String(object.cryptoKeyName); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); return message; }; @@ -458,6 +478,7 @@ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.activationToken = ""; object.cryptoKeyName = ""; + object.satisfiesPzs = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -480,6 +501,8 @@ object.activationToken = message.activationToken; if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) object.cryptoKeyName = message.cryptoKeyName; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; return object; }; @@ -1699,653 +1722,10381 @@ return FilteringAttribute; })(); - v1.Eventarc = (function() { + v1.Enrollment = (function() { /** - * Constructs a new Eventarc service. + * Properties of an Enrollment. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents an Eventarc - * @extends $protobuf.rpc.Service + * @interface IEnrollment + * @property {string|null} [name] Enrollment name + * @property {string|null} [uid] Enrollment uid + * @property {string|null} [etag] Enrollment etag + * @property {google.protobuf.ITimestamp|null} [createTime] Enrollment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Enrollment updateTime + * @property {Object.|null} [labels] Enrollment labels + * @property {Object.|null} [annotations] Enrollment annotations + * @property {string|null} [displayName] Enrollment displayName + * @property {string|null} [celMatch] Enrollment celMatch + * @property {string|null} [messageBus] Enrollment messageBus + * @property {string|null} [destination] Enrollment destination + */ + + /** + * Constructs a new Enrollment. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents an Enrollment. + * @implements IEnrollment * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.eventarc.v1.IEnrollment=} [properties] Properties to set */ - function Eventarc(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function Enrollment(properties) { + this.labels = {}; + this.annotations = {}; + 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]]; } - (Eventarc.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Eventarc; - - /** - * Creates new Eventarc service using the specified rpc implementation. - * @function create - * @memberof google.cloud.eventarc.v1.Eventarc - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Eventarc} RPC service. Useful where requests and/or responses are streamed. - */ - Eventarc.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getTrigger}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef GetTriggerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.v1.Trigger} [response] Trigger - */ - /** - * Calls GetTrigger. - * @function getTrigger - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.IGetTriggerRequest} request GetTriggerRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.GetTriggerCallback} callback Node-style callback called with the error, if any, and Trigger - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Eventarc.prototype.getTrigger = function getTrigger(request, callback) { - return this.rpcCall(getTrigger, $root.google.cloud.eventarc.v1.GetTriggerRequest, $root.google.cloud.eventarc.v1.Trigger, request, callback); - }, "name", { value: "GetTrigger" }); + Enrollment.prototype.name = ""; /** - * Calls GetTrigger. - * @function getTrigger - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment uid. + * @member {string} uid + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.IGetTriggerRequest} request GetTriggerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listTriggers}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef ListTriggersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.v1.ListTriggersResponse} [response] ListTriggersResponse */ + Enrollment.prototype.uid = ""; /** - * Calls ListTriggers. - * @function listTriggers - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment etag. + * @member {string} etag + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.IListTriggersRequest} request ListTriggersRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.ListTriggersCallback} callback Node-style callback called with the error, if any, and ListTriggersResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Eventarc.prototype.listTriggers = function listTriggers(request, callback) { - return this.rpcCall(listTriggers, $root.google.cloud.eventarc.v1.ListTriggersRequest, $root.google.cloud.eventarc.v1.ListTriggersResponse, request, callback); - }, "name", { value: "ListTriggers" }); + Enrollment.prototype.etag = ""; /** - * Calls ListTriggers. - * @function listTriggers - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.IListTriggersRequest} request ListTriggersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createTrigger}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef CreateTriggerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation */ + Enrollment.prototype.createTime = null; /** - * Calls CreateTrigger. - * @function createTrigger - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.ICreateTriggerRequest} request CreateTriggerRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.CreateTriggerCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Eventarc.prototype.createTrigger = function createTrigger(request, callback) { - return this.rpcCall(createTrigger, $root.google.cloud.eventarc.v1.CreateTriggerRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateTrigger" }); + Enrollment.prototype.updateTime = null; /** - * Calls CreateTrigger. - * @function createTrigger - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment labels. + * @member {Object.} labels + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.ICreateTriggerRequest} request CreateTriggerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateTrigger}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef UpdateTriggerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation */ + Enrollment.prototype.labels = $util.emptyObject; /** - * Calls UpdateTrigger. - * @function updateTrigger - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment annotations. + * @member {Object.} annotations + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest} request UpdateTriggerRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.UpdateTriggerCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Eventarc.prototype.updateTrigger = function updateTrigger(request, callback) { - return this.rpcCall(updateTrigger, $root.google.cloud.eventarc.v1.UpdateTriggerRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateTrigger" }); + Enrollment.prototype.annotations = $util.emptyObject; /** - * Calls UpdateTrigger. - * @function updateTrigger - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment displayName. + * @member {string} displayName + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest} request UpdateTriggerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteTrigger}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef DeleteTriggerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation */ + Enrollment.prototype.displayName = ""; /** - * Calls DeleteTrigger. - * @function deleteTrigger - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment celMatch. + * @member {string} celMatch + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest} request DeleteTriggerRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.DeleteTriggerCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Eventarc.prototype.deleteTrigger = function deleteTrigger(request, callback) { - return this.rpcCall(deleteTrigger, $root.google.cloud.eventarc.v1.DeleteTriggerRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteTrigger" }); + Enrollment.prototype.celMatch = ""; /** - * Calls DeleteTrigger. - * @function deleteTrigger - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment messageBus. + * @member {string} messageBus + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest} request DeleteTriggerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getChannel}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef GetChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.v1.Channel} [response] Channel */ + Enrollment.prototype.messageBus = ""; /** - * Calls GetChannel. - * @function getChannel - * @memberof google.cloud.eventarc.v1.Eventarc + * Enrollment destination. + * @member {string} destination + * @memberof google.cloud.eventarc.v1.Enrollment * @instance - * @param {google.cloud.eventarc.v1.IGetChannelRequest} request GetChannelRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.GetChannelCallback} callback Node-style callback called with the error, if any, and Channel - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Eventarc.prototype.getChannel = function getChannel(request, callback) { - return this.rpcCall(getChannel, $root.google.cloud.eventarc.v1.GetChannelRequest, $root.google.cloud.eventarc.v1.Channel, request, callback); - }, "name", { value: "GetChannel" }); + Enrollment.prototype.destination = ""; /** - * Calls GetChannel. - * @function getChannel - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IGetChannelRequest} request GetChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new Enrollment instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Enrollment + * @static + * @param {google.cloud.eventarc.v1.IEnrollment=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Enrollment} Enrollment instance */ + Enrollment.create = function create(properties) { + return new Enrollment(properties); + }; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listChannels}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef ListChannelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.v1.ListChannelsResponse} [response] ListChannelsResponse + * Encodes the specified Enrollment message. Does not implicitly {@link google.cloud.eventarc.v1.Enrollment.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Enrollment + * @static + * @param {google.cloud.eventarc.v1.IEnrollment} message Enrollment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + Enrollment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.etag); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + if (message.celMatch != null && Object.hasOwnProperty.call(message, "celMatch")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.celMatch); + if (message.messageBus != null && Object.hasOwnProperty.call(message, "messageBus")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.messageBus); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.destination); + return writer; + }; /** - * Calls ListChannels. - * @function listChannels - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IListChannelsRequest} request ListChannelsRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.ListChannelsCallback} callback Node-style callback called with the error, if any, and ListChannelsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified Enrollment message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Enrollment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Enrollment + * @static + * @param {google.cloud.eventarc.v1.IEnrollment} message Enrollment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Eventarc.prototype.listChannels = function listChannels(request, callback) { - return this.rpcCall(listChannels, $root.google.cloud.eventarc.v1.ListChannelsRequest, $root.google.cloud.eventarc.v1.ListChannelsResponse, request, callback); - }, "name", { value: "ListChannels" }); + Enrollment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListChannels. - * @function listChannels - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IListChannelsRequest} request ListChannelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an Enrollment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Enrollment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Enrollment} Enrollment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - + Enrollment.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.eventarc.v1.Enrollment(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.etag = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + 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 7: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + case 8: { + message.displayName = reader.string(); + break; + } + case 9: { + message.celMatch = reader.string(); + break; + } + case 10: { + message.messageBus = reader.string(); + break; + } + case 11: { + message.destination = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Enrollment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Enrollment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Enrollment} Enrollment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Enrollment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Enrollment message. + * @function verify + * @memberof google.cloud.eventarc.v1.Enrollment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Enrollment.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: 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.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.celMatch != null && message.hasOwnProperty("celMatch")) + if (!$util.isString(message.celMatch)) + return "celMatch: string expected"; + if (message.messageBus != null && message.hasOwnProperty("messageBus")) + if (!$util.isString(message.messageBus)) + return "messageBus: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + return null; + }; + + /** + * Creates an Enrollment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Enrollment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Enrollment} Enrollment + */ + Enrollment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Enrollment) + return object; + var message = new $root.google.cloud.eventarc.v1.Enrollment(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.etag != null) + message.etag = String(object.etag); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.eventarc.v1.Enrollment.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.eventarc.v1.Enrollment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.eventarc.v1.Enrollment.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.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.eventarc.v1.Enrollment.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.celMatch != null) + message.celMatch = String(object.celMatch); + if (object.messageBus != null) + message.messageBus = String(object.messageBus); + if (object.destination != null) + message.destination = String(object.destination); + return message; + }; + + /** + * Creates a plain object from an Enrollment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Enrollment + * @static + * @param {google.cloud.eventarc.v1.Enrollment} message Enrollment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Enrollment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.etag = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.celMatch = ""; + object.messageBus = ""; + object.destination = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + 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.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.celMatch != null && message.hasOwnProperty("celMatch")) + object.celMatch = message.celMatch; + if (message.messageBus != null && message.hasOwnProperty("messageBus")) + object.messageBus = message.messageBus; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + return object; + }; + + /** + * Converts this Enrollment to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Enrollment + * @instance + * @returns {Object.} JSON object + */ + Enrollment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Enrollment + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Enrollment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Enrollment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Enrollment"; + }; + + return Enrollment; + })(); + + v1.Eventarc = (function() { + + /** + * Constructs a new Eventarc service. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents an Eventarc + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Eventarc(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Eventarc.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Eventarc; + + /** + * Creates new Eventarc service using the specified rpc implementation. + * @function create + * @memberof google.cloud.eventarc.v1.Eventarc + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Eventarc} RPC service. Useful where requests and/or responses are streamed. + */ + Eventarc.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getTrigger}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef GetTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.Trigger} [response] Trigger + */ + + /** + * Calls GetTrigger. + * @function getTrigger + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetTriggerRequest} request GetTriggerRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.GetTriggerCallback} callback Node-style callback called with the error, if any, and Trigger + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.getTrigger = function getTrigger(request, callback) { + return this.rpcCall(getTrigger, $root.google.cloud.eventarc.v1.GetTriggerRequest, $root.google.cloud.eventarc.v1.Trigger, request, callback); + }, "name", { value: "GetTrigger" }); + + /** + * Calls GetTrigger. + * @function getTrigger + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetTriggerRequest} request GetTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listTriggers}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef ListTriggersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.ListTriggersResponse} [response] ListTriggersResponse + */ + + /** + * Calls ListTriggers. + * @function listTriggers + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListTriggersRequest} request ListTriggersRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.ListTriggersCallback} callback Node-style callback called with the error, if any, and ListTriggersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.listTriggers = function listTriggers(request, callback) { + return this.rpcCall(listTriggers, $root.google.cloud.eventarc.v1.ListTriggersRequest, $root.google.cloud.eventarc.v1.ListTriggersResponse, request, callback); + }, "name", { value: "ListTriggers" }); + + /** + * Calls ListTriggers. + * @function listTriggers + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListTriggersRequest} request ListTriggersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createTrigger}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef CreateTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateTrigger. + * @function createTrigger + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateTriggerRequest} request CreateTriggerRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.CreateTriggerCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.createTrigger = function createTrigger(request, callback) { + return this.rpcCall(createTrigger, $root.google.cloud.eventarc.v1.CreateTriggerRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTrigger" }); + + /** + * Calls CreateTrigger. + * @function createTrigger + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateTriggerRequest} request CreateTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateTrigger}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef UpdateTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateTrigger. + * @function updateTrigger + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest} request UpdateTriggerRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.UpdateTriggerCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.updateTrigger = function updateTrigger(request, callback) { + return this.rpcCall(updateTrigger, $root.google.cloud.eventarc.v1.UpdateTriggerRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateTrigger" }); + + /** + * Calls UpdateTrigger. + * @function updateTrigger + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest} request UpdateTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteTrigger}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef DeleteTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteTrigger. + * @function deleteTrigger + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest} request DeleteTriggerRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.DeleteTriggerCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.deleteTrigger = function deleteTrigger(request, callback) { + return this.rpcCall(deleteTrigger, $root.google.cloud.eventarc.v1.DeleteTriggerRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTrigger" }); + + /** + * Calls DeleteTrigger. + * @function deleteTrigger + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest} request DeleteTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getChannel}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef GetChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.Channel} [response] Channel + */ + + /** + * Calls GetChannel. + * @function getChannel + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetChannelRequest} request GetChannelRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.GetChannelCallback} callback Node-style callback called with the error, if any, and Channel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.getChannel = function getChannel(request, callback) { + return this.rpcCall(getChannel, $root.google.cloud.eventarc.v1.GetChannelRequest, $root.google.cloud.eventarc.v1.Channel, request, callback); + }, "name", { value: "GetChannel" }); + + /** + * Calls GetChannel. + * @function getChannel + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetChannelRequest} request GetChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listChannels}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef ListChannelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.ListChannelsResponse} [response] ListChannelsResponse + */ + + /** + * Calls ListChannels. + * @function listChannels + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListChannelsRequest} request ListChannelsRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.ListChannelsCallback} callback Node-style callback called with the error, if any, and ListChannelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.listChannels = function listChannels(request, callback) { + return this.rpcCall(listChannels, $root.google.cloud.eventarc.v1.ListChannelsRequest, $root.google.cloud.eventarc.v1.ListChannelsResponse, request, callback); + }, "name", { value: "ListChannels" }); + + /** + * Calls ListChannels. + * @function listChannels + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListChannelsRequest} request ListChannelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createChannel}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef CreateChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateChannel. + * @function createChannel + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateChannelRequest} request CreateChannelRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.CreateChannelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.createChannel = function createChannel(request, callback) { + return this.rpcCall(createChannel, $root.google.cloud.eventarc.v1.CreateChannelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateChannel" }); + + /** + * Calls CreateChannel. + * @function createChannel + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateChannelRequest} request CreateChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateChannel}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef UpdateChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateChannel. + * @function updateChannel + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateChannelRequest} request UpdateChannelRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.UpdateChannelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.updateChannel = function updateChannel(request, callback) { + return this.rpcCall(updateChannel, $root.google.cloud.eventarc.v1.UpdateChannelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateChannel" }); + + /** + * Calls UpdateChannel. + * @function updateChannel + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateChannelRequest} request UpdateChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteChannel}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef DeleteChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteChannel. + * @function deleteChannel + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteChannelRequest} request DeleteChannelRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.DeleteChannelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.deleteChannel = function deleteChannel(request, callback) { + return this.rpcCall(deleteChannel, $root.google.cloud.eventarc.v1.DeleteChannelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteChannel" }); + + /** + * Calls DeleteChannel. + * @function deleteChannel + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteChannelRequest} request DeleteChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getProvider}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef GetProviderCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.Provider} [response] Provider + */ + + /** + * Calls GetProvider. + * @function getProvider + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetProviderRequest} request GetProviderRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.GetProviderCallback} callback Node-style callback called with the error, if any, and Provider + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.getProvider = function getProvider(request, callback) { + return this.rpcCall(getProvider, $root.google.cloud.eventarc.v1.GetProviderRequest, $root.google.cloud.eventarc.v1.Provider, request, callback); + }, "name", { value: "GetProvider" }); + + /** + * Calls GetProvider. + * @function getProvider + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetProviderRequest} request GetProviderRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listProviders}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef ListProvidersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.ListProvidersResponse} [response] ListProvidersResponse + */ + + /** + * Calls ListProviders. + * @function listProviders + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListProvidersRequest} request ListProvidersRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.ListProvidersCallback} callback Node-style callback called with the error, if any, and ListProvidersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.listProviders = function listProviders(request, callback) { + return this.rpcCall(listProviders, $root.google.cloud.eventarc.v1.ListProvidersRequest, $root.google.cloud.eventarc.v1.ListProvidersResponse, request, callback); + }, "name", { value: "ListProviders" }); + + /** + * Calls ListProviders. + * @function listProviders + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListProvidersRequest} request ListProvidersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getChannelConnection}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef GetChannelConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.ChannelConnection} [response] ChannelConnection + */ + + /** + * Calls GetChannelConnection. + * @function getChannelConnection + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest} request GetChannelConnectionRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.GetChannelConnectionCallback} callback Node-style callback called with the error, if any, and ChannelConnection + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.getChannelConnection = function getChannelConnection(request, callback) { + return this.rpcCall(getChannelConnection, $root.google.cloud.eventarc.v1.GetChannelConnectionRequest, $root.google.cloud.eventarc.v1.ChannelConnection, request, callback); + }, "name", { value: "GetChannelConnection" }); + + /** + * Calls GetChannelConnection. + * @function getChannelConnection + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest} request GetChannelConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listChannelConnections}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef ListChannelConnectionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.ListChannelConnectionsResponse} [response] ListChannelConnectionsResponse + */ + + /** + * Calls ListChannelConnections. + * @function listChannelConnections + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest} request ListChannelConnectionsRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.ListChannelConnectionsCallback} callback Node-style callback called with the error, if any, and ListChannelConnectionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.listChannelConnections = function listChannelConnections(request, callback) { + return this.rpcCall(listChannelConnections, $root.google.cloud.eventarc.v1.ListChannelConnectionsRequest, $root.google.cloud.eventarc.v1.ListChannelConnectionsResponse, request, callback); + }, "name", { value: "ListChannelConnections" }); + + /** + * Calls ListChannelConnections. + * @function listChannelConnections + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest} request ListChannelConnectionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createChannelConnection}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef CreateChannelConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateChannelConnection. + * @function createChannelConnection + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest} request CreateChannelConnectionRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.CreateChannelConnectionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.createChannelConnection = function createChannelConnection(request, callback) { + return this.rpcCall(createChannelConnection, $root.google.cloud.eventarc.v1.CreateChannelConnectionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateChannelConnection" }); + + /** + * Calls CreateChannelConnection. + * @function createChannelConnection + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest} request CreateChannelConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteChannelConnection}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef DeleteChannelConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteChannelConnection. + * @function deleteChannelConnection + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest} request DeleteChannelConnectionRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.DeleteChannelConnectionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.deleteChannelConnection = function deleteChannelConnection(request, callback) { + return this.rpcCall(deleteChannelConnection, $root.google.cloud.eventarc.v1.DeleteChannelConnectionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteChannelConnection" }); + + /** + * Calls DeleteChannelConnection. + * @function deleteChannelConnection + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest} request DeleteChannelConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getGoogleChannelConfig}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef GetGoogleChannelConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.GoogleChannelConfig} [response] GoogleChannelConfig + */ + + /** + * Calls GetGoogleChannelConfig. + * @function getGoogleChannelConfig + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest} request GetGoogleChannelConfigRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.GetGoogleChannelConfigCallback} callback Node-style callback called with the error, if any, and GoogleChannelConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.getGoogleChannelConfig = function getGoogleChannelConfig(request, callback) { + return this.rpcCall(getGoogleChannelConfig, $root.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest, $root.google.cloud.eventarc.v1.GoogleChannelConfig, request, callback); + }, "name", { value: "GetGoogleChannelConfig" }); + + /** + * Calls GetGoogleChannelConfig. + * @function getGoogleChannelConfig + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest} request GetGoogleChannelConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateGoogleChannelConfig}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef UpdateGoogleChannelConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.GoogleChannelConfig} [response] GoogleChannelConfig + */ + + /** + * Calls UpdateGoogleChannelConfig. + * @function updateGoogleChannelConfig + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest} request UpdateGoogleChannelConfigRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.UpdateGoogleChannelConfigCallback} callback Node-style callback called with the error, if any, and GoogleChannelConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.updateGoogleChannelConfig = function updateGoogleChannelConfig(request, callback) { + return this.rpcCall(updateGoogleChannelConfig, $root.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest, $root.google.cloud.eventarc.v1.GoogleChannelConfig, request, callback); + }, "name", { value: "UpdateGoogleChannelConfig" }); + + /** + * Calls UpdateGoogleChannelConfig. + * @function updateGoogleChannelConfig + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest} request UpdateGoogleChannelConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getMessageBus}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef GetMessageBusCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.MessageBus} [response] MessageBus + */ + + /** + * Calls GetMessageBus. + * @function getMessageBus + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetMessageBusRequest} request GetMessageBusRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.GetMessageBusCallback} callback Node-style callback called with the error, if any, and MessageBus + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.getMessageBus = function getMessageBus(request, callback) { + return this.rpcCall(getMessageBus, $root.google.cloud.eventarc.v1.GetMessageBusRequest, $root.google.cloud.eventarc.v1.MessageBus, request, callback); + }, "name", { value: "GetMessageBus" }); + + /** + * Calls GetMessageBus. + * @function getMessageBus + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetMessageBusRequest} request GetMessageBusRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listMessageBuses}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef ListMessageBusesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.ListMessageBusesResponse} [response] ListMessageBusesResponse + */ + + /** + * Calls ListMessageBuses. + * @function listMessageBuses + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListMessageBusesRequest} request ListMessageBusesRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.ListMessageBusesCallback} callback Node-style callback called with the error, if any, and ListMessageBusesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.listMessageBuses = function listMessageBuses(request, callback) { + return this.rpcCall(listMessageBuses, $root.google.cloud.eventarc.v1.ListMessageBusesRequest, $root.google.cloud.eventarc.v1.ListMessageBusesResponse, request, callback); + }, "name", { value: "ListMessageBuses" }); + + /** + * Calls ListMessageBuses. + * @function listMessageBuses + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListMessageBusesRequest} request ListMessageBusesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listMessageBusEnrollments}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef ListMessageBusEnrollmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse} [response] ListMessageBusEnrollmentsResponse + */ + + /** + * Calls ListMessageBusEnrollments. + * @function listMessageBusEnrollments + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest} request ListMessageBusEnrollmentsRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.ListMessageBusEnrollmentsCallback} callback Node-style callback called with the error, if any, and ListMessageBusEnrollmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.listMessageBusEnrollments = function listMessageBusEnrollments(request, callback) { + return this.rpcCall(listMessageBusEnrollments, $root.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest, $root.google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse, request, callback); + }, "name", { value: "ListMessageBusEnrollments" }); + + /** + * Calls ListMessageBusEnrollments. + * @function listMessageBusEnrollments + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest} request ListMessageBusEnrollmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createMessageBus}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef CreateMessageBusCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateMessageBus. + * @function createMessageBus + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateMessageBusRequest} request CreateMessageBusRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.CreateMessageBusCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.createMessageBus = function createMessageBus(request, callback) { + return this.rpcCall(createMessageBus, $root.google.cloud.eventarc.v1.CreateMessageBusRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateMessageBus" }); + + /** + * Calls CreateMessageBus. + * @function createMessageBus + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateMessageBusRequest} request CreateMessageBusRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateMessageBus}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef UpdateMessageBusCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateMessageBus. + * @function updateMessageBus + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateMessageBusRequest} request UpdateMessageBusRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.UpdateMessageBusCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.updateMessageBus = function updateMessageBus(request, callback) { + return this.rpcCall(updateMessageBus, $root.google.cloud.eventarc.v1.UpdateMessageBusRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateMessageBus" }); + + /** + * Calls UpdateMessageBus. + * @function updateMessageBus + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateMessageBusRequest} request UpdateMessageBusRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteMessageBus}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef DeleteMessageBusCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteMessageBus. + * @function deleteMessageBus + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteMessageBusRequest} request DeleteMessageBusRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.DeleteMessageBusCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.deleteMessageBus = function deleteMessageBus(request, callback) { + return this.rpcCall(deleteMessageBus, $root.google.cloud.eventarc.v1.DeleteMessageBusRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteMessageBus" }); + + /** + * Calls DeleteMessageBus. + * @function deleteMessageBus + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteMessageBusRequest} request DeleteMessageBusRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getEnrollment}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef GetEnrollmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.Enrollment} [response] Enrollment + */ + + /** + * Calls GetEnrollment. + * @function getEnrollment + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetEnrollmentRequest} request GetEnrollmentRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.GetEnrollmentCallback} callback Node-style callback called with the error, if any, and Enrollment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.getEnrollment = function getEnrollment(request, callback) { + return this.rpcCall(getEnrollment, $root.google.cloud.eventarc.v1.GetEnrollmentRequest, $root.google.cloud.eventarc.v1.Enrollment, request, callback); + }, "name", { value: "GetEnrollment" }); + + /** + * Calls GetEnrollment. + * @function getEnrollment + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetEnrollmentRequest} request GetEnrollmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listEnrollments}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef ListEnrollmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.ListEnrollmentsResponse} [response] ListEnrollmentsResponse + */ + + /** + * Calls ListEnrollments. + * @function listEnrollments + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListEnrollmentsRequest} request ListEnrollmentsRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.ListEnrollmentsCallback} callback Node-style callback called with the error, if any, and ListEnrollmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.listEnrollments = function listEnrollments(request, callback) { + return this.rpcCall(listEnrollments, $root.google.cloud.eventarc.v1.ListEnrollmentsRequest, $root.google.cloud.eventarc.v1.ListEnrollmentsResponse, request, callback); + }, "name", { value: "ListEnrollments" }); + + /** + * Calls ListEnrollments. + * @function listEnrollments + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListEnrollmentsRequest} request ListEnrollmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createEnrollment}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef CreateEnrollmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateEnrollment. + * @function createEnrollment + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateEnrollmentRequest} request CreateEnrollmentRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.CreateEnrollmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.createEnrollment = function createEnrollment(request, callback) { + return this.rpcCall(createEnrollment, $root.google.cloud.eventarc.v1.CreateEnrollmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnrollment" }); + + /** + * Calls CreateEnrollment. + * @function createEnrollment + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateEnrollmentRequest} request CreateEnrollmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateEnrollment}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef UpdateEnrollmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateEnrollment. + * @function updateEnrollment + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateEnrollmentRequest} request UpdateEnrollmentRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.UpdateEnrollmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.updateEnrollment = function updateEnrollment(request, callback) { + return this.rpcCall(updateEnrollment, $root.google.cloud.eventarc.v1.UpdateEnrollmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnrollment" }); + + /** + * Calls UpdateEnrollment. + * @function updateEnrollment + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateEnrollmentRequest} request UpdateEnrollmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteEnrollment}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef DeleteEnrollmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteEnrollment. + * @function deleteEnrollment + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteEnrollmentRequest} request DeleteEnrollmentRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.DeleteEnrollmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.deleteEnrollment = function deleteEnrollment(request, callback) { + return this.rpcCall(deleteEnrollment, $root.google.cloud.eventarc.v1.DeleteEnrollmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEnrollment" }); + + /** + * Calls DeleteEnrollment. + * @function deleteEnrollment + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteEnrollmentRequest} request DeleteEnrollmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getPipeline}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef GetPipelineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.Pipeline} [response] Pipeline + */ + + /** + * Calls GetPipeline. + * @function getPipeline + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetPipelineRequest} request GetPipelineRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.GetPipelineCallback} callback Node-style callback called with the error, if any, and Pipeline + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.getPipeline = function getPipeline(request, callback) { + return this.rpcCall(getPipeline, $root.google.cloud.eventarc.v1.GetPipelineRequest, $root.google.cloud.eventarc.v1.Pipeline, request, callback); + }, "name", { value: "GetPipeline" }); + + /** + * Calls GetPipeline. + * @function getPipeline + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetPipelineRequest} request GetPipelineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listPipelines}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef ListPipelinesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.ListPipelinesResponse} [response] ListPipelinesResponse + */ + + /** + * Calls ListPipelines. + * @function listPipelines + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListPipelinesRequest} request ListPipelinesRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.ListPipelinesCallback} callback Node-style callback called with the error, if any, and ListPipelinesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.listPipelines = function listPipelines(request, callback) { + return this.rpcCall(listPipelines, $root.google.cloud.eventarc.v1.ListPipelinesRequest, $root.google.cloud.eventarc.v1.ListPipelinesResponse, request, callback); + }, "name", { value: "ListPipelines" }); + + /** + * Calls ListPipelines. + * @function listPipelines + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListPipelinesRequest} request ListPipelinesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createPipeline}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef CreatePipelineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreatePipeline. + * @function createPipeline + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreatePipelineRequest} request CreatePipelineRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.CreatePipelineCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.createPipeline = function createPipeline(request, callback) { + return this.rpcCall(createPipeline, $root.google.cloud.eventarc.v1.CreatePipelineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreatePipeline" }); + + /** + * Calls CreatePipeline. + * @function createPipeline + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreatePipelineRequest} request CreatePipelineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updatePipeline}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef UpdatePipelineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdatePipeline. + * @function updatePipeline + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdatePipelineRequest} request UpdatePipelineRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.UpdatePipelineCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.updatePipeline = function updatePipeline(request, callback) { + return this.rpcCall(updatePipeline, $root.google.cloud.eventarc.v1.UpdatePipelineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdatePipeline" }); + + /** + * Calls UpdatePipeline. + * @function updatePipeline + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdatePipelineRequest} request UpdatePipelineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deletePipeline}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef DeletePipelineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeletePipeline. + * @function deletePipeline + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeletePipelineRequest} request DeletePipelineRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.DeletePipelineCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.deletePipeline = function deletePipeline(request, callback) { + return this.rpcCall(deletePipeline, $root.google.cloud.eventarc.v1.DeletePipelineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeletePipeline" }); + + /** + * Calls DeletePipeline. + * @function deletePipeline + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeletePipelineRequest} request DeletePipelineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getGoogleApiSource}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef GetGoogleApiSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.GoogleApiSource} [response] GoogleApiSource + */ + + /** + * Calls GetGoogleApiSource. + * @function getGoogleApiSource + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetGoogleApiSourceRequest} request GetGoogleApiSourceRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.GetGoogleApiSourceCallback} callback Node-style callback called with the error, if any, and GoogleApiSource + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.getGoogleApiSource = function getGoogleApiSource(request, callback) { + return this.rpcCall(getGoogleApiSource, $root.google.cloud.eventarc.v1.GetGoogleApiSourceRequest, $root.google.cloud.eventarc.v1.GoogleApiSource, request, callback); + }, "name", { value: "GetGoogleApiSource" }); + + /** + * Calls GetGoogleApiSource. + * @function getGoogleApiSource + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IGetGoogleApiSourceRequest} request GetGoogleApiSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listGoogleApiSources}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef ListGoogleApiSourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.v1.ListGoogleApiSourcesResponse} [response] ListGoogleApiSourcesResponse + */ + + /** + * Calls ListGoogleApiSources. + * @function listGoogleApiSources + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListGoogleApiSourcesRequest} request ListGoogleApiSourcesRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.ListGoogleApiSourcesCallback} callback Node-style callback called with the error, if any, and ListGoogleApiSourcesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.listGoogleApiSources = function listGoogleApiSources(request, callback) { + return this.rpcCall(listGoogleApiSources, $root.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest, $root.google.cloud.eventarc.v1.ListGoogleApiSourcesResponse, request, callback); + }, "name", { value: "ListGoogleApiSources" }); + + /** + * Calls ListGoogleApiSources. + * @function listGoogleApiSources + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IListGoogleApiSourcesRequest} request ListGoogleApiSourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createGoogleApiSource}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef CreateGoogleApiSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateGoogleApiSource. + * @function createGoogleApiSource + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest} request CreateGoogleApiSourceRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.CreateGoogleApiSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.createGoogleApiSource = function createGoogleApiSource(request, callback) { + return this.rpcCall(createGoogleApiSource, $root.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateGoogleApiSource" }); + + /** + * Calls CreateGoogleApiSource. + * @function createGoogleApiSource + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest} request CreateGoogleApiSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateGoogleApiSource}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef UpdateGoogleApiSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateGoogleApiSource. + * @function updateGoogleApiSource + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest} request UpdateGoogleApiSourceRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.UpdateGoogleApiSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.updateGoogleApiSource = function updateGoogleApiSource(request, callback) { + return this.rpcCall(updateGoogleApiSource, $root.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateGoogleApiSource" }); + + /** + * Calls UpdateGoogleApiSource. + * @function updateGoogleApiSource + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest} request UpdateGoogleApiSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteGoogleApiSource}. + * @memberof google.cloud.eventarc.v1.Eventarc + * @typedef DeleteGoogleApiSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteGoogleApiSource. + * @function deleteGoogleApiSource + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest} request DeleteGoogleApiSourceRequest message or plain object + * @param {google.cloud.eventarc.v1.Eventarc.DeleteGoogleApiSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Eventarc.prototype.deleteGoogleApiSource = function deleteGoogleApiSource(request, callback) { + return this.rpcCall(deleteGoogleApiSource, $root.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteGoogleApiSource" }); + + /** + * Calls DeleteGoogleApiSource. + * @function deleteGoogleApiSource + * @memberof google.cloud.eventarc.v1.Eventarc + * @instance + * @param {google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest} request DeleteGoogleApiSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Eventarc; + })(); + + v1.GetTriggerRequest = (function() { + + /** + * Properties of a GetTriggerRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IGetTriggerRequest + * @property {string|null} [name] GetTriggerRequest name + */ + + /** + * Constructs a new GetTriggerRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a GetTriggerRequest. + * @implements IGetTriggerRequest + * @constructor + * @param {google.cloud.eventarc.v1.IGetTriggerRequest=} [properties] Properties to set + */ + function GetTriggerRequest(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]]; + } + + /** + * GetTriggerRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @instance + */ + GetTriggerRequest.prototype.name = ""; + + /** + * Creates a new GetTriggerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.IGetTriggerRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GetTriggerRequest} GetTriggerRequest instance + */ + GetTriggerRequest.create = function create(properties) { + return new GetTriggerRequest(properties); + }; + + /** + * Encodes the specified GetTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.IGetTriggerRequest} message GetTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.IGetTriggerRequest} message GetTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.GetTriggerRequest} GetTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTriggerRequest.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.eventarc.v1.GetTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.GetTriggerRequest} GetTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTriggerRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTriggerRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.GetTriggerRequest} GetTriggerRequest + */ + GetTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GetTriggerRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.GetTriggerRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.GetTriggerRequest} message GetTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetTriggerRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + GetTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetTriggerRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.GetTriggerRequest"; + }; + + return GetTriggerRequest; + })(); + + v1.ListTriggersRequest = (function() { + + /** + * Properties of a ListTriggersRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IListTriggersRequest + * @property {string|null} [parent] ListTriggersRequest parent + * @property {number|null} [pageSize] ListTriggersRequest pageSize + * @property {string|null} [pageToken] ListTriggersRequest pageToken + * @property {string|null} [orderBy] ListTriggersRequest orderBy + * @property {string|null} [filter] ListTriggersRequest filter + */ + + /** + * Constructs a new ListTriggersRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListTriggersRequest. + * @implements IListTriggersRequest + * @constructor + * @param {google.cloud.eventarc.v1.IListTriggersRequest=} [properties] Properties to set + */ + function ListTriggersRequest(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]]; + } + + /** + * ListTriggersRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @instance + */ + ListTriggersRequest.prototype.parent = ""; + + /** + * ListTriggersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @instance + */ + ListTriggersRequest.prototype.pageSize = 0; + + /** + * ListTriggersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @instance + */ + ListTriggersRequest.prototype.pageToken = ""; + + /** + * ListTriggersRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @instance + */ + ListTriggersRequest.prototype.orderBy = ""; + + /** + * ListTriggersRequest filter. + * @member {string} filter + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @instance + */ + ListTriggersRequest.prototype.filter = ""; + + /** + * Creates a new ListTriggersRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @static + * @param {google.cloud.eventarc.v1.IListTriggersRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListTriggersRequest} ListTriggersRequest instance + */ + ListTriggersRequest.create = function create(properties) { + return new ListTriggersRequest(properties); + }; + + /** + * Encodes the specified ListTriggersRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @static + * @param {google.cloud.eventarc.v1.IListTriggersRequest} message ListTriggersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTriggersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListTriggersRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @static + * @param {google.cloud.eventarc.v1.IListTriggersRequest} message ListTriggersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTriggersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTriggersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListTriggersRequest} ListTriggersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTriggersRequest.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.eventarc.v1.ListTriggersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTriggersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListTriggersRequest} ListTriggersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTriggersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTriggersRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTriggersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListTriggersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListTriggersRequest} ListTriggersRequest + */ + ListTriggersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListTriggersRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.ListTriggersRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListTriggersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @static + * @param {google.cloud.eventarc.v1.ListTriggersRequest} message ListTriggersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTriggersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListTriggersRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @instance + * @returns {Object.} JSON object + */ + ListTriggersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTriggersRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTriggersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListTriggersRequest"; + }; + + return ListTriggersRequest; + })(); + + v1.ListTriggersResponse = (function() { + + /** + * Properties of a ListTriggersResponse. + * @memberof google.cloud.eventarc.v1 + * @interface IListTriggersResponse + * @property {Array.|null} [triggers] ListTriggersResponse triggers + * @property {string|null} [nextPageToken] ListTriggersResponse nextPageToken + * @property {Array.|null} [unreachable] ListTriggersResponse unreachable + */ + + /** + * Constructs a new ListTriggersResponse. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListTriggersResponse. + * @implements IListTriggersResponse + * @constructor + * @param {google.cloud.eventarc.v1.IListTriggersResponse=} [properties] Properties to set + */ + function ListTriggersResponse(properties) { + this.triggers = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTriggersResponse triggers. + * @member {Array.} triggers + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @instance + */ + ListTriggersResponse.prototype.triggers = $util.emptyArray; + + /** + * ListTriggersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @instance + */ + ListTriggersResponse.prototype.nextPageToken = ""; + + /** + * ListTriggersResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @instance + */ + ListTriggersResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListTriggersResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @static + * @param {google.cloud.eventarc.v1.IListTriggersResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListTriggersResponse} ListTriggersResponse instance + */ + ListTriggersResponse.create = function create(properties) { + return new ListTriggersResponse(properties); + }; + + /** + * Encodes the specified ListTriggersResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @static + * @param {google.cloud.eventarc.v1.IListTriggersResponse} message ListTriggersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTriggersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.triggers != null && message.triggers.length) + for (var i = 0; i < message.triggers.length; ++i) + $root.google.cloud.eventarc.v1.Trigger.encode(message.triggers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListTriggersResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @static + * @param {google.cloud.eventarc.v1.IListTriggersResponse} message ListTriggersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTriggersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTriggersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListTriggersResponse} ListTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTriggersResponse.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.eventarc.v1.ListTriggersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.triggers && message.triggers.length)) + message.triggers = []; + message.triggers.push($root.google.cloud.eventarc.v1.Trigger.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTriggersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListTriggersResponse} ListTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTriggersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTriggersResponse message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTriggersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.triggers != null && message.hasOwnProperty("triggers")) { + if (!Array.isArray(message.triggers)) + return "triggers: array expected"; + for (var i = 0; i < message.triggers.length; ++i) { + var error = $root.google.cloud.eventarc.v1.Trigger.verify(message.triggers[i]); + if (error) + return "triggers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListTriggersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListTriggersResponse} ListTriggersResponse + */ + ListTriggersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListTriggersResponse) + return object; + var message = new $root.google.cloud.eventarc.v1.ListTriggersResponse(); + if (object.triggers) { + if (!Array.isArray(object.triggers)) + throw TypeError(".google.cloud.eventarc.v1.ListTriggersResponse.triggers: array expected"); + message.triggers = []; + for (var i = 0; i < object.triggers.length; ++i) { + if (typeof object.triggers[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.ListTriggersResponse.triggers: object expected"); + message.triggers[i] = $root.google.cloud.eventarc.v1.Trigger.fromObject(object.triggers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.eventarc.v1.ListTriggersResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListTriggersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @static + * @param {google.cloud.eventarc.v1.ListTriggersResponse} message ListTriggersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTriggersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.triggers = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.triggers && message.triggers.length) { + object.triggers = []; + for (var j = 0; j < message.triggers.length; ++j) + object.triggers[j] = $root.google.cloud.eventarc.v1.Trigger.toObject(message.triggers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListTriggersResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @instance + * @returns {Object.} JSON object + */ + ListTriggersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTriggersResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTriggersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListTriggersResponse"; + }; + + return ListTriggersResponse; + })(); + + v1.CreateTriggerRequest = (function() { + + /** + * Properties of a CreateTriggerRequest. + * @memberof google.cloud.eventarc.v1 + * @interface ICreateTriggerRequest + * @property {string|null} [parent] CreateTriggerRequest parent + * @property {google.cloud.eventarc.v1.ITrigger|null} [trigger] CreateTriggerRequest trigger + * @property {string|null} [triggerId] CreateTriggerRequest triggerId + * @property {boolean|null} [validateOnly] CreateTriggerRequest validateOnly + */ + + /** + * Constructs a new CreateTriggerRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a CreateTriggerRequest. + * @implements ICreateTriggerRequest + * @constructor + * @param {google.cloud.eventarc.v1.ICreateTriggerRequest=} [properties] Properties to set + */ + function CreateTriggerRequest(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]]; + } + + /** + * CreateTriggerRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @instance + */ + CreateTriggerRequest.prototype.parent = ""; + + /** + * CreateTriggerRequest trigger. + * @member {google.cloud.eventarc.v1.ITrigger|null|undefined} trigger + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @instance + */ + CreateTriggerRequest.prototype.trigger = null; + + /** + * CreateTriggerRequest triggerId. + * @member {string} triggerId + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @instance + */ + CreateTriggerRequest.prototype.triggerId = ""; + + /** + * CreateTriggerRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @instance + */ + CreateTriggerRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateTriggerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateTriggerRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.CreateTriggerRequest} CreateTriggerRequest instance + */ + CreateTriggerRequest.create = function create(properties) { + return new CreateTriggerRequest(properties); + }; + + /** + * Encodes the specified CreateTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateTriggerRequest} message CreateTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + $root.google.cloud.eventarc.v1.Trigger.encode(message.trigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.triggerId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateTriggerRequest} message CreateTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.CreateTriggerRequest} CreateTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTriggerRequest.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.eventarc.v1.CreateTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.trigger = $root.google.cloud.eventarc.v1.Trigger.decode(reader, reader.uint32()); + break; + } + case 3: { + message.triggerId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.CreateTriggerRequest} CreateTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTriggerRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTriggerRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.cloud.eventarc.v1.Trigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (!$util.isString(message.triggerId)) + return "triggerId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.CreateTriggerRequest} CreateTriggerRequest + */ + CreateTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.CreateTriggerRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.CreateTriggerRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.cloud.eventarc.v1.CreateTriggerRequest.trigger: object expected"); + message.trigger = $root.google.cloud.eventarc.v1.Trigger.fromObject(object.trigger); + } + if (object.triggerId != null) + message.triggerId = String(object.triggerId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.CreateTriggerRequest} message CreateTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.trigger = null; + object.triggerId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.cloud.eventarc.v1.Trigger.toObject(message.trigger, options); + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + object.triggerId = message.triggerId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateTriggerRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTriggerRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.CreateTriggerRequest"; + }; + + return CreateTriggerRequest; + })(); + + v1.UpdateTriggerRequest = (function() { + + /** + * Properties of an UpdateTriggerRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IUpdateTriggerRequest + * @property {google.cloud.eventarc.v1.ITrigger|null} [trigger] UpdateTriggerRequest trigger + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTriggerRequest updateMask + * @property {boolean|null} [allowMissing] UpdateTriggerRequest allowMissing + * @property {boolean|null} [validateOnly] UpdateTriggerRequest validateOnly + */ + + /** + * Constructs a new UpdateTriggerRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents an UpdateTriggerRequest. + * @implements IUpdateTriggerRequest + * @constructor + * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest=} [properties] Properties to set + */ + function UpdateTriggerRequest(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]]; + } + + /** + * UpdateTriggerRequest trigger. + * @member {google.cloud.eventarc.v1.ITrigger|null|undefined} trigger + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @instance + */ + UpdateTriggerRequest.prototype.trigger = null; + + /** + * UpdateTriggerRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @instance + */ + UpdateTriggerRequest.prototype.updateMask = null; + + /** + * UpdateTriggerRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @instance + */ + UpdateTriggerRequest.prototype.allowMissing = false; + + /** + * UpdateTriggerRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @instance + */ + UpdateTriggerRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateTriggerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.UpdateTriggerRequest} UpdateTriggerRequest instance + */ + UpdateTriggerRequest.create = function create(properties) { + return new UpdateTriggerRequest(properties); + }; + + /** + * Encodes the specified UpdateTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest} message UpdateTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + $root.google.cloud.eventarc.v1.Trigger.encode(message.trigger, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest} message UpdateTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.UpdateTriggerRequest} UpdateTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTriggerRequest.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.eventarc.v1.UpdateTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.trigger = $root.google.cloud.eventarc.v1.Trigger.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.UpdateTriggerRequest} UpdateTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTriggerRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTriggerRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.cloud.eventarc.v1.Trigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.UpdateTriggerRequest} UpdateTriggerRequest + */ + UpdateTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.UpdateTriggerRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.UpdateTriggerRequest(); + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateTriggerRequest.trigger: object expected"); + message.trigger = $root.google.cloud.eventarc.v1.Trigger.fromObject(object.trigger); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateTriggerRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.UpdateTriggerRequest} message UpdateTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.trigger = null; + object.updateMask = null; + object.allowMissing = false; + object.validateOnly = false; + } + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.cloud.eventarc.v1.Trigger.toObject(message.trigger, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateTriggerRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateTriggerRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.UpdateTriggerRequest"; + }; + + return UpdateTriggerRequest; + })(); + + v1.DeleteTriggerRequest = (function() { + + /** + * Properties of a DeleteTriggerRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IDeleteTriggerRequest + * @property {string|null} [name] DeleteTriggerRequest name + * @property {string|null} [etag] DeleteTriggerRequest etag + * @property {boolean|null} [allowMissing] DeleteTriggerRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteTriggerRequest validateOnly + */ + + /** + * Constructs a new DeleteTriggerRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a DeleteTriggerRequest. + * @implements IDeleteTriggerRequest + * @constructor + * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest=} [properties] Properties to set + */ + function DeleteTriggerRequest(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]]; + } + + /** + * DeleteTriggerRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @instance + */ + DeleteTriggerRequest.prototype.name = ""; + + /** + * DeleteTriggerRequest etag. + * @member {string} etag + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @instance + */ + DeleteTriggerRequest.prototype.etag = ""; + + /** + * DeleteTriggerRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @instance + */ + DeleteTriggerRequest.prototype.allowMissing = false; + + /** + * DeleteTriggerRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @instance + */ + DeleteTriggerRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteTriggerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.DeleteTriggerRequest} DeleteTriggerRequest instance + */ + DeleteTriggerRequest.create = function create(properties) { + return new DeleteTriggerRequest(properties); + }; + + /** + * Encodes the specified DeleteTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest} message DeleteTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTriggerRequest.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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified DeleteTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest} message DeleteTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.DeleteTriggerRequest} DeleteTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTriggerRequest.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.eventarc.v1.DeleteTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.DeleteTriggerRequest} DeleteTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTriggerRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTriggerRequest.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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a DeleteTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.DeleteTriggerRequest} DeleteTriggerRequest + */ + DeleteTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.DeleteTriggerRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.DeleteTriggerRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a DeleteTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @static + * @param {google.cloud.eventarc.v1.DeleteTriggerRequest} message DeleteTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.allowMissing = false; + object.validateOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this DeleteTriggerRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteTriggerRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.DeleteTriggerRequest"; + }; + + return DeleteTriggerRequest; + })(); + + v1.GetChannelRequest = (function() { + + /** + * Properties of a GetChannelRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IGetChannelRequest + * @property {string|null} [name] GetChannelRequest name + */ + + /** + * Constructs a new GetChannelRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a GetChannelRequest. + * @implements IGetChannelRequest + * @constructor + * @param {google.cloud.eventarc.v1.IGetChannelRequest=} [properties] Properties to set + */ + function GetChannelRequest(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]]; + } + + /** + * GetChannelRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @instance + */ + GetChannelRequest.prototype.name = ""; + + /** + * Creates a new GetChannelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @static + * @param {google.cloud.eventarc.v1.IGetChannelRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GetChannelRequest} GetChannelRequest instance + */ + GetChannelRequest.create = function create(properties) { + return new GetChannelRequest(properties); + }; + + /** + * Encodes the specified GetChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @static + * @param {google.cloud.eventarc.v1.IGetChannelRequest} message GetChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetChannelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @static + * @param {google.cloud.eventarc.v1.IGetChannelRequest} message GetChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.GetChannelRequest} GetChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetChannelRequest.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.eventarc.v1.GetChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.GetChannelRequest} GetChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetChannelRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetChannelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.GetChannelRequest} GetChannelRequest + */ + GetChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GetChannelRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.GetChannelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @static + * @param {google.cloud.eventarc.v1.GetChannelRequest} message GetChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetChannelRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @instance + * @returns {Object.} JSON object + */ + GetChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetChannelRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.GetChannelRequest"; + }; + + return GetChannelRequest; + })(); + + v1.ListChannelsRequest = (function() { + + /** + * Properties of a ListChannelsRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IListChannelsRequest + * @property {string|null} [parent] ListChannelsRequest parent + * @property {number|null} [pageSize] ListChannelsRequest pageSize + * @property {string|null} [pageToken] ListChannelsRequest pageToken + * @property {string|null} [orderBy] ListChannelsRequest orderBy + */ + + /** + * Constructs a new ListChannelsRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListChannelsRequest. + * @implements IListChannelsRequest + * @constructor + * @param {google.cloud.eventarc.v1.IListChannelsRequest=} [properties] Properties to set + */ + function ListChannelsRequest(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]]; + } + + /** + * ListChannelsRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @instance + */ + ListChannelsRequest.prototype.parent = ""; + + /** + * ListChannelsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @instance + */ + ListChannelsRequest.prototype.pageSize = 0; + + /** + * ListChannelsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @instance + */ + ListChannelsRequest.prototype.pageToken = ""; + + /** + * ListChannelsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @instance + */ + ListChannelsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListChannelsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @static + * @param {google.cloud.eventarc.v1.IListChannelsRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListChannelsRequest} ListChannelsRequest instance + */ + ListChannelsRequest.create = function create(properties) { + return new ListChannelsRequest(properties); + }; + + /** + * Encodes the specified ListChannelsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @static + * @param {google.cloud.eventarc.v1.IListChannelsRequest} message ListChannelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListChannelsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListChannelsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @static + * @param {google.cloud.eventarc.v1.IListChannelsRequest} message ListChannelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListChannelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListChannelsRequest} ListChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListChannelsRequest.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.eventarc.v1.ListChannelsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListChannelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListChannelsRequest} ListChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListChannelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListChannelsRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListChannelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListChannelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListChannelsRequest} ListChannelsRequest + */ + ListChannelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListChannelsRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.ListChannelsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListChannelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @static + * @param {google.cloud.eventarc.v1.ListChannelsRequest} message ListChannelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListChannelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListChannelsRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @instance + * @returns {Object.} JSON object + */ + ListChannelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListChannelsRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListChannelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListChannelsRequest"; + }; + + return ListChannelsRequest; + })(); + + v1.ListChannelsResponse = (function() { + + /** + * Properties of a ListChannelsResponse. + * @memberof google.cloud.eventarc.v1 + * @interface IListChannelsResponse + * @property {Array.|null} [channels] ListChannelsResponse channels + * @property {string|null} [nextPageToken] ListChannelsResponse nextPageToken + * @property {Array.|null} [unreachable] ListChannelsResponse unreachable + */ + + /** + * Constructs a new ListChannelsResponse. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListChannelsResponse. + * @implements IListChannelsResponse + * @constructor + * @param {google.cloud.eventarc.v1.IListChannelsResponse=} [properties] Properties to set + */ + function ListChannelsResponse(properties) { + this.channels = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListChannelsResponse channels. + * @member {Array.} channels + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @instance + */ + ListChannelsResponse.prototype.channels = $util.emptyArray; + + /** + * ListChannelsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @instance + */ + ListChannelsResponse.prototype.nextPageToken = ""; + + /** + * ListChannelsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @instance + */ + ListChannelsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListChannelsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @static + * @param {google.cloud.eventarc.v1.IListChannelsResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListChannelsResponse} ListChannelsResponse instance + */ + ListChannelsResponse.create = function create(properties) { + return new ListChannelsResponse(properties); + }; + + /** + * Encodes the specified ListChannelsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @static + * @param {google.cloud.eventarc.v1.IListChannelsResponse} message ListChannelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListChannelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channels != null && message.channels.length) + for (var i = 0; i < message.channels.length; ++i) + $root.google.cloud.eventarc.v1.Channel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListChannelsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @static + * @param {google.cloud.eventarc.v1.IListChannelsResponse} message ListChannelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListChannelsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListChannelsResponse} ListChannelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListChannelsResponse.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.eventarc.v1.ListChannelsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.channels && message.channels.length)) + message.channels = []; + message.channels.push($root.google.cloud.eventarc.v1.Channel.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListChannelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListChannelsResponse} ListChannelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListChannelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListChannelsResponse message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListChannelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channels != null && message.hasOwnProperty("channels")) { + if (!Array.isArray(message.channels)) + return "channels: array expected"; + for (var i = 0; i < message.channels.length; ++i) { + var error = $root.google.cloud.eventarc.v1.Channel.verify(message.channels[i]); + if (error) + return "channels." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListChannelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListChannelsResponse} ListChannelsResponse + */ + ListChannelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListChannelsResponse) + return object; + var message = new $root.google.cloud.eventarc.v1.ListChannelsResponse(); + if (object.channels) { + if (!Array.isArray(object.channels)) + throw TypeError(".google.cloud.eventarc.v1.ListChannelsResponse.channels: array expected"); + message.channels = []; + for (var i = 0; i < object.channels.length; ++i) { + if (typeof object.channels[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.ListChannelsResponse.channels: object expected"); + message.channels[i] = $root.google.cloud.eventarc.v1.Channel.fromObject(object.channels[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.eventarc.v1.ListChannelsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListChannelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @static + * @param {google.cloud.eventarc.v1.ListChannelsResponse} message ListChannelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListChannelsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.channels = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.channels && message.channels.length) { + object.channels = []; + for (var j = 0; j < message.channels.length; ++j) + object.channels[j] = $root.google.cloud.eventarc.v1.Channel.toObject(message.channels[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListChannelsResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @instance + * @returns {Object.} JSON object + */ + ListChannelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListChannelsResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListChannelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListChannelsResponse"; + }; + + return ListChannelsResponse; + })(); + + v1.CreateChannelRequest = (function() { + + /** + * Properties of a CreateChannelRequest. + * @memberof google.cloud.eventarc.v1 + * @interface ICreateChannelRequest + * @property {string|null} [parent] CreateChannelRequest parent + * @property {google.cloud.eventarc.v1.IChannel|null} [channel] CreateChannelRequest channel + * @property {string|null} [channelId] CreateChannelRequest channelId + * @property {boolean|null} [validateOnly] CreateChannelRequest validateOnly + */ + + /** + * Constructs a new CreateChannelRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a CreateChannelRequest. + * @implements ICreateChannelRequest + * @constructor + * @param {google.cloud.eventarc.v1.ICreateChannelRequest=} [properties] Properties to set + */ + function CreateChannelRequest(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]]; + } + + /** + * CreateChannelRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @instance + */ + CreateChannelRequest.prototype.parent = ""; + + /** + * CreateChannelRequest channel. + * @member {google.cloud.eventarc.v1.IChannel|null|undefined} channel + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @instance + */ + CreateChannelRequest.prototype.channel = null; + + /** + * CreateChannelRequest channelId. + * @member {string} channelId + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @instance + */ + CreateChannelRequest.prototype.channelId = ""; + + /** + * CreateChannelRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @instance + */ + CreateChannelRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateChannelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateChannelRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.CreateChannelRequest} CreateChannelRequest instance + */ + CreateChannelRequest.create = function create(properties) { + return new CreateChannelRequest(properties); + }; + + /** + * Encodes the specified CreateChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateChannelRequest} message CreateChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateChannelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + $root.google.cloud.eventarc.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.channelId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateChannelRequest} message CreateChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.CreateChannelRequest} CreateChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateChannelRequest.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.eventarc.v1.CreateChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.channel = $root.google.cloud.eventarc.v1.Channel.decode(reader, reader.uint32()); + break; + } + case 3: { + message.channelId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.CreateChannelRequest} CreateChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateChannelRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateChannelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.channel != null && message.hasOwnProperty("channel")) { + var error = $root.google.cloud.eventarc.v1.Channel.verify(message.channel); + if (error) + return "channel." + error; + } + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.CreateChannelRequest} CreateChannelRequest + */ + CreateChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.CreateChannelRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.CreateChannelRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.channel != null) { + if (typeof object.channel !== "object") + throw TypeError(".google.cloud.eventarc.v1.CreateChannelRequest.channel: object expected"); + message.channel = $root.google.cloud.eventarc.v1.Channel.fromObject(object.channel); + } + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @static + * @param {google.cloud.eventarc.v1.CreateChannelRequest} message CreateChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.channel = null; + object.channelId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = $root.google.cloud.eventarc.v1.Channel.toObject(message.channel, options); + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateChannelRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @instance + * @returns {Object.} JSON object + */ + CreateChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateChannelRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.CreateChannelRequest"; + }; + + return CreateChannelRequest; + })(); + + v1.UpdateChannelRequest = (function() { + + /** + * Properties of an UpdateChannelRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IUpdateChannelRequest + * @property {google.cloud.eventarc.v1.IChannel|null} [channel] UpdateChannelRequest channel + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateChannelRequest updateMask + * @property {boolean|null} [validateOnly] UpdateChannelRequest validateOnly + */ + + /** + * Constructs a new UpdateChannelRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents an UpdateChannelRequest. + * @implements IUpdateChannelRequest + * @constructor + * @param {google.cloud.eventarc.v1.IUpdateChannelRequest=} [properties] Properties to set + */ + function UpdateChannelRequest(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]]; + } + + /** + * UpdateChannelRequest channel. + * @member {google.cloud.eventarc.v1.IChannel|null|undefined} channel + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @instance + */ + UpdateChannelRequest.prototype.channel = null; + + /** + * UpdateChannelRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @instance + */ + UpdateChannelRequest.prototype.updateMask = null; + + /** + * UpdateChannelRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @instance + */ + UpdateChannelRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateChannelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateChannelRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.UpdateChannelRequest} UpdateChannelRequest instance + */ + UpdateChannelRequest.create = function create(properties) { + return new UpdateChannelRequest(properties); + }; + + /** + * Encodes the specified UpdateChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateChannelRequest} message UpdateChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateChannelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + $root.google.cloud.eventarc.v1.Channel.encode(message.channel, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateChannelRequest} message UpdateChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.UpdateChannelRequest} UpdateChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateChannelRequest.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.eventarc.v1.UpdateChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channel = $root.google.cloud.eventarc.v1.Channel.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.UpdateChannelRequest} UpdateChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateChannelRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateChannelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channel != null && message.hasOwnProperty("channel")) { + var error = $root.google.cloud.eventarc.v1.Channel.verify(message.channel); + if (error) + return "channel." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.UpdateChannelRequest} UpdateChannelRequest + */ + UpdateChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.UpdateChannelRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.UpdateChannelRequest(); + if (object.channel != null) { + if (typeof object.channel !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateChannelRequest.channel: object expected"); + message.channel = $root.google.cloud.eventarc.v1.Channel.fromObject(object.channel); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateChannelRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @static + * @param {google.cloud.eventarc.v1.UpdateChannelRequest} message UpdateChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.channel = null; + object.updateMask = null; + object.validateOnly = false; + } + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = $root.google.cloud.eventarc.v1.Channel.toObject(message.channel, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateChannelRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateChannelRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.UpdateChannelRequest"; + }; + + return UpdateChannelRequest; + })(); + + v1.DeleteChannelRequest = (function() { + + /** + * Properties of a DeleteChannelRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IDeleteChannelRequest + * @property {string|null} [name] DeleteChannelRequest name + * @property {boolean|null} [validateOnly] DeleteChannelRequest validateOnly + */ + + /** + * Constructs a new DeleteChannelRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a DeleteChannelRequest. + * @implements IDeleteChannelRequest + * @constructor + * @param {google.cloud.eventarc.v1.IDeleteChannelRequest=} [properties] Properties to set + */ + function DeleteChannelRequest(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]]; + } + + /** + * DeleteChannelRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @instance + */ + DeleteChannelRequest.prototype.name = ""; + + /** + * DeleteChannelRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @instance + */ + DeleteChannelRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteChannelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteChannelRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.DeleteChannelRequest} DeleteChannelRequest instance + */ + DeleteChannelRequest.create = function create(properties) { + return new DeleteChannelRequest(properties); + }; + + /** + * Encodes the specified DeleteChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteChannelRequest} message DeleteChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteChannelRequest.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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified DeleteChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteChannelRequest} message DeleteChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.DeleteChannelRequest} DeleteChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteChannelRequest.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.eventarc.v1.DeleteChannelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.DeleteChannelRequest} DeleteChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteChannelRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteChannelRequest.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.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a DeleteChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.DeleteChannelRequest} DeleteChannelRequest + */ + DeleteChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.DeleteChannelRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.DeleteChannelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a DeleteChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @static + * @param {google.cloud.eventarc.v1.DeleteChannelRequest} message DeleteChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.validateOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this DeleteChannelRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteChannelRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.DeleteChannelRequest"; + }; + + return DeleteChannelRequest; + })(); + + v1.GetProviderRequest = (function() { + + /** + * Properties of a GetProviderRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IGetProviderRequest + * @property {string|null} [name] GetProviderRequest name + */ + + /** + * Constructs a new GetProviderRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a GetProviderRequest. + * @implements IGetProviderRequest + * @constructor + * @param {google.cloud.eventarc.v1.IGetProviderRequest=} [properties] Properties to set + */ + function GetProviderRequest(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]]; + } + + /** + * GetProviderRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @instance + */ + GetProviderRequest.prototype.name = ""; + + /** + * Creates a new GetProviderRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @static + * @param {google.cloud.eventarc.v1.IGetProviderRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GetProviderRequest} GetProviderRequest instance + */ + GetProviderRequest.create = function create(properties) { + return new GetProviderRequest(properties); + }; + + /** + * Encodes the specified GetProviderRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetProviderRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @static + * @param {google.cloud.eventarc.v1.IGetProviderRequest} message GetProviderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProviderRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetProviderRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetProviderRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @static + * @param {google.cloud.eventarc.v1.IGetProviderRequest} message GetProviderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProviderRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetProviderRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.GetProviderRequest} GetProviderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProviderRequest.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.eventarc.v1.GetProviderRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetProviderRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.GetProviderRequest} GetProviderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProviderRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetProviderRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProviderRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetProviderRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.GetProviderRequest} GetProviderRequest + */ + GetProviderRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GetProviderRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.GetProviderRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetProviderRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @static + * @param {google.cloud.eventarc.v1.GetProviderRequest} message GetProviderRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetProviderRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetProviderRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @instance + * @returns {Object.} JSON object + */ + GetProviderRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetProviderRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetProviderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.GetProviderRequest"; + }; + + return GetProviderRequest; + })(); + + v1.ListProvidersRequest = (function() { + + /** + * Properties of a ListProvidersRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IListProvidersRequest + * @property {string|null} [parent] ListProvidersRequest parent + * @property {number|null} [pageSize] ListProvidersRequest pageSize + * @property {string|null} [pageToken] ListProvidersRequest pageToken + * @property {string|null} [orderBy] ListProvidersRequest orderBy + * @property {string|null} [filter] ListProvidersRequest filter + */ + + /** + * Constructs a new ListProvidersRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListProvidersRequest. + * @implements IListProvidersRequest + * @constructor + * @param {google.cloud.eventarc.v1.IListProvidersRequest=} [properties] Properties to set + */ + function ListProvidersRequest(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]]; + } + + /** + * ListProvidersRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @instance + */ + ListProvidersRequest.prototype.parent = ""; + + /** + * ListProvidersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @instance + */ + ListProvidersRequest.prototype.pageSize = 0; + + /** + * ListProvidersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @instance + */ + ListProvidersRequest.prototype.pageToken = ""; + + /** + * ListProvidersRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @instance + */ + ListProvidersRequest.prototype.orderBy = ""; + + /** + * ListProvidersRequest filter. + * @member {string} filter + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @instance + */ + ListProvidersRequest.prototype.filter = ""; + + /** + * Creates a new ListProvidersRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @static + * @param {google.cloud.eventarc.v1.IListProvidersRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListProvidersRequest} ListProvidersRequest instance + */ + ListProvidersRequest.create = function create(properties) { + return new ListProvidersRequest(properties); + }; + + /** + * Encodes the specified ListProvidersRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @static + * @param {google.cloud.eventarc.v1.IListProvidersRequest} message ListProvidersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProvidersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListProvidersRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @static + * @param {google.cloud.eventarc.v1.IListProvidersRequest} message ListProvidersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProvidersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListProvidersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListProvidersRequest} ListProvidersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProvidersRequest.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.eventarc.v1.ListProvidersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListProvidersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListProvidersRequest} ListProvidersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProvidersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListProvidersRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListProvidersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListProvidersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListProvidersRequest} ListProvidersRequest + */ + ListProvidersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListProvidersRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.ListProvidersRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListProvidersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @static + * @param {google.cloud.eventarc.v1.ListProvidersRequest} message ListProvidersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListProvidersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListProvidersRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @instance + * @returns {Object.} JSON object + */ + ListProvidersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListProvidersRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListProvidersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListProvidersRequest"; + }; + + return ListProvidersRequest; + })(); + + v1.ListProvidersResponse = (function() { + + /** + * Properties of a ListProvidersResponse. + * @memberof google.cloud.eventarc.v1 + * @interface IListProvidersResponse + * @property {Array.|null} [providers] ListProvidersResponse providers + * @property {string|null} [nextPageToken] ListProvidersResponse nextPageToken + * @property {Array.|null} [unreachable] ListProvidersResponse unreachable + */ + + /** + * Constructs a new ListProvidersResponse. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListProvidersResponse. + * @implements IListProvidersResponse + * @constructor + * @param {google.cloud.eventarc.v1.IListProvidersResponse=} [properties] Properties to set + */ + function ListProvidersResponse(properties) { + this.providers = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListProvidersResponse providers. + * @member {Array.} providers + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @instance + */ + ListProvidersResponse.prototype.providers = $util.emptyArray; + + /** + * ListProvidersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @instance + */ + ListProvidersResponse.prototype.nextPageToken = ""; + + /** + * ListProvidersResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @instance + */ + ListProvidersResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListProvidersResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @static + * @param {google.cloud.eventarc.v1.IListProvidersResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListProvidersResponse} ListProvidersResponse instance + */ + ListProvidersResponse.create = function create(properties) { + return new ListProvidersResponse(properties); + }; + + /** + * Encodes the specified ListProvidersResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @static + * @param {google.cloud.eventarc.v1.IListProvidersResponse} message ListProvidersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProvidersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.providers != null && message.providers.length) + for (var i = 0; i < message.providers.length; ++i) + $root.google.cloud.eventarc.v1.Provider.encode(message.providers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListProvidersResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @static + * @param {google.cloud.eventarc.v1.IListProvidersResponse} message ListProvidersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProvidersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListProvidersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListProvidersResponse} ListProvidersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProvidersResponse.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.eventarc.v1.ListProvidersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.providers && message.providers.length)) + message.providers = []; + message.providers.push($root.google.cloud.eventarc.v1.Provider.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListProvidersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListProvidersResponse} ListProvidersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProvidersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListProvidersResponse message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListProvidersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.providers != null && message.hasOwnProperty("providers")) { + if (!Array.isArray(message.providers)) + return "providers: array expected"; + for (var i = 0; i < message.providers.length; ++i) { + var error = $root.google.cloud.eventarc.v1.Provider.verify(message.providers[i]); + if (error) + return "providers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListProvidersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListProvidersResponse} ListProvidersResponse + */ + ListProvidersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListProvidersResponse) + return object; + var message = new $root.google.cloud.eventarc.v1.ListProvidersResponse(); + if (object.providers) { + if (!Array.isArray(object.providers)) + throw TypeError(".google.cloud.eventarc.v1.ListProvidersResponse.providers: array expected"); + message.providers = []; + for (var i = 0; i < object.providers.length; ++i) { + if (typeof object.providers[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.ListProvidersResponse.providers: object expected"); + message.providers[i] = $root.google.cloud.eventarc.v1.Provider.fromObject(object.providers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.eventarc.v1.ListProvidersResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListProvidersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @static + * @param {google.cloud.eventarc.v1.ListProvidersResponse} message ListProvidersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListProvidersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.providers = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.providers && message.providers.length) { + object.providers = []; + for (var j = 0; j < message.providers.length; ++j) + object.providers[j] = $root.google.cloud.eventarc.v1.Provider.toObject(message.providers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListProvidersResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @instance + * @returns {Object.} JSON object + */ + ListProvidersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListProvidersResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListProvidersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListProvidersResponse"; + }; + + return ListProvidersResponse; + })(); + + v1.GetChannelConnectionRequest = (function() { + + /** + * Properties of a GetChannelConnectionRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IGetChannelConnectionRequest + * @property {string|null} [name] GetChannelConnectionRequest name + */ + + /** + * Constructs a new GetChannelConnectionRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a GetChannelConnectionRequest. + * @implements IGetChannelConnectionRequest + * @constructor + * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest=} [properties] Properties to set + */ + function GetChannelConnectionRequest(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]]; + } + + /** + * GetChannelConnectionRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @instance + */ + GetChannelConnectionRequest.prototype.name = ""; + + /** + * Creates a new GetChannelConnectionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GetChannelConnectionRequest} GetChannelConnectionRequest instance + */ + GetChannelConnectionRequest.create = function create(properties) { + return new GetChannelConnectionRequest(properties); + }; + + /** + * Encodes the specified GetChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest} message GetChannelConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetChannelConnectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest} message GetChannelConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetChannelConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetChannelConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.GetChannelConnectionRequest} GetChannelConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetChannelConnectionRequest.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.eventarc.v1.GetChannelConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetChannelConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.GetChannelConnectionRequest} GetChannelConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetChannelConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetChannelConnectionRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetChannelConnectionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.GetChannelConnectionRequest} GetChannelConnectionRequest + */ + GetChannelConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GetChannelConnectionRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.GetChannelConnectionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetChannelConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.GetChannelConnectionRequest} message GetChannelConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetChannelConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetChannelConnectionRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + GetChannelConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetChannelConnectionRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetChannelConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.GetChannelConnectionRequest"; + }; + + return GetChannelConnectionRequest; + })(); + + v1.ListChannelConnectionsRequest = (function() { + + /** + * Properties of a ListChannelConnectionsRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IListChannelConnectionsRequest + * @property {string|null} [parent] ListChannelConnectionsRequest parent + * @property {number|null} [pageSize] ListChannelConnectionsRequest pageSize + * @property {string|null} [pageToken] ListChannelConnectionsRequest pageToken + */ + + /** + * Constructs a new ListChannelConnectionsRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListChannelConnectionsRequest. + * @implements IListChannelConnectionsRequest + * @constructor + * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest=} [properties] Properties to set + */ + function ListChannelConnectionsRequest(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]]; + } + + /** + * ListChannelConnectionsRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @instance + */ + ListChannelConnectionsRequest.prototype.parent = ""; + + /** + * ListChannelConnectionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @instance + */ + ListChannelConnectionsRequest.prototype.pageSize = 0; + + /** + * ListChannelConnectionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @instance + */ + ListChannelConnectionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListChannelConnectionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @static + * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListChannelConnectionsRequest} ListChannelConnectionsRequest instance + */ + ListChannelConnectionsRequest.create = function create(properties) { + return new ListChannelConnectionsRequest(properties); + }; + + /** + * Encodes the specified ListChannelConnectionsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @static + * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest} message ListChannelConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListChannelConnectionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListChannelConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @static + * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest} message ListChannelConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListChannelConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListChannelConnectionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListChannelConnectionsRequest} ListChannelConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListChannelConnectionsRequest.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.eventarc.v1.ListChannelConnectionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListChannelConnectionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListChannelConnectionsRequest} ListChannelConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListChannelConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListChannelConnectionsRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListChannelConnectionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListChannelConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListChannelConnectionsRequest} ListChannelConnectionsRequest + */ + ListChannelConnectionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListChannelConnectionsRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.ListChannelConnectionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListChannelConnectionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @static + * @param {google.cloud.eventarc.v1.ListChannelConnectionsRequest} message ListChannelConnectionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListChannelConnectionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListChannelConnectionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListChannelConnectionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListChannelConnectionsRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListChannelConnectionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListChannelConnectionsRequest"; + }; + + return ListChannelConnectionsRequest; + })(); + + v1.ListChannelConnectionsResponse = (function() { + + /** + * Properties of a ListChannelConnectionsResponse. + * @memberof google.cloud.eventarc.v1 + * @interface IListChannelConnectionsResponse + * @property {Array.|null} [channelConnections] ListChannelConnectionsResponse channelConnections + * @property {string|null} [nextPageToken] ListChannelConnectionsResponse nextPageToken + * @property {Array.|null} [unreachable] ListChannelConnectionsResponse unreachable + */ + + /** + * Constructs a new ListChannelConnectionsResponse. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListChannelConnectionsResponse. + * @implements IListChannelConnectionsResponse + * @constructor + * @param {google.cloud.eventarc.v1.IListChannelConnectionsResponse=} [properties] Properties to set + */ + function ListChannelConnectionsResponse(properties) { + this.channelConnections = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListChannelConnectionsResponse channelConnections. + * @member {Array.} channelConnections + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @instance + */ + ListChannelConnectionsResponse.prototype.channelConnections = $util.emptyArray; + + /** + * ListChannelConnectionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @instance + */ + ListChannelConnectionsResponse.prototype.nextPageToken = ""; + + /** + * ListChannelConnectionsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @instance + */ + ListChannelConnectionsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListChannelConnectionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @static + * @param {google.cloud.eventarc.v1.IListChannelConnectionsResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListChannelConnectionsResponse} ListChannelConnectionsResponse instance + */ + ListChannelConnectionsResponse.create = function create(properties) { + return new ListChannelConnectionsResponse(properties); + }; + + /** + * Encodes the specified ListChannelConnectionsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @static + * @param {google.cloud.eventarc.v1.IListChannelConnectionsResponse} message ListChannelConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListChannelConnectionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channelConnections != null && message.channelConnections.length) + for (var i = 0; i < message.channelConnections.length; ++i) + $root.google.cloud.eventarc.v1.ChannelConnection.encode(message.channelConnections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListChannelConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @static + * @param {google.cloud.eventarc.v1.IListChannelConnectionsResponse} message ListChannelConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListChannelConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListChannelConnectionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListChannelConnectionsResponse} ListChannelConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListChannelConnectionsResponse.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.eventarc.v1.ListChannelConnectionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.channelConnections && message.channelConnections.length)) + message.channelConnections = []; + message.channelConnections.push($root.google.cloud.eventarc.v1.ChannelConnection.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListChannelConnectionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListChannelConnectionsResponse} ListChannelConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListChannelConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListChannelConnectionsResponse message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListChannelConnectionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channelConnections != null && message.hasOwnProperty("channelConnections")) { + if (!Array.isArray(message.channelConnections)) + return "channelConnections: array expected"; + for (var i = 0; i < message.channelConnections.length; ++i) { + var error = $root.google.cloud.eventarc.v1.ChannelConnection.verify(message.channelConnections[i]); + if (error) + return "channelConnections." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListChannelConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListChannelConnectionsResponse} ListChannelConnectionsResponse + */ + ListChannelConnectionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListChannelConnectionsResponse) + return object; + var message = new $root.google.cloud.eventarc.v1.ListChannelConnectionsResponse(); + if (object.channelConnections) { + if (!Array.isArray(object.channelConnections)) + throw TypeError(".google.cloud.eventarc.v1.ListChannelConnectionsResponse.channelConnections: array expected"); + message.channelConnections = []; + for (var i = 0; i < object.channelConnections.length; ++i) { + if (typeof object.channelConnections[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.ListChannelConnectionsResponse.channelConnections: object expected"); + message.channelConnections[i] = $root.google.cloud.eventarc.v1.ChannelConnection.fromObject(object.channelConnections[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.eventarc.v1.ListChannelConnectionsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListChannelConnectionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @static + * @param {google.cloud.eventarc.v1.ListChannelConnectionsResponse} message ListChannelConnectionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListChannelConnectionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.channelConnections = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.channelConnections && message.channelConnections.length) { + object.channelConnections = []; + for (var j = 0; j < message.channelConnections.length; ++j) + object.channelConnections[j] = $root.google.cloud.eventarc.v1.ChannelConnection.toObject(message.channelConnections[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListChannelConnectionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListChannelConnectionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListChannelConnectionsResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListChannelConnectionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListChannelConnectionsResponse"; + }; + + return ListChannelConnectionsResponse; + })(); + + v1.CreateChannelConnectionRequest = (function() { + + /** + * Properties of a CreateChannelConnectionRequest. + * @memberof google.cloud.eventarc.v1 + * @interface ICreateChannelConnectionRequest + * @property {string|null} [parent] CreateChannelConnectionRequest parent + * @property {google.cloud.eventarc.v1.IChannelConnection|null} [channelConnection] CreateChannelConnectionRequest channelConnection + * @property {string|null} [channelConnectionId] CreateChannelConnectionRequest channelConnectionId + */ + + /** + * Constructs a new CreateChannelConnectionRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a CreateChannelConnectionRequest. + * @implements ICreateChannelConnectionRequest + * @constructor + * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest=} [properties] Properties to set + */ + function CreateChannelConnectionRequest(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]]; + } + + /** + * CreateChannelConnectionRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @instance + */ + CreateChannelConnectionRequest.prototype.parent = ""; + + /** + * CreateChannelConnectionRequest channelConnection. + * @member {google.cloud.eventarc.v1.IChannelConnection|null|undefined} channelConnection + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @instance + */ + CreateChannelConnectionRequest.prototype.channelConnection = null; + + /** + * CreateChannelConnectionRequest channelConnectionId. + * @member {string} channelConnectionId + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @instance + */ + CreateChannelConnectionRequest.prototype.channelConnectionId = ""; + + /** + * Creates a new CreateChannelConnectionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.CreateChannelConnectionRequest} CreateChannelConnectionRequest instance + */ + CreateChannelConnectionRequest.create = function create(properties) { + return new CreateChannelConnectionRequest(properties); + }; + + /** + * Encodes the specified CreateChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest} message CreateChannelConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateChannelConnectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.channelConnection != null && Object.hasOwnProperty.call(message, "channelConnection")) + $root.google.cloud.eventarc.v1.ChannelConnection.encode(message.channelConnection, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.channelConnectionId != null && Object.hasOwnProperty.call(message, "channelConnectionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.channelConnectionId); + return writer; + }; + + /** + * Encodes the specified CreateChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest} message CreateChannelConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateChannelConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateChannelConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.CreateChannelConnectionRequest} CreateChannelConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateChannelConnectionRequest.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.eventarc.v1.CreateChannelConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.channelConnection = $root.google.cloud.eventarc.v1.ChannelConnection.decode(reader, reader.uint32()); + break; + } + case 3: { + message.channelConnectionId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateChannelConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.CreateChannelConnectionRequest} CreateChannelConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateChannelConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateChannelConnectionRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateChannelConnectionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.channelConnection != null && message.hasOwnProperty("channelConnection")) { + var error = $root.google.cloud.eventarc.v1.ChannelConnection.verify(message.channelConnection); + if (error) + return "channelConnection." + error; + } + if (message.channelConnectionId != null && message.hasOwnProperty("channelConnectionId")) + if (!$util.isString(message.channelConnectionId)) + return "channelConnectionId: string expected"; + return null; + }; + + /** + * Creates a CreateChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.CreateChannelConnectionRequest} CreateChannelConnectionRequest + */ + CreateChannelConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.CreateChannelConnectionRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.CreateChannelConnectionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.channelConnection != null) { + if (typeof object.channelConnection !== "object") + throw TypeError(".google.cloud.eventarc.v1.CreateChannelConnectionRequest.channelConnection: object expected"); + message.channelConnection = $root.google.cloud.eventarc.v1.ChannelConnection.fromObject(object.channelConnection); + } + if (object.channelConnectionId != null) + message.channelConnectionId = String(object.channelConnectionId); + return message; + }; + + /** + * Creates a plain object from a CreateChannelConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.CreateChannelConnectionRequest} message CreateChannelConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateChannelConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.channelConnection = null; + object.channelConnectionId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.channelConnection != null && message.hasOwnProperty("channelConnection")) + object.channelConnection = $root.google.cloud.eventarc.v1.ChannelConnection.toObject(message.channelConnection, options); + if (message.channelConnectionId != null && message.hasOwnProperty("channelConnectionId")) + object.channelConnectionId = message.channelConnectionId; + return object; + }; + + /** + * Converts this CreateChannelConnectionRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateChannelConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateChannelConnectionRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateChannelConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.CreateChannelConnectionRequest"; + }; + + return CreateChannelConnectionRequest; + })(); + + v1.DeleteChannelConnectionRequest = (function() { + + /** + * Properties of a DeleteChannelConnectionRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IDeleteChannelConnectionRequest + * @property {string|null} [name] DeleteChannelConnectionRequest name + */ + + /** + * Constructs a new DeleteChannelConnectionRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a DeleteChannelConnectionRequest. + * @implements IDeleteChannelConnectionRequest + * @constructor + * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest=} [properties] Properties to set + */ + function DeleteChannelConnectionRequest(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]]; + } + + /** + * DeleteChannelConnectionRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @instance + */ + DeleteChannelConnectionRequest.prototype.name = ""; + + /** + * Creates a new DeleteChannelConnectionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.DeleteChannelConnectionRequest} DeleteChannelConnectionRequest instance + */ + DeleteChannelConnectionRequest.create = function create(properties) { + return new DeleteChannelConnectionRequest(properties); + }; + + /** + * Encodes the specified DeleteChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest} message DeleteChannelConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteChannelConnectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest} message DeleteChannelConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteChannelConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteChannelConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.DeleteChannelConnectionRequest} DeleteChannelConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteChannelConnectionRequest.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.eventarc.v1.DeleteChannelConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteChannelConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.DeleteChannelConnectionRequest} DeleteChannelConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteChannelConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteChannelConnectionRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteChannelConnectionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.DeleteChannelConnectionRequest} DeleteChannelConnectionRequest + */ + DeleteChannelConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.DeleteChannelConnectionRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.DeleteChannelConnectionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteChannelConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @static + * @param {google.cloud.eventarc.v1.DeleteChannelConnectionRequest} message DeleteChannelConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteChannelConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteChannelConnectionRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteChannelConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteChannelConnectionRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteChannelConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.DeleteChannelConnectionRequest"; + }; + + return DeleteChannelConnectionRequest; + })(); + + v1.UpdateGoogleChannelConfigRequest = (function() { + + /** + * Properties of an UpdateGoogleChannelConfigRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IUpdateGoogleChannelConfigRequest + * @property {google.cloud.eventarc.v1.IGoogleChannelConfig|null} [googleChannelConfig] UpdateGoogleChannelConfigRequest googleChannelConfig + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGoogleChannelConfigRequest updateMask + */ + + /** + * Constructs a new UpdateGoogleChannelConfigRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents an UpdateGoogleChannelConfigRequest. + * @implements IUpdateGoogleChannelConfigRequest + * @constructor + * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest=} [properties] Properties to set + */ + function UpdateGoogleChannelConfigRequest(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]]; + } + + /** + * UpdateGoogleChannelConfigRequest googleChannelConfig. + * @member {google.cloud.eventarc.v1.IGoogleChannelConfig|null|undefined} googleChannelConfig + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @instance + */ + UpdateGoogleChannelConfigRequest.prototype.googleChannelConfig = null; + + /** + * UpdateGoogleChannelConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @instance + */ + UpdateGoogleChannelConfigRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateGoogleChannelConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest} UpdateGoogleChannelConfigRequest instance + */ + UpdateGoogleChannelConfigRequest.create = function create(properties) { + return new UpdateGoogleChannelConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateGoogleChannelConfigRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest} message UpdateGoogleChannelConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGoogleChannelConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.googleChannelConfig != null && Object.hasOwnProperty.call(message, "googleChannelConfig")) + $root.google.cloud.eventarc.v1.GoogleChannelConfig.encode(message.googleChannelConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateGoogleChannelConfigRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest} message UpdateGoogleChannelConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGoogleChannelConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGoogleChannelConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest} UpdateGoogleChannelConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGoogleChannelConfigRequest.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.eventarc.v1.UpdateGoogleChannelConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.googleChannelConfig = $root.google.cloud.eventarc.v1.GoogleChannelConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateGoogleChannelConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest} UpdateGoogleChannelConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGoogleChannelConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGoogleChannelConfigRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGoogleChannelConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.googleChannelConfig != null && message.hasOwnProperty("googleChannelConfig")) { + var error = $root.google.cloud.eventarc.v1.GoogleChannelConfig.verify(message.googleChannelConfig); + if (error) + return "googleChannelConfig." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateGoogleChannelConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest} UpdateGoogleChannelConfigRequest + */ + UpdateGoogleChannelConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest(); + if (object.googleChannelConfig != null) { + if (typeof object.googleChannelConfig !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.googleChannelConfig: object expected"); + message.googleChannelConfig = $root.google.cloud.eventarc.v1.GoogleChannelConfig.fromObject(object.googleChannelConfig); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateGoogleChannelConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @static + * @param {google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest} message UpdateGoogleChannelConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGoogleChannelConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.googleChannelConfig = null; + object.updateMask = null; + } + if (message.googleChannelConfig != null && message.hasOwnProperty("googleChannelConfig")) + object.googleChannelConfig = $root.google.cloud.eventarc.v1.GoogleChannelConfig.toObject(message.googleChannelConfig, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateGoogleChannelConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateGoogleChannelConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateGoogleChannelConfigRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateGoogleChannelConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest"; + }; + + return UpdateGoogleChannelConfigRequest; + })(); + + v1.GetGoogleChannelConfigRequest = (function() { + + /** + * Properties of a GetGoogleChannelConfigRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IGetGoogleChannelConfigRequest + * @property {string|null} [name] GetGoogleChannelConfigRequest name + */ + + /** + * Constructs a new GetGoogleChannelConfigRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a GetGoogleChannelConfigRequest. + * @implements IGetGoogleChannelConfigRequest + * @constructor + * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest=} [properties] Properties to set + */ + function GetGoogleChannelConfigRequest(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]]; + } + + /** + * GetGoogleChannelConfigRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @instance + */ + GetGoogleChannelConfigRequest.prototype.name = ""; + + /** + * Creates a new GetGoogleChannelConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @static + * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GetGoogleChannelConfigRequest} GetGoogleChannelConfigRequest instance + */ + GetGoogleChannelConfigRequest.create = function create(properties) { + return new GetGoogleChannelConfigRequest(properties); + }; + + /** + * Encodes the specified GetGoogleChannelConfigRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleChannelConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @static + * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest} message GetGoogleChannelConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGoogleChannelConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetGoogleChannelConfigRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleChannelConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @static + * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest} message GetGoogleChannelConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGoogleChannelConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGoogleChannelConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.GetGoogleChannelConfigRequest} GetGoogleChannelConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGoogleChannelConfigRequest.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.eventarc.v1.GetGoogleChannelConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGoogleChannelConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.GetGoogleChannelConfigRequest} GetGoogleChannelConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGoogleChannelConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGoogleChannelConfigRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGoogleChannelConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetGoogleChannelConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.GetGoogleChannelConfigRequest} GetGoogleChannelConfigRequest + */ + GetGoogleChannelConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetGoogleChannelConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @static + * @param {google.cloud.eventarc.v1.GetGoogleChannelConfigRequest} message GetGoogleChannelConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGoogleChannelConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetGoogleChannelConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetGoogleChannelConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetGoogleChannelConfigRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetGoogleChannelConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.GetGoogleChannelConfigRequest"; + }; + + return GetGoogleChannelConfigRequest; + })(); + + v1.GetMessageBusRequest = (function() { + + /** + * Properties of a GetMessageBusRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IGetMessageBusRequest + * @property {string|null} [name] GetMessageBusRequest name + */ + + /** + * Constructs a new GetMessageBusRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a GetMessageBusRequest. + * @implements IGetMessageBusRequest + * @constructor + * @param {google.cloud.eventarc.v1.IGetMessageBusRequest=} [properties] Properties to set + */ + function GetMessageBusRequest(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]]; + } + + /** + * GetMessageBusRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @instance + */ + GetMessageBusRequest.prototype.name = ""; + + /** + * Creates a new GetMessageBusRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.IGetMessageBusRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GetMessageBusRequest} GetMessageBusRequest instance + */ + GetMessageBusRequest.create = function create(properties) { + return new GetMessageBusRequest(properties); + }; + + /** + * Encodes the specified GetMessageBusRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetMessageBusRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.IGetMessageBusRequest} message GetMessageBusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMessageBusRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetMessageBusRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetMessageBusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.IGetMessageBusRequest} message GetMessageBusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMessageBusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMessageBusRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.GetMessageBusRequest} GetMessageBusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMessageBusRequest.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.eventarc.v1.GetMessageBusRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMessageBusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.GetMessageBusRequest} GetMessageBusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMessageBusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMessageBusRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMessageBusRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetMessageBusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.GetMessageBusRequest} GetMessageBusRequest + */ + GetMessageBusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GetMessageBusRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.GetMessageBusRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMessageBusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.GetMessageBusRequest} message GetMessageBusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMessageBusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetMessageBusRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @instance + * @returns {Object.} JSON object + */ + GetMessageBusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMessageBusRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.GetMessageBusRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMessageBusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.GetMessageBusRequest"; + }; + + return GetMessageBusRequest; + })(); + + v1.ListMessageBusesRequest = (function() { + + /** + * Properties of a ListMessageBusesRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IListMessageBusesRequest + * @property {string|null} [parent] ListMessageBusesRequest parent + * @property {number|null} [pageSize] ListMessageBusesRequest pageSize + * @property {string|null} [pageToken] ListMessageBusesRequest pageToken + * @property {string|null} [orderBy] ListMessageBusesRequest orderBy + * @property {string|null} [filter] ListMessageBusesRequest filter + */ + + /** + * Constructs a new ListMessageBusesRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListMessageBusesRequest. + * @implements IListMessageBusesRequest + * @constructor + * @param {google.cloud.eventarc.v1.IListMessageBusesRequest=} [properties] Properties to set + */ + function ListMessageBusesRequest(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]]; + } + + /** + * ListMessageBusesRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @instance + */ + ListMessageBusesRequest.prototype.parent = ""; + + /** + * ListMessageBusesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @instance + */ + ListMessageBusesRequest.prototype.pageSize = 0; + + /** + * ListMessageBusesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @instance + */ + ListMessageBusesRequest.prototype.pageToken = ""; + + /** + * ListMessageBusesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @instance + */ + ListMessageBusesRequest.prototype.orderBy = ""; + + /** + * ListMessageBusesRequest filter. + * @member {string} filter + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @instance + */ + ListMessageBusesRequest.prototype.filter = ""; + + /** + * Creates a new ListMessageBusesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusesRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListMessageBusesRequest} ListMessageBusesRequest instance + */ + ListMessageBusesRequest.create = function create(properties) { + return new ListMessageBusesRequest(properties); + }; + + /** + * Encodes the specified ListMessageBusesRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusesRequest} message ListMessageBusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessageBusesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListMessageBusesRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusesRequest} message ListMessageBusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessageBusesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessageBusesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListMessageBusesRequest} ListMessageBusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessageBusesRequest.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.eventarc.v1.ListMessageBusesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMessageBusesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListMessageBusesRequest} ListMessageBusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessageBusesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMessageBusesRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessageBusesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListMessageBusesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListMessageBusesRequest} ListMessageBusesRequest + */ + ListMessageBusesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListMessageBusesRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.ListMessageBusesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListMessageBusesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @static + * @param {google.cloud.eventarc.v1.ListMessageBusesRequest} message ListMessageBusesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessageBusesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListMessageBusesRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @instance + * @returns {Object.} JSON object + */ + ListMessageBusesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMessageBusesRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListMessageBusesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessageBusesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListMessageBusesRequest"; + }; + + return ListMessageBusesRequest; + })(); + + v1.ListMessageBusesResponse = (function() { + + /** + * Properties of a ListMessageBusesResponse. + * @memberof google.cloud.eventarc.v1 + * @interface IListMessageBusesResponse + * @property {Array.|null} [messageBuses] ListMessageBusesResponse messageBuses + * @property {string|null} [nextPageToken] ListMessageBusesResponse nextPageToken + * @property {Array.|null} [unreachable] ListMessageBusesResponse unreachable + */ + + /** + * Constructs a new ListMessageBusesResponse. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListMessageBusesResponse. + * @implements IListMessageBusesResponse + * @constructor + * @param {google.cloud.eventarc.v1.IListMessageBusesResponse=} [properties] Properties to set + */ + function ListMessageBusesResponse(properties) { + this.messageBuses = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMessageBusesResponse messageBuses. + * @member {Array.} messageBuses + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @instance + */ + ListMessageBusesResponse.prototype.messageBuses = $util.emptyArray; + + /** + * ListMessageBusesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @instance + */ + ListMessageBusesResponse.prototype.nextPageToken = ""; + + /** + * ListMessageBusesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @instance + */ + ListMessageBusesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListMessageBusesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusesResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListMessageBusesResponse} ListMessageBusesResponse instance + */ + ListMessageBusesResponse.create = function create(properties) { + return new ListMessageBusesResponse(properties); + }; + + /** + * Encodes the specified ListMessageBusesResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusesResponse} message ListMessageBusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessageBusesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageBuses != null && message.messageBuses.length) + for (var i = 0; i < message.messageBuses.length; ++i) + $root.google.cloud.eventarc.v1.MessageBus.encode(message.messageBuses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListMessageBusesResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusesResponse} message ListMessageBusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessageBusesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessageBusesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListMessageBusesResponse} ListMessageBusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessageBusesResponse.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.eventarc.v1.ListMessageBusesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.messageBuses && message.messageBuses.length)) + message.messageBuses = []; + message.messageBuses.push($root.google.cloud.eventarc.v1.MessageBus.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMessageBusesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListMessageBusesResponse} ListMessageBusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessageBusesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMessageBusesResponse message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessageBusesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageBuses != null && message.hasOwnProperty("messageBuses")) { + if (!Array.isArray(message.messageBuses)) + return "messageBuses: array expected"; + for (var i = 0; i < message.messageBuses.length; ++i) { + var error = $root.google.cloud.eventarc.v1.MessageBus.verify(message.messageBuses[i]); + if (error) + return "messageBuses." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListMessageBusesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListMessageBusesResponse} ListMessageBusesResponse + */ + ListMessageBusesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListMessageBusesResponse) + return object; + var message = new $root.google.cloud.eventarc.v1.ListMessageBusesResponse(); + if (object.messageBuses) { + if (!Array.isArray(object.messageBuses)) + throw TypeError(".google.cloud.eventarc.v1.ListMessageBusesResponse.messageBuses: array expected"); + message.messageBuses = []; + for (var i = 0; i < object.messageBuses.length; ++i) { + if (typeof object.messageBuses[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.ListMessageBusesResponse.messageBuses: object expected"); + message.messageBuses[i] = $root.google.cloud.eventarc.v1.MessageBus.fromObject(object.messageBuses[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.eventarc.v1.ListMessageBusesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListMessageBusesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @static + * @param {google.cloud.eventarc.v1.ListMessageBusesResponse} message ListMessageBusesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessageBusesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.messageBuses = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.messageBuses && message.messageBuses.length) { + object.messageBuses = []; + for (var j = 0; j < message.messageBuses.length; ++j) + object.messageBuses[j] = $root.google.cloud.eventarc.v1.MessageBus.toObject(message.messageBuses[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListMessageBusesResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @instance + * @returns {Object.} JSON object + */ + ListMessageBusesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMessageBusesResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListMessageBusesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessageBusesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListMessageBusesResponse"; + }; + + return ListMessageBusesResponse; + })(); + + v1.ListMessageBusEnrollmentsRequest = (function() { + + /** + * Properties of a ListMessageBusEnrollmentsRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IListMessageBusEnrollmentsRequest + * @property {string|null} [parent] ListMessageBusEnrollmentsRequest parent + * @property {number|null} [pageSize] ListMessageBusEnrollmentsRequest pageSize + * @property {string|null} [pageToken] ListMessageBusEnrollmentsRequest pageToken + */ + + /** + * Constructs a new ListMessageBusEnrollmentsRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListMessageBusEnrollmentsRequest. + * @implements IListMessageBusEnrollmentsRequest + * @constructor + * @param {google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest=} [properties] Properties to set + */ + function ListMessageBusEnrollmentsRequest(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]]; + } + + /** + * ListMessageBusEnrollmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @instance + */ + ListMessageBusEnrollmentsRequest.prototype.parent = ""; + + /** + * ListMessageBusEnrollmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @instance + */ + ListMessageBusEnrollmentsRequest.prototype.pageSize = 0; + + /** + * ListMessageBusEnrollmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @instance + */ + ListMessageBusEnrollmentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMessageBusEnrollmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest} ListMessageBusEnrollmentsRequest instance + */ + ListMessageBusEnrollmentsRequest.create = function create(properties) { + return new ListMessageBusEnrollmentsRequest(properties); + }; + + /** + * Encodes the specified ListMessageBusEnrollmentsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest} message ListMessageBusEnrollmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessageBusEnrollmentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListMessageBusEnrollmentsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest} message ListMessageBusEnrollmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessageBusEnrollmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessageBusEnrollmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest} ListMessageBusEnrollmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessageBusEnrollmentsRequest.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.eventarc.v1.ListMessageBusEnrollmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMessageBusEnrollmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest} ListMessageBusEnrollmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessageBusEnrollmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMessageBusEnrollmentsRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessageBusEnrollmentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListMessageBusEnrollmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest} ListMessageBusEnrollmentsRequest + */ + ListMessageBusEnrollmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListMessageBusEnrollmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @static + * @param {google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest} message ListMessageBusEnrollmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessageBusEnrollmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListMessageBusEnrollmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMessageBusEnrollmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMessageBusEnrollmentsRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessageBusEnrollmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest"; + }; + + return ListMessageBusEnrollmentsRequest; + })(); + + v1.ListMessageBusEnrollmentsResponse = (function() { + + /** + * Properties of a ListMessageBusEnrollmentsResponse. + * @memberof google.cloud.eventarc.v1 + * @interface IListMessageBusEnrollmentsResponse + * @property {Array.|null} [enrollments] ListMessageBusEnrollmentsResponse enrollments + * @property {string|null} [nextPageToken] ListMessageBusEnrollmentsResponse nextPageToken + * @property {Array.|null} [unreachable] ListMessageBusEnrollmentsResponse unreachable + */ + + /** + * Constructs a new ListMessageBusEnrollmentsResponse. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListMessageBusEnrollmentsResponse. + * @implements IListMessageBusEnrollmentsResponse + * @constructor + * @param {google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse=} [properties] Properties to set + */ + function ListMessageBusEnrollmentsResponse(properties) { + this.enrollments = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMessageBusEnrollmentsResponse enrollments. + * @member {Array.} enrollments + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @instance + */ + ListMessageBusEnrollmentsResponse.prototype.enrollments = $util.emptyArray; + + /** + * ListMessageBusEnrollmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @instance + */ + ListMessageBusEnrollmentsResponse.prototype.nextPageToken = ""; + + /** + * ListMessageBusEnrollmentsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @instance + */ + ListMessageBusEnrollmentsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListMessageBusEnrollmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse} ListMessageBusEnrollmentsResponse instance + */ + ListMessageBusEnrollmentsResponse.create = function create(properties) { + return new ListMessageBusEnrollmentsResponse(properties); + }; + + /** + * Encodes the specified ListMessageBusEnrollmentsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse} message ListMessageBusEnrollmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessageBusEnrollmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enrollments != null && message.enrollments.length) + for (var i = 0; i < message.enrollments.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.enrollments[i]); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListMessageBusEnrollmentsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @static + * @param {google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse} message ListMessageBusEnrollmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessageBusEnrollmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessageBusEnrollmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse} ListMessageBusEnrollmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessageBusEnrollmentsResponse.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.eventarc.v1.ListMessageBusEnrollmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.enrollments && message.enrollments.length)) + message.enrollments = []; + message.enrollments.push(reader.string()); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMessageBusEnrollmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse} ListMessageBusEnrollmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessageBusEnrollmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMessageBusEnrollmentsResponse message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessageBusEnrollmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enrollments != null && message.hasOwnProperty("enrollments")) { + if (!Array.isArray(message.enrollments)) + return "enrollments: array expected"; + for (var i = 0; i < message.enrollments.length; ++i) + if (!$util.isString(message.enrollments[i])) + return "enrollments: string[] expected"; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListMessageBusEnrollmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse} ListMessageBusEnrollmentsResponse + */ + ListMessageBusEnrollmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse) + return object; + var message = new $root.google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse(); + if (object.enrollments) { + if (!Array.isArray(object.enrollments)) + throw TypeError(".google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse.enrollments: array expected"); + message.enrollments = []; + for (var i = 0; i < object.enrollments.length; ++i) + message.enrollments[i] = String(object.enrollments[i]); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListMessageBusEnrollmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @static + * @param {google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse} message ListMessageBusEnrollmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessageBusEnrollmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.enrollments = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.enrollments && message.enrollments.length) { + object.enrollments = []; + for (var j = 0; j < message.enrollments.length; ++j) + object.enrollments[j] = message.enrollments[j]; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListMessageBusEnrollmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMessageBusEnrollmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMessageBusEnrollmentsResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessageBusEnrollmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse"; + }; + + return ListMessageBusEnrollmentsResponse; + })(); + + v1.CreateMessageBusRequest = (function() { + + /** + * Properties of a CreateMessageBusRequest. + * @memberof google.cloud.eventarc.v1 + * @interface ICreateMessageBusRequest + * @property {string|null} [parent] CreateMessageBusRequest parent + * @property {google.cloud.eventarc.v1.IMessageBus|null} [messageBus] CreateMessageBusRequest messageBus + * @property {string|null} [messageBusId] CreateMessageBusRequest messageBusId + * @property {boolean|null} [validateOnly] CreateMessageBusRequest validateOnly + */ + + /** + * Constructs a new CreateMessageBusRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a CreateMessageBusRequest. + * @implements ICreateMessageBusRequest + * @constructor + * @param {google.cloud.eventarc.v1.ICreateMessageBusRequest=} [properties] Properties to set + */ + function CreateMessageBusRequest(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]]; + } + + /** + * CreateMessageBusRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @instance + */ + CreateMessageBusRequest.prototype.parent = ""; + + /** + * CreateMessageBusRequest messageBus. + * @member {google.cloud.eventarc.v1.IMessageBus|null|undefined} messageBus + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @instance + */ + CreateMessageBusRequest.prototype.messageBus = null; + + /** + * CreateMessageBusRequest messageBusId. + * @member {string} messageBusId + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @instance + */ + CreateMessageBusRequest.prototype.messageBusId = ""; + + /** + * CreateMessageBusRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @instance + */ + CreateMessageBusRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateMessageBusRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateMessageBusRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.CreateMessageBusRequest} CreateMessageBusRequest instance + */ + CreateMessageBusRequest.create = function create(properties) { + return new CreateMessageBusRequest(properties); + }; + + /** + * Encodes the specified CreateMessageBusRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateMessageBusRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateMessageBusRequest} message CreateMessageBusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMessageBusRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.messageBus != null && Object.hasOwnProperty.call(message, "messageBus")) + $root.google.cloud.eventarc.v1.MessageBus.encode(message.messageBus, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.messageBusId != null && Object.hasOwnProperty.call(message, "messageBusId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.messageBusId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateMessageBusRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateMessageBusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.ICreateMessageBusRequest} message CreateMessageBusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMessageBusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMessageBusRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.CreateMessageBusRequest} CreateMessageBusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMessageBusRequest.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.eventarc.v1.CreateMessageBusRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.messageBus = $root.google.cloud.eventarc.v1.MessageBus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.messageBusId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMessageBusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.CreateMessageBusRequest} CreateMessageBusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMessageBusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMessageBusRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMessageBusRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.messageBus != null && message.hasOwnProperty("messageBus")) { + var error = $root.google.cloud.eventarc.v1.MessageBus.verify(message.messageBus); + if (error) + return "messageBus." + error; + } + if (message.messageBusId != null && message.hasOwnProperty("messageBusId")) + if (!$util.isString(message.messageBusId)) + return "messageBusId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateMessageBusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.CreateMessageBusRequest} CreateMessageBusRequest + */ + CreateMessageBusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.CreateMessageBusRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.CreateMessageBusRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.messageBus != null) { + if (typeof object.messageBus !== "object") + throw TypeError(".google.cloud.eventarc.v1.CreateMessageBusRequest.messageBus: object expected"); + message.messageBus = $root.google.cloud.eventarc.v1.MessageBus.fromObject(object.messageBus); + } + if (object.messageBusId != null) + message.messageBusId = String(object.messageBusId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateMessageBusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.CreateMessageBusRequest} message CreateMessageBusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMessageBusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.messageBus = null; + object.messageBusId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.messageBus != null && message.hasOwnProperty("messageBus")) + object.messageBus = $root.google.cloud.eventarc.v1.MessageBus.toObject(message.messageBus, options); + if (message.messageBusId != null && message.hasOwnProperty("messageBusId")) + object.messageBusId = message.messageBusId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateMessageBusRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMessageBusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMessageBusRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.CreateMessageBusRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMessageBusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.CreateMessageBusRequest"; + }; + + return CreateMessageBusRequest; + })(); + + v1.UpdateMessageBusRequest = (function() { + + /** + * Properties of an UpdateMessageBusRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IUpdateMessageBusRequest + * @property {google.cloud.eventarc.v1.IMessageBus|null} [messageBus] UpdateMessageBusRequest messageBus + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMessageBusRequest updateMask + * @property {boolean|null} [allowMissing] UpdateMessageBusRequest allowMissing + * @property {boolean|null} [validateOnly] UpdateMessageBusRequest validateOnly + */ + + /** + * Constructs a new UpdateMessageBusRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents an UpdateMessageBusRequest. + * @implements IUpdateMessageBusRequest + * @constructor + * @param {google.cloud.eventarc.v1.IUpdateMessageBusRequest=} [properties] Properties to set + */ + function UpdateMessageBusRequest(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]]; + } + + /** + * UpdateMessageBusRequest messageBus. + * @member {google.cloud.eventarc.v1.IMessageBus|null|undefined} messageBus + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @instance + */ + UpdateMessageBusRequest.prototype.messageBus = null; + + /** + * UpdateMessageBusRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @instance + */ + UpdateMessageBusRequest.prototype.updateMask = null; + + /** + * UpdateMessageBusRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @instance + */ + UpdateMessageBusRequest.prototype.allowMissing = false; + + /** + * UpdateMessageBusRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @instance + */ + UpdateMessageBusRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateMessageBusRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateMessageBusRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.UpdateMessageBusRequest} UpdateMessageBusRequest instance + */ + UpdateMessageBusRequest.create = function create(properties) { + return new UpdateMessageBusRequest(properties); + }; + + /** + * Encodes the specified UpdateMessageBusRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateMessageBusRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateMessageBusRequest} message UpdateMessageBusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMessageBusRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageBus != null && Object.hasOwnProperty.call(message, "messageBus")) + $root.google.cloud.eventarc.v1.MessageBus.encode(message.messageBus, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateMessageBusRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateMessageBusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.IUpdateMessageBusRequest} message UpdateMessageBusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMessageBusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateMessageBusRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.UpdateMessageBusRequest} UpdateMessageBusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMessageBusRequest.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.eventarc.v1.UpdateMessageBusRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageBus = $root.google.cloud.eventarc.v1.MessageBus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateMessageBusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.UpdateMessageBusRequest} UpdateMessageBusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMessageBusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createChannel}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef CreateChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Verifies an UpdateMessageBusRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMessageBusRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageBus != null && message.hasOwnProperty("messageBus")) { + var error = $root.google.cloud.eventarc.v1.MessageBus.verify(message.messageBus); + if (error) + return "messageBus." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateMessageBusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.UpdateMessageBusRequest} UpdateMessageBusRequest + */ + UpdateMessageBusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.UpdateMessageBusRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.UpdateMessageBusRequest(); + if (object.messageBus != null) { + if (typeof object.messageBus !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateMessageBusRequest.messageBus: object expected"); + message.messageBus = $root.google.cloud.eventarc.v1.MessageBus.fromObject(object.messageBus); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateMessageBusRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateMessageBusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.UpdateMessageBusRequest} message UpdateMessageBusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMessageBusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.messageBus = null; + object.updateMask = null; + object.allowMissing = false; + object.validateOnly = false; + } + if (message.messageBus != null && message.hasOwnProperty("messageBus")) + object.messageBus = $root.google.cloud.eventarc.v1.MessageBus.toObject(message.messageBus, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateMessageBusRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMessageBusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMessageBusRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.UpdateMessageBusRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMessageBusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.UpdateMessageBusRequest"; + }; + + return UpdateMessageBusRequest; + })(); + + v1.DeleteMessageBusRequest = (function() { + + /** + * Properties of a DeleteMessageBusRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IDeleteMessageBusRequest + * @property {string|null} [name] DeleteMessageBusRequest name + * @property {string|null} [etag] DeleteMessageBusRequest etag + * @property {boolean|null} [allowMissing] DeleteMessageBusRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteMessageBusRequest validateOnly + */ + + /** + * Constructs a new DeleteMessageBusRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a DeleteMessageBusRequest. + * @implements IDeleteMessageBusRequest + * @constructor + * @param {google.cloud.eventarc.v1.IDeleteMessageBusRequest=} [properties] Properties to set + */ + function DeleteMessageBusRequest(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]]; + } + + /** + * DeleteMessageBusRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @instance + */ + DeleteMessageBusRequest.prototype.name = ""; + + /** + * DeleteMessageBusRequest etag. + * @member {string} etag + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @instance + */ + DeleteMessageBusRequest.prototype.etag = ""; + + /** + * DeleteMessageBusRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @instance + */ + DeleteMessageBusRequest.prototype.allowMissing = false; + + /** + * DeleteMessageBusRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @instance + */ + DeleteMessageBusRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteMessageBusRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteMessageBusRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.DeleteMessageBusRequest} DeleteMessageBusRequest instance + */ + DeleteMessageBusRequest.create = function create(properties) { + return new DeleteMessageBusRequest(properties); + }; + + /** + * Encodes the specified DeleteMessageBusRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteMessageBusRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteMessageBusRequest} message DeleteMessageBusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMessageBusRequest.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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified DeleteMessageBusRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteMessageBusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.IDeleteMessageBusRequest} message DeleteMessageBusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMessageBusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMessageBusRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.DeleteMessageBusRequest} DeleteMessageBusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMessageBusRequest.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.eventarc.v1.DeleteMessageBusRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMessageBusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.DeleteMessageBusRequest} DeleteMessageBusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMessageBusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMessageBusRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMessageBusRequest.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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a DeleteMessageBusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.DeleteMessageBusRequest} DeleteMessageBusRequest + */ + DeleteMessageBusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.DeleteMessageBusRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.DeleteMessageBusRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a DeleteMessageBusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @static + * @param {google.cloud.eventarc.v1.DeleteMessageBusRequest} message DeleteMessageBusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + DeleteMessageBusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.allowMissing = false; + object.validateOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; /** - * Calls CreateChannel. - * @function createChannel - * @memberof google.cloud.eventarc.v1.Eventarc + * Converts this DeleteMessageBusRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest * @instance - * @param {google.cloud.eventarc.v1.ICreateChannelRequest} request CreateChannelRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.CreateChannelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(Eventarc.prototype.createChannel = function createChannel(request, callback) { - return this.rpcCall(createChannel, $root.google.cloud.eventarc.v1.CreateChannelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateChannel" }); + DeleteMessageBusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls CreateChannel. - * @function createChannel - * @memberof google.cloud.eventarc.v1.Eventarc + * Gets the default type url for DeleteMessageBusRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.DeleteMessageBusRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMessageBusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.DeleteMessageBusRequest"; + }; + + return DeleteMessageBusRequest; + })(); + + v1.GetEnrollmentRequest = (function() { + + /** + * Properties of a GetEnrollmentRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IGetEnrollmentRequest + * @property {string|null} [name] GetEnrollmentRequest name + */ + + /** + * Constructs a new GetEnrollmentRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a GetEnrollmentRequest. + * @implements IGetEnrollmentRequest + * @constructor + * @param {google.cloud.eventarc.v1.IGetEnrollmentRequest=} [properties] Properties to set + */ + function GetEnrollmentRequest(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]]; + } + + /** + * GetEnrollmentRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest * @instance - * @param {google.cloud.eventarc.v1.ICreateChannelRequest} request CreateChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + GetEnrollmentRequest.prototype.name = ""; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateChannel}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef UpdateChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new GetEnrollmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest + * @static + * @param {google.cloud.eventarc.v1.IGetEnrollmentRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GetEnrollmentRequest} GetEnrollmentRequest instance */ + GetEnrollmentRequest.create = function create(properties) { + return new GetEnrollmentRequest(properties); + }; /** - * Calls UpdateChannel. - * @function updateChannel - * @memberof google.cloud.eventarc.v1.Eventarc + * Encodes the specified GetEnrollmentRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetEnrollmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest + * @static + * @param {google.cloud.eventarc.v1.IGetEnrollmentRequest} message GetEnrollmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnrollmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetEnrollmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest + * @static + * @param {google.cloud.eventarc.v1.IGetEnrollmentRequest} message GetEnrollmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnrollmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEnrollmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.GetEnrollmentRequest} GetEnrollmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnrollmentRequest.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.eventarc.v1.GetEnrollmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEnrollmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.GetEnrollmentRequest} GetEnrollmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnrollmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEnrollmentRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEnrollmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetEnrollmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.GetEnrollmentRequest} GetEnrollmentRequest + */ + GetEnrollmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GetEnrollmentRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.GetEnrollmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEnrollmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest + * @static + * @param {google.cloud.eventarc.v1.GetEnrollmentRequest} message GetEnrollmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEnrollmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetEnrollmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest * @instance - * @param {google.cloud.eventarc.v1.IUpdateChannelRequest} request UpdateChannelRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.UpdateChannelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(Eventarc.prototype.updateChannel = function updateChannel(request, callback) { - return this.rpcCall(updateChannel, $root.google.cloud.eventarc.v1.UpdateChannelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateChannel" }); + GetEnrollmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls UpdateChannel. - * @function updateChannel - * @memberof google.cloud.eventarc.v1.Eventarc + * Gets the default type url for GetEnrollmentRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.GetEnrollmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEnrollmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.GetEnrollmentRequest"; + }; + + return GetEnrollmentRequest; + })(); + + v1.ListEnrollmentsRequest = (function() { + + /** + * Properties of a ListEnrollmentsRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IListEnrollmentsRequest + * @property {string|null} [parent] ListEnrollmentsRequest parent + * @property {number|null} [pageSize] ListEnrollmentsRequest pageSize + * @property {string|null} [pageToken] ListEnrollmentsRequest pageToken + * @property {string|null} [orderBy] ListEnrollmentsRequest orderBy + * @property {string|null} [filter] ListEnrollmentsRequest filter + */ + + /** + * Constructs a new ListEnrollmentsRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListEnrollmentsRequest. + * @implements IListEnrollmentsRequest + * @constructor + * @param {google.cloud.eventarc.v1.IListEnrollmentsRequest=} [properties] Properties to set + */ + function ListEnrollmentsRequest(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]]; + } + + /** + * ListEnrollmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest * @instance - * @param {google.cloud.eventarc.v1.IUpdateChannelRequest} request UpdateChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListEnrollmentsRequest.prototype.parent = ""; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteChannel}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef DeleteChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * ListEnrollmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @instance */ + ListEnrollmentsRequest.prototype.pageSize = 0; /** - * Calls DeleteChannel. - * @function deleteChannel - * @memberof google.cloud.eventarc.v1.Eventarc + * ListEnrollmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest * @instance - * @param {google.cloud.eventarc.v1.IDeleteChannelRequest} request DeleteChannelRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.DeleteChannelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Eventarc.prototype.deleteChannel = function deleteChannel(request, callback) { - return this.rpcCall(deleteChannel, $root.google.cloud.eventarc.v1.DeleteChannelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteChannel" }); + ListEnrollmentsRequest.prototype.pageToken = ""; /** - * Calls DeleteChannel. - * @function deleteChannel - * @memberof google.cloud.eventarc.v1.Eventarc + * ListEnrollmentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @instance + */ + ListEnrollmentsRequest.prototype.orderBy = ""; + + /** + * ListEnrollmentsRequest filter. + * @member {string} filter + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest * @instance - * @param {google.cloud.eventarc.v1.IDeleteChannelRequest} request DeleteChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListEnrollmentsRequest.prototype.filter = ""; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getProvider}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef GetProviderCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.v1.Provider} [response] Provider + * Creates a new ListEnrollmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @static + * @param {google.cloud.eventarc.v1.IListEnrollmentsRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListEnrollmentsRequest} ListEnrollmentsRequest instance */ + ListEnrollmentsRequest.create = function create(properties) { + return new ListEnrollmentsRequest(properties); + }; /** - * Calls GetProvider. - * @function getProvider - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IGetProviderRequest} request GetProviderRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.GetProviderCallback} callback Node-style callback called with the error, if any, and Provider - * @returns {undefined} - * @variation 1 + * Encodes the specified ListEnrollmentsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListEnrollmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @static + * @param {google.cloud.eventarc.v1.IListEnrollmentsRequest} message ListEnrollmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Eventarc.prototype.getProvider = function getProvider(request, callback) { - return this.rpcCall(getProvider, $root.google.cloud.eventarc.v1.GetProviderRequest, $root.google.cloud.eventarc.v1.Provider, request, callback); - }, "name", { value: "GetProvider" }); + ListEnrollmentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; /** - * Calls GetProvider. - * @function getProvider - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IGetProviderRequest} request GetProviderRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListEnrollmentsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListEnrollmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @static + * @param {google.cloud.eventarc.v1.IListEnrollmentsRequest} message ListEnrollmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListEnrollmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listProviders}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef ListProvidersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.v1.ListProvidersResponse} [response] ListProvidersResponse + * Decodes a ListEnrollmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListEnrollmentsRequest} ListEnrollmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListEnrollmentsRequest.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.eventarc.v1.ListEnrollmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls ListProviders. - * @function listProviders - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IListProvidersRequest} request ListProvidersRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.ListProvidersCallback} callback Node-style callback called with the error, if any, and ListProvidersResponse - * @returns {undefined} - * @variation 1 + * Decodes a ListEnrollmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListEnrollmentsRequest} ListEnrollmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(Eventarc.prototype.listProviders = function listProviders(request, callback) { - return this.rpcCall(listProviders, $root.google.cloud.eventarc.v1.ListProvidersRequest, $root.google.cloud.eventarc.v1.ListProvidersResponse, request, callback); - }, "name", { value: "ListProviders" }); + ListEnrollmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListProviders. - * @function listProviders - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IListProvidersRequest} request ListProvidersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListEnrollmentsRequest message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListEnrollmentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getChannelConnection}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef GetChannelConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.v1.ChannelConnection} [response] ChannelConnection + * Creates a ListEnrollmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListEnrollmentsRequest} ListEnrollmentsRequest */ + ListEnrollmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListEnrollmentsRequest) + return object; + var message = new $root.google.cloud.eventarc.v1.ListEnrollmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; /** - * Calls GetChannelConnection. - * @function getChannelConnection - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest} request GetChannelConnectionRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.GetChannelConnectionCallback} callback Node-style callback called with the error, if any, and ChannelConnection - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListEnrollmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @static + * @param {google.cloud.eventarc.v1.ListEnrollmentsRequest} message ListEnrollmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(Eventarc.prototype.getChannelConnection = function getChannelConnection(request, callback) { - return this.rpcCall(getChannelConnection, $root.google.cloud.eventarc.v1.GetChannelConnectionRequest, $root.google.cloud.eventarc.v1.ChannelConnection, request, callback); - }, "name", { value: "GetChannelConnection" }); + ListEnrollmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; /** - * Calls GetChannelConnection. - * @function getChannelConnection - * @memberof google.cloud.eventarc.v1.Eventarc + * Converts this ListEnrollmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest * @instance - * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest} request GetChannelConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListEnrollmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|listChannelConnections}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef ListChannelConnectionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.v1.ListChannelConnectionsResponse} [response] ListChannelConnectionsResponse + * Gets the default type url for ListEnrollmentsRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListEnrollmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ListEnrollmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListEnrollmentsRequest"; + }; + + return ListEnrollmentsRequest; + })(); + + v1.ListEnrollmentsResponse = (function() { /** - * Calls ListChannelConnections. - * @function listChannelConnections - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest} request ListChannelConnectionsRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.ListChannelConnectionsCallback} callback Node-style callback called with the error, if any, and ListChannelConnectionsResponse - * @returns {undefined} - * @variation 1 + * Properties of a ListEnrollmentsResponse. + * @memberof google.cloud.eventarc.v1 + * @interface IListEnrollmentsResponse + * @property {Array.|null} [enrollments] ListEnrollmentsResponse enrollments + * @property {string|null} [nextPageToken] ListEnrollmentsResponse nextPageToken + * @property {Array.|null} [unreachable] ListEnrollmentsResponse unreachable */ - Object.defineProperty(Eventarc.prototype.listChannelConnections = function listChannelConnections(request, callback) { - return this.rpcCall(listChannelConnections, $root.google.cloud.eventarc.v1.ListChannelConnectionsRequest, $root.google.cloud.eventarc.v1.ListChannelConnectionsResponse, request, callback); - }, "name", { value: "ListChannelConnections" }); /** - * Calls ListChannelConnections. - * @function listChannelConnections - * @memberof google.cloud.eventarc.v1.Eventarc + * Constructs a new ListEnrollmentsResponse. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a ListEnrollmentsResponse. + * @implements IListEnrollmentsResponse + * @constructor + * @param {google.cloud.eventarc.v1.IListEnrollmentsResponse=} [properties] Properties to set + */ + function ListEnrollmentsResponse(properties) { + this.enrollments = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnrollmentsResponse enrollments. + * @member {Array.} enrollments + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse * @instance - * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest} request ListChannelConnectionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListEnrollmentsResponse.prototype.enrollments = $util.emptyArray; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|createChannelConnection}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef CreateChannelConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * ListEnrollmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse + * @instance */ + ListEnrollmentsResponse.prototype.nextPageToken = ""; /** - * Calls CreateChannelConnection. - * @function createChannelConnection - * @memberof google.cloud.eventarc.v1.Eventarc + * ListEnrollmentsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse * @instance - * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest} request CreateChannelConnectionRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.CreateChannelConnectionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(Eventarc.prototype.createChannelConnection = function createChannelConnection(request, callback) { - return this.rpcCall(createChannelConnection, $root.google.cloud.eventarc.v1.CreateChannelConnectionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateChannelConnection" }); + ListEnrollmentsResponse.prototype.unreachable = $util.emptyArray; /** - * Calls CreateChannelConnection. - * @function createChannelConnection - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest} request CreateChannelConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ListEnrollmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse + * @static + * @param {google.cloud.eventarc.v1.IListEnrollmentsResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListEnrollmentsResponse} ListEnrollmentsResponse instance */ + ListEnrollmentsResponse.create = function create(properties) { + return new ListEnrollmentsResponse(properties); + }; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|deleteChannelConnection}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef DeleteChannelConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified ListEnrollmentsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListEnrollmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse + * @static + * @param {google.cloud.eventarc.v1.IListEnrollmentsResponse} message ListEnrollmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListEnrollmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enrollments != null && message.enrollments.length) + for (var i = 0; i < message.enrollments.length; ++i) + $root.google.cloud.eventarc.v1.Enrollment.encode(message.enrollments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; /** - * Calls DeleteChannelConnection. - * @function deleteChannelConnection - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest} request DeleteChannelConnectionRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.DeleteChannelConnectionCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified ListEnrollmentsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListEnrollmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse + * @static + * @param {google.cloud.eventarc.v1.IListEnrollmentsResponse} message ListEnrollmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(Eventarc.prototype.deleteChannelConnection = function deleteChannelConnection(request, callback) { - return this.rpcCall(deleteChannelConnection, $root.google.cloud.eventarc.v1.DeleteChannelConnectionRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteChannelConnection" }); + ListEnrollmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls DeleteChannelConnection. - * @function deleteChannelConnection - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest} request DeleteChannelConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ListEnrollmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.ListEnrollmentsResponse} ListEnrollmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListEnrollmentsResponse.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.eventarc.v1.ListEnrollmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.enrollments && message.enrollments.length)) + message.enrollments = []; + message.enrollments.push($root.google.cloud.eventarc.v1.Enrollment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|getGoogleChannelConfig}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef GetGoogleChannelConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.v1.GoogleChannelConfig} [response] GoogleChannelConfig + * Decodes a ListEnrollmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.ListEnrollmentsResponse} ListEnrollmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListEnrollmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetGoogleChannelConfig. - * @function getGoogleChannelConfig - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest} request GetGoogleChannelConfigRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.GetGoogleChannelConfigCallback} callback Node-style callback called with the error, if any, and GoogleChannelConfig - * @returns {undefined} - * @variation 1 + * Verifies a ListEnrollmentsResponse message. + * @function verify + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(Eventarc.prototype.getGoogleChannelConfig = function getGoogleChannelConfig(request, callback) { - return this.rpcCall(getGoogleChannelConfig, $root.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest, $root.google.cloud.eventarc.v1.GoogleChannelConfig, request, callback); - }, "name", { value: "GetGoogleChannelConfig" }); + ListEnrollmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enrollments != null && message.hasOwnProperty("enrollments")) { + if (!Array.isArray(message.enrollments)) + return "enrollments: array expected"; + for (var i = 0; i < message.enrollments.length; ++i) { + var error = $root.google.cloud.eventarc.v1.Enrollment.verify(message.enrollments[i]); + if (error) + return "enrollments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; /** - * Calls GetGoogleChannelConfig. - * @function getGoogleChannelConfig - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest} request GetGoogleChannelConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ListEnrollmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.ListEnrollmentsResponse} ListEnrollmentsResponse */ + ListEnrollmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListEnrollmentsResponse) + return object; + var message = new $root.google.cloud.eventarc.v1.ListEnrollmentsResponse(); + if (object.enrollments) { + if (!Array.isArray(object.enrollments)) + throw TypeError(".google.cloud.eventarc.v1.ListEnrollmentsResponse.enrollments: array expected"); + message.enrollments = []; + for (var i = 0; i < object.enrollments.length; ++i) { + if (typeof object.enrollments[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.ListEnrollmentsResponse.enrollments: object expected"); + message.enrollments[i] = $root.google.cloud.eventarc.v1.Enrollment.fromObject(object.enrollments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.eventarc.v1.ListEnrollmentsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; /** - * Callback as used by {@link google.cloud.eventarc.v1.Eventarc|updateGoogleChannelConfig}. - * @memberof google.cloud.eventarc.v1.Eventarc - * @typedef UpdateGoogleChannelConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.v1.GoogleChannelConfig} [response] GoogleChannelConfig + * Creates a plain object from a ListEnrollmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse + * @static + * @param {google.cloud.eventarc.v1.ListEnrollmentsResponse} message ListEnrollmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + ListEnrollmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.enrollments = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.enrollments && message.enrollments.length) { + object.enrollments = []; + for (var j = 0; j < message.enrollments.length; ++j) + object.enrollments[j] = $root.google.cloud.eventarc.v1.Enrollment.toObject(message.enrollments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; /** - * Calls UpdateGoogleChannelConfig. - * @function updateGoogleChannelConfig - * @memberof google.cloud.eventarc.v1.Eventarc + * Converts this ListEnrollmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse * @instance - * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest} request UpdateGoogleChannelConfigRequest message or plain object - * @param {google.cloud.eventarc.v1.Eventarc.UpdateGoogleChannelConfigCallback} callback Node-style callback called with the error, if any, and GoogleChannelConfig - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(Eventarc.prototype.updateGoogleChannelConfig = function updateGoogleChannelConfig(request, callback) { - return this.rpcCall(updateGoogleChannelConfig, $root.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest, $root.google.cloud.eventarc.v1.GoogleChannelConfig, request, callback); - }, "name", { value: "UpdateGoogleChannelConfig" }); + ListEnrollmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls UpdateGoogleChannelConfig. - * @function updateGoogleChannelConfig - * @memberof google.cloud.eventarc.v1.Eventarc - * @instance - * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest} request UpdateGoogleChannelConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for ListEnrollmentsResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.ListEnrollmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ListEnrollmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListEnrollmentsResponse"; + }; - return Eventarc; + return ListEnrollmentsResponse; })(); - v1.GetTriggerRequest = (function() { + v1.CreateEnrollmentRequest = (function() { /** - * Properties of a GetTriggerRequest. + * Properties of a CreateEnrollmentRequest. * @memberof google.cloud.eventarc.v1 - * @interface IGetTriggerRequest - * @property {string|null} [name] GetTriggerRequest name + * @interface ICreateEnrollmentRequest + * @property {string|null} [parent] CreateEnrollmentRequest parent + * @property {google.cloud.eventarc.v1.IEnrollment|null} [enrollment] CreateEnrollmentRequest enrollment + * @property {string|null} [enrollmentId] CreateEnrollmentRequest enrollmentId + * @property {boolean|null} [validateOnly] CreateEnrollmentRequest validateOnly */ /** - * Constructs a new GetTriggerRequest. + * Constructs a new CreateEnrollmentRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a GetTriggerRequest. - * @implements IGetTriggerRequest + * @classdesc Represents a CreateEnrollmentRequest. + * @implements ICreateEnrollmentRequest * @constructor - * @param {google.cloud.eventarc.v1.IGetTriggerRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.ICreateEnrollmentRequest=} [properties] Properties to set */ - function GetTriggerRequest(properties) { + function CreateEnrollmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2353,75 +12104,117 @@ } /** - * GetTriggerRequest name. - * @member {string} name - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * CreateEnrollmentRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest + * @instance + */ + CreateEnrollmentRequest.prototype.parent = ""; + + /** + * CreateEnrollmentRequest enrollment. + * @member {google.cloud.eventarc.v1.IEnrollment|null|undefined} enrollment + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest + * @instance + */ + CreateEnrollmentRequest.prototype.enrollment = null; + + /** + * CreateEnrollmentRequest enrollmentId. + * @member {string} enrollmentId + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest + * @instance + */ + CreateEnrollmentRequest.prototype.enrollmentId = ""; + + /** + * CreateEnrollmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @instance */ - GetTriggerRequest.prototype.name = ""; + CreateEnrollmentRequest.prototype.validateOnly = false; /** - * Creates a new GetTriggerRequest instance using the specified properties. + * Creates a new CreateEnrollmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.IGetTriggerRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.GetTriggerRequest} GetTriggerRequest instance + * @param {google.cloud.eventarc.v1.ICreateEnrollmentRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.CreateEnrollmentRequest} CreateEnrollmentRequest instance */ - GetTriggerRequest.create = function create(properties) { - return new GetTriggerRequest(properties); + CreateEnrollmentRequest.create = function create(properties) { + return new CreateEnrollmentRequest(properties); }; /** - * Encodes the specified GetTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetTriggerRequest.verify|verify} messages. + * Encodes the specified CreateEnrollmentRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateEnrollmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.IGetTriggerRequest} message GetTriggerRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.ICreateEnrollmentRequest} message CreateEnrollmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTriggerRequest.encode = function encode(message, writer) { + CreateEnrollmentRequest.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.enrollment != null && Object.hasOwnProperty.call(message, "enrollment")) + $root.google.cloud.eventarc.v1.Enrollment.encode(message.enrollment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.enrollmentId != null && Object.hasOwnProperty.call(message, "enrollmentId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.enrollmentId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified GetTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetTriggerRequest.verify|verify} messages. + * Encodes the specified CreateEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateEnrollmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.IGetTriggerRequest} message GetTriggerRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.ICreateEnrollmentRequest} message CreateEnrollmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateEnrollmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTriggerRequest message from the specified reader or buffer. + * Decodes a CreateEnrollmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.GetTriggerRequest} GetTriggerRequest + * @returns {google.cloud.eventarc.v1.CreateEnrollmentRequest} CreateEnrollmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTriggerRequest.decode = function decode(reader, length) { + CreateEnrollmentRequest.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.eventarc.v1.GetTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.CreateEnrollmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.enrollment = $root.google.cloud.eventarc.v1.Enrollment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.enrollmentId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -2433,126 +12226,155 @@ }; /** - * Decodes a GetTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEnrollmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.GetTriggerRequest} GetTriggerRequest + * @returns {google.cloud.eventarc.v1.CreateEnrollmentRequest} CreateEnrollmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + CreateEnrollmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTriggerRequest message. + * Verifies a CreateEnrollmentRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTriggerRequest.verify = function verify(message) { + CreateEnrollmentRequest.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.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.enrollment != null && message.hasOwnProperty("enrollment")) { + var error = $root.google.cloud.eventarc.v1.Enrollment.verify(message.enrollment); + if (error) + return "enrollment." + error; + } + if (message.enrollmentId != null && message.hasOwnProperty("enrollmentId")) + if (!$util.isString(message.enrollmentId)) + return "enrollmentId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a GetTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEnrollmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.GetTriggerRequest} GetTriggerRequest + * @returns {google.cloud.eventarc.v1.CreateEnrollmentRequest} CreateEnrollmentRequest */ - GetTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.GetTriggerRequest) + CreateEnrollmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.CreateEnrollmentRequest) return object; - var message = new $root.google.cloud.eventarc.v1.GetTriggerRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.eventarc.v1.CreateEnrollmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.enrollment != null) { + if (typeof object.enrollment !== "object") + throw TypeError(".google.cloud.eventarc.v1.CreateEnrollmentRequest.enrollment: object expected"); + message.enrollment = $root.google.cloud.eventarc.v1.Enrollment.fromObject(object.enrollment); + } + if (object.enrollmentId != null) + message.enrollmentId = String(object.enrollmentId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a GetTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateEnrollmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.GetTriggerRequest} message GetTriggerRequest + * @param {google.cloud.eventarc.v1.CreateEnrollmentRequest} message CreateEnrollmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTriggerRequest.toObject = function toObject(message, options) { + CreateEnrollmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.enrollment = null; + object.enrollmentId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.enrollment != null && message.hasOwnProperty("enrollment")) + object.enrollment = $root.google.cloud.eventarc.v1.Enrollment.toObject(message.enrollment, options); + if (message.enrollmentId != null && message.hasOwnProperty("enrollmentId")) + object.enrollmentId = message.enrollmentId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this GetTriggerRequest to JSON. + * Converts this CreateEnrollmentRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @instance * @returns {Object.} JSON object */ - GetTriggerRequest.prototype.toJSON = function toJSON() { + CreateEnrollmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTriggerRequest + * Gets the default type url for CreateEnrollmentRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.GetTriggerRequest + * @memberof google.cloud.eventarc.v1.CreateEnrollmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateEnrollmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.GetTriggerRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.CreateEnrollmentRequest"; }; - return GetTriggerRequest; + return CreateEnrollmentRequest; })(); - v1.ListTriggersRequest = (function() { + v1.UpdateEnrollmentRequest = (function() { /** - * Properties of a ListTriggersRequest. + * Properties of an UpdateEnrollmentRequest. * @memberof google.cloud.eventarc.v1 - * @interface IListTriggersRequest - * @property {string|null} [parent] ListTriggersRequest parent - * @property {number|null} [pageSize] ListTriggersRequest pageSize - * @property {string|null} [pageToken] ListTriggersRequest pageToken - * @property {string|null} [orderBy] ListTriggersRequest orderBy - * @property {string|null} [filter] ListTriggersRequest filter + * @interface IUpdateEnrollmentRequest + * @property {google.cloud.eventarc.v1.IEnrollment|null} [enrollment] UpdateEnrollmentRequest enrollment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnrollmentRequest updateMask + * @property {boolean|null} [allowMissing] UpdateEnrollmentRequest allowMissing + * @property {boolean|null} [validateOnly] UpdateEnrollmentRequest validateOnly */ /** - * Constructs a new ListTriggersRequest. + * Constructs a new UpdateEnrollmentRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a ListTriggersRequest. - * @implements IListTriggersRequest + * @classdesc Represents an UpdateEnrollmentRequest. + * @implements IUpdateEnrollmentRequest * @constructor - * @param {google.cloud.eventarc.v1.IListTriggersRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IUpdateEnrollmentRequest=} [properties] Properties to set */ - function ListTriggersRequest(properties) { + function UpdateEnrollmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2560,131 +12382,117 @@ } /** - * ListTriggersRequest parent. - * @member {string} parent - * @memberof google.cloud.eventarc.v1.ListTriggersRequest - * @instance - */ - ListTriggersRequest.prototype.parent = ""; - - /** - * ListTriggersRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * UpdateEnrollmentRequest enrollment. + * @member {google.cloud.eventarc.v1.IEnrollment|null|undefined} enrollment + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @instance */ - ListTriggersRequest.prototype.pageSize = 0; + UpdateEnrollmentRequest.prototype.enrollment = null; /** - * ListTriggersRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * UpdateEnrollmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @instance */ - ListTriggersRequest.prototype.pageToken = ""; + UpdateEnrollmentRequest.prototype.updateMask = null; /** - * ListTriggersRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * UpdateEnrollmentRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @instance */ - ListTriggersRequest.prototype.orderBy = ""; + UpdateEnrollmentRequest.prototype.allowMissing = false; /** - * ListTriggersRequest filter. - * @member {string} filter - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * UpdateEnrollmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @instance */ - ListTriggersRequest.prototype.filter = ""; + UpdateEnrollmentRequest.prototype.validateOnly = false; /** - * Creates a new ListTriggersRequest instance using the specified properties. + * Creates a new UpdateEnrollmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.IListTriggersRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.ListTriggersRequest} ListTriggersRequest instance + * @param {google.cloud.eventarc.v1.IUpdateEnrollmentRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.UpdateEnrollmentRequest} UpdateEnrollmentRequest instance */ - ListTriggersRequest.create = function create(properties) { - return new ListTriggersRequest(properties); + UpdateEnrollmentRequest.create = function create(properties) { + return new UpdateEnrollmentRequest(properties); }; /** - * Encodes the specified ListTriggersRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersRequest.verify|verify} messages. + * Encodes the specified UpdateEnrollmentRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateEnrollmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.IListTriggersRequest} message ListTriggersRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IUpdateEnrollmentRequest} message UpdateEnrollmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTriggersRequest.encode = function encode(message, writer) { + UpdateEnrollmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.enrollment != null && Object.hasOwnProperty.call(message, "enrollment")) + $root.google.cloud.eventarc.v1.Enrollment.encode(message.enrollment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListTriggersRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersRequest.verify|verify} messages. + * Encodes the specified UpdateEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateEnrollmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.IListTriggersRequest} message ListTriggersRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IUpdateEnrollmentRequest} message UpdateEnrollmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTriggersRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEnrollmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTriggersRequest message from the specified reader or buffer. + * Decodes an UpdateEnrollmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.ListTriggersRequest} ListTriggersRequest + * @returns {google.cloud.eventarc.v1.UpdateEnrollmentRequest} UpdateEnrollmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTriggersRequest.decode = function decode(reader, length) { + UpdateEnrollmentRequest.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.eventarc.v1.ListTriggersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.UpdateEnrollmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.enrollment = $root.google.cloud.eventarc.v1.Enrollment.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); + message.allowMissing = reader.bool(); break; } case 4: { - message.orderBy = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); + message.validateOnly = reader.bool(); break; } default: @@ -2696,159 +12504,160 @@ }; /** - * Decodes a ListTriggersRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateEnrollmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.ListTriggersRequest} ListTriggersRequest + * @returns {google.cloud.eventarc.v1.UpdateEnrollmentRequest} UpdateEnrollmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTriggersRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateEnrollmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTriggersRequest message. + * Verifies an UpdateEnrollmentRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTriggersRequest.verify = function verify(message) { + UpdateEnrollmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.enrollment != null && message.hasOwnProperty("enrollment")) { + var error = $root.google.cloud.eventarc.v1.Enrollment.verify(message.enrollment); + if (error) + return "enrollment." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListTriggersRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEnrollmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.ListTriggersRequest} ListTriggersRequest + * @returns {google.cloud.eventarc.v1.UpdateEnrollmentRequest} UpdateEnrollmentRequest */ - ListTriggersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.ListTriggersRequest) + UpdateEnrollmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.UpdateEnrollmentRequest) return object; - var message = new $root.google.cloud.eventarc.v1.ListTriggersRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.eventarc.v1.UpdateEnrollmentRequest(); + if (object.enrollment != null) { + if (typeof object.enrollment !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateEnrollmentRequest.enrollment: object expected"); + message.enrollment = $root.google.cloud.eventarc.v1.Enrollment.fromObject(object.enrollment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateEnrollmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListTriggersRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateEnrollmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.ListTriggersRequest} message ListTriggersRequest + * @param {google.cloud.eventarc.v1.UpdateEnrollmentRequest} message UpdateEnrollmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTriggersRequest.toObject = function toObject(message, options) { + UpdateEnrollmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - object.filter = ""; + object.enrollment = null; + object.updateMask = null; + object.allowMissing = false; + object.validateOnly = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.enrollment != null && message.hasOwnProperty("enrollment")) + object.enrollment = $root.google.cloud.eventarc.v1.Enrollment.toObject(message.enrollment, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListTriggersRequest to JSON. + * Converts this UpdateEnrollmentRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @instance * @returns {Object.} JSON object */ - ListTriggersRequest.prototype.toJSON = function toJSON() { + UpdateEnrollmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTriggersRequest + * Gets the default type url for UpdateEnrollmentRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.ListTriggersRequest + * @memberof google.cloud.eventarc.v1.UpdateEnrollmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTriggersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateEnrollmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.ListTriggersRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.UpdateEnrollmentRequest"; }; - return ListTriggersRequest; + return UpdateEnrollmentRequest; })(); - v1.ListTriggersResponse = (function() { + v1.DeleteEnrollmentRequest = (function() { /** - * Properties of a ListTriggersResponse. + * Properties of a DeleteEnrollmentRequest. * @memberof google.cloud.eventarc.v1 - * @interface IListTriggersResponse - * @property {Array.|null} [triggers] ListTriggersResponse triggers - * @property {string|null} [nextPageToken] ListTriggersResponse nextPageToken - * @property {Array.|null} [unreachable] ListTriggersResponse unreachable + * @interface IDeleteEnrollmentRequest + * @property {string|null} [name] DeleteEnrollmentRequest name + * @property {string|null} [etag] DeleteEnrollmentRequest etag + * @property {boolean|null} [allowMissing] DeleteEnrollmentRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteEnrollmentRequest validateOnly */ /** - * Constructs a new ListTriggersResponse. + * Constructs a new DeleteEnrollmentRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a ListTriggersResponse. - * @implements IListTriggersResponse + * @classdesc Represents a DeleteEnrollmentRequest. + * @implements IDeleteEnrollmentRequest * @constructor - * @param {google.cloud.eventarc.v1.IListTriggersResponse=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IDeleteEnrollmentRequest=} [properties] Properties to set */ - function ListTriggersResponse(properties) { - this.triggers = []; - this.unreachable = []; + function DeleteEnrollmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2856,109 +12665,117 @@ } /** - * ListTriggersResponse triggers. - * @member {Array.} triggers - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * DeleteEnrollmentRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @instance */ - ListTriggersResponse.prototype.triggers = $util.emptyArray; + DeleteEnrollmentRequest.prototype.name = ""; /** - * ListTriggersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * DeleteEnrollmentRequest etag. + * @member {string} etag + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @instance */ - ListTriggersResponse.prototype.nextPageToken = ""; + DeleteEnrollmentRequest.prototype.etag = ""; /** - * ListTriggersResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * DeleteEnrollmentRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @instance */ - ListTriggersResponse.prototype.unreachable = $util.emptyArray; + DeleteEnrollmentRequest.prototype.allowMissing = false; /** - * Creates a new ListTriggersResponse instance using the specified properties. + * DeleteEnrollmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest + * @instance + */ + DeleteEnrollmentRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteEnrollmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.IListTriggersResponse=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.ListTriggersResponse} ListTriggersResponse instance + * @param {google.cloud.eventarc.v1.IDeleteEnrollmentRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.DeleteEnrollmentRequest} DeleteEnrollmentRequest instance */ - ListTriggersResponse.create = function create(properties) { - return new ListTriggersResponse(properties); + DeleteEnrollmentRequest.create = function create(properties) { + return new DeleteEnrollmentRequest(properties); }; /** - * Encodes the specified ListTriggersResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersResponse.verify|verify} messages. + * Encodes the specified DeleteEnrollmentRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteEnrollmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.IListTriggersResponse} message ListTriggersResponse message or plain object to encode + * @param {google.cloud.eventarc.v1.IDeleteEnrollmentRequest} message DeleteEnrollmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTriggersResponse.encode = function encode(message, writer) { + DeleteEnrollmentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.triggers != null && message.triggers.length) - for (var i = 0; i < message.triggers.length; ++i) - $root.google.cloud.eventarc.v1.Trigger.encode(message.triggers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListTriggersResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListTriggersResponse.verify|verify} messages. + * Encodes the specified DeleteEnrollmentRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteEnrollmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.IListTriggersResponse} message ListTriggersResponse message or plain object to encode + * @param {google.cloud.eventarc.v1.IDeleteEnrollmentRequest} message DeleteEnrollmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListTriggersResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEnrollmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListTriggersResponse message from the specified reader or buffer. + * Decodes a DeleteEnrollmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.ListTriggersResponse} ListTriggersResponse + * @returns {google.cloud.eventarc.v1.DeleteEnrollmentRequest} DeleteEnrollmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTriggersResponse.decode = function decode(reader, length) { + DeleteEnrollmentRequest.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.eventarc.v1.ListTriggersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.DeleteEnrollmentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.triggers && message.triggers.length)) - message.triggers = []; - message.triggers.push($root.google.cloud.eventarc.v1.Trigger.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.etag = reader.string(); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -2970,290 +12787,223 @@ }; /** - * Decodes a ListTriggersResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteEnrollmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.ListTriggersResponse} ListTriggersResponse + * @returns {google.cloud.eventarc.v1.DeleteEnrollmentRequest} DeleteEnrollmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListTriggersResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteEnrollmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListTriggersResponse message. + * Verifies a DeleteEnrollmentRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListTriggersResponse.verify = function verify(message) { + DeleteEnrollmentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.triggers != null && message.hasOwnProperty("triggers")) { - if (!Array.isArray(message.triggers)) - return "triggers: array expected"; - for (var i = 0; i < message.triggers.length; ++i) { - var error = $root.google.cloud.eventarc.v1.Trigger.verify(message.triggers[i]); - if (error) - return "triggers." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListTriggersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEnrollmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.ListTriggersResponse} ListTriggersResponse + * @returns {google.cloud.eventarc.v1.DeleteEnrollmentRequest} DeleteEnrollmentRequest */ - ListTriggersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.ListTriggersResponse) + DeleteEnrollmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.DeleteEnrollmentRequest) return object; - var message = new $root.google.cloud.eventarc.v1.ListTriggersResponse(); - if (object.triggers) { - if (!Array.isArray(object.triggers)) - throw TypeError(".google.cloud.eventarc.v1.ListTriggersResponse.triggers: array expected"); - message.triggers = []; - for (var i = 0; i < object.triggers.length; ++i) { - if (typeof object.triggers[i] !== "object") - throw TypeError(".google.cloud.eventarc.v1.ListTriggersResponse.triggers: object expected"); - message.triggers[i] = $root.google.cloud.eventarc.v1.Trigger.fromObject(object.triggers[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.eventarc.v1.ListTriggersResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.eventarc.v1.DeleteEnrollmentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListTriggersResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteEnrollmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @static - * @param {google.cloud.eventarc.v1.ListTriggersResponse} message ListTriggersResponse + * @param {google.cloud.eventarc.v1.DeleteEnrollmentRequest} message DeleteEnrollmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListTriggersResponse.toObject = function toObject(message, options) { + DeleteEnrollmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.triggers = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.triggers && message.triggers.length) { - object.triggers = []; - for (var j = 0; j < message.triggers.length; ++j) - object.triggers[j] = $root.google.cloud.eventarc.v1.Trigger.toObject(message.triggers[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.allowMissing = false; + object.validateOnly = false; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListTriggersResponse to JSON. + * Converts this DeleteEnrollmentRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @instance * @returns {Object.} JSON object */ - ListTriggersResponse.prototype.toJSON = function toJSON() { + DeleteEnrollmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTriggersResponse + * Gets the default type url for DeleteEnrollmentRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.ListTriggersResponse + * @memberof google.cloud.eventarc.v1.DeleteEnrollmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTriggersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteEnrollmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.ListTriggersResponse"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.DeleteEnrollmentRequest"; }; - return ListTriggersResponse; - })(); - - v1.CreateTriggerRequest = (function() { - - /** - * Properties of a CreateTriggerRequest. - * @memberof google.cloud.eventarc.v1 - * @interface ICreateTriggerRequest - * @property {string|null} [parent] CreateTriggerRequest parent - * @property {google.cloud.eventarc.v1.ITrigger|null} [trigger] CreateTriggerRequest trigger - * @property {string|null} [triggerId] CreateTriggerRequest triggerId - * @property {boolean|null} [validateOnly] CreateTriggerRequest validateOnly - */ - - /** - * Constructs a new CreateTriggerRequest. - * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a CreateTriggerRequest. - * @implements ICreateTriggerRequest - * @constructor - * @param {google.cloud.eventarc.v1.ICreateTriggerRequest=} [properties] Properties to set - */ - function CreateTriggerRequest(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]]; - } - - /** - * CreateTriggerRequest parent. - * @member {string} parent - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest - * @instance - */ - CreateTriggerRequest.prototype.parent = ""; + return DeleteEnrollmentRequest; + })(); + + v1.GetPipelineRequest = (function() { /** - * CreateTriggerRequest trigger. - * @member {google.cloud.eventarc.v1.ITrigger|null|undefined} trigger - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest - * @instance + * Properties of a GetPipelineRequest. + * @memberof google.cloud.eventarc.v1 + * @interface IGetPipelineRequest + * @property {string|null} [name] GetPipelineRequest name */ - CreateTriggerRequest.prototype.trigger = null; /** - * CreateTriggerRequest triggerId. - * @member {string} triggerId - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest - * @instance + * Constructs a new GetPipelineRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a GetPipelineRequest. + * @implements IGetPipelineRequest + * @constructor + * @param {google.cloud.eventarc.v1.IGetPipelineRequest=} [properties] Properties to set */ - CreateTriggerRequest.prototype.triggerId = ""; + function GetPipelineRequest(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]]; + } /** - * CreateTriggerRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * GetPipelineRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @instance */ - CreateTriggerRequest.prototype.validateOnly = false; + GetPipelineRequest.prototype.name = ""; /** - * Creates a new CreateTriggerRequest instance using the specified properties. + * Creates a new GetPipelineRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @static - * @param {google.cloud.eventarc.v1.ICreateTriggerRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.CreateTriggerRequest} CreateTriggerRequest instance + * @param {google.cloud.eventarc.v1.IGetPipelineRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GetPipelineRequest} GetPipelineRequest instance */ - CreateTriggerRequest.create = function create(properties) { - return new CreateTriggerRequest(properties); + GetPipelineRequest.create = function create(properties) { + return new GetPipelineRequest(properties); }; /** - * Encodes the specified CreateTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateTriggerRequest.verify|verify} messages. + * Encodes the specified GetPipelineRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetPipelineRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @static - * @param {google.cloud.eventarc.v1.ICreateTriggerRequest} message CreateTriggerRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IGetPipelineRequest} message GetPipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTriggerRequest.encode = function encode(message, writer) { + GetPipelineRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - $root.google.cloud.eventarc.v1.Trigger.encode(message.trigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.triggerId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateTriggerRequest.verify|verify} messages. + * Encodes the specified GetPipelineRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetPipelineRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @static - * @param {google.cloud.eventarc.v1.ICreateTriggerRequest} message CreateTriggerRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IGetPipelineRequest} message GetPipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetPipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateTriggerRequest message from the specified reader or buffer. + * Decodes a GetPipelineRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.CreateTriggerRequest} CreateTriggerRequest + * @returns {google.cloud.eventarc.v1.GetPipelineRequest} GetPipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTriggerRequest.decode = function decode(reader, length) { + GetPipelineRequest.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.eventarc.v1.CreateTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.GetPipelineRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.trigger = $root.google.cloud.eventarc.v1.Trigger.decode(reader, reader.uint32()); - break; - } - case 3: { - message.triggerId = reader.string(); - break; - } - case 4: { - message.validateOnly = reader.bool(); + message.name = reader.string(); break; } default: @@ -3265,155 +13015,126 @@ }; /** - * Decodes a CreateTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a GetPipelineRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.CreateTriggerRequest} CreateTriggerRequest + * @returns {google.cloud.eventarc.v1.GetPipelineRequest} GetPipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + GetPipelineRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateTriggerRequest message. + * Verifies a GetPipelineRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateTriggerRequest.verify = function verify(message) { + GetPipelineRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.trigger != null && message.hasOwnProperty("trigger")) { - var error = $root.google.cloud.eventarc.v1.Trigger.verify(message.trigger); - if (error) - return "trigger." + error; - } - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - if (!$util.isString(message.triggerId)) - return "triggerId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetPipelineRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.CreateTriggerRequest} CreateTriggerRequest + * @returns {google.cloud.eventarc.v1.GetPipelineRequest} GetPipelineRequest */ - CreateTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.CreateTriggerRequest) + GetPipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GetPipelineRequest) return object; - var message = new $root.google.cloud.eventarc.v1.CreateTriggerRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.trigger != null) { - if (typeof object.trigger !== "object") - throw TypeError(".google.cloud.eventarc.v1.CreateTriggerRequest.trigger: object expected"); - message.trigger = $root.google.cloud.eventarc.v1.Trigger.fromObject(object.trigger); - } - if (object.triggerId != null) - message.triggerId = String(object.triggerId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.eventarc.v1.GetPipelineRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetPipelineRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @static - * @param {google.cloud.eventarc.v1.CreateTriggerRequest} message CreateTriggerRequest + * @param {google.cloud.eventarc.v1.GetPipelineRequest} message GetPipelineRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateTriggerRequest.toObject = function toObject(message, options) { + GetPipelineRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.trigger = null; - object.triggerId = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = $root.google.cloud.eventarc.v1.Trigger.toObject(message.trigger, options); - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - object.triggerId = message.triggerId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateTriggerRequest to JSON. + * Converts this GetPipelineRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @instance * @returns {Object.} JSON object */ - CreateTriggerRequest.prototype.toJSON = function toJSON() { + GetPipelineRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateTriggerRequest + * Gets the default type url for GetPipelineRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.CreateTriggerRequest + * @memberof google.cloud.eventarc.v1.GetPipelineRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetPipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.CreateTriggerRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.GetPipelineRequest"; }; - return CreateTriggerRequest; + return GetPipelineRequest; })(); - v1.UpdateTriggerRequest = (function() { + v1.ListPipelinesRequest = (function() { /** - * Properties of an UpdateTriggerRequest. + * Properties of a ListPipelinesRequest. * @memberof google.cloud.eventarc.v1 - * @interface IUpdateTriggerRequest - * @property {google.cloud.eventarc.v1.ITrigger|null} [trigger] UpdateTriggerRequest trigger - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTriggerRequest updateMask - * @property {boolean|null} [allowMissing] UpdateTriggerRequest allowMissing - * @property {boolean|null} [validateOnly] UpdateTriggerRequest validateOnly + * @interface IListPipelinesRequest + * @property {string|null} [parent] ListPipelinesRequest parent + * @property {number|null} [pageSize] ListPipelinesRequest pageSize + * @property {string|null} [pageToken] ListPipelinesRequest pageToken + * @property {string|null} [orderBy] ListPipelinesRequest orderBy + * @property {string|null} [filter] ListPipelinesRequest filter */ /** - * Constructs a new UpdateTriggerRequest. + * Constructs a new ListPipelinesRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents an UpdateTriggerRequest. - * @implements IUpdateTriggerRequest + * @classdesc Represents a ListPipelinesRequest. + * @implements IListPipelinesRequest * @constructor - * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IListPipelinesRequest=} [properties] Properties to set */ - function UpdateTriggerRequest(properties) { + function ListPipelinesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3421,117 +13142,131 @@ } /** - * UpdateTriggerRequest trigger. - * @member {google.cloud.eventarc.v1.ITrigger|null|undefined} trigger - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * ListPipelinesRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @instance */ - UpdateTriggerRequest.prototype.trigger = null; + ListPipelinesRequest.prototype.parent = ""; /** - * UpdateTriggerRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * ListPipelinesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @instance */ - UpdateTriggerRequest.prototype.updateMask = null; + ListPipelinesRequest.prototype.pageSize = 0; /** - * UpdateTriggerRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * ListPipelinesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @instance */ - UpdateTriggerRequest.prototype.allowMissing = false; + ListPipelinesRequest.prototype.pageToken = ""; /** - * UpdateTriggerRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * ListPipelinesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @instance */ - UpdateTriggerRequest.prototype.validateOnly = false; + ListPipelinesRequest.prototype.orderBy = ""; /** - * Creates a new UpdateTriggerRequest instance using the specified properties. + * ListPipelinesRequest filter. + * @member {string} filter + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest + * @instance + */ + ListPipelinesRequest.prototype.filter = ""; + + /** + * Creates a new ListPipelinesRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @static - * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.UpdateTriggerRequest} UpdateTriggerRequest instance + * @param {google.cloud.eventarc.v1.IListPipelinesRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListPipelinesRequest} ListPipelinesRequest instance */ - UpdateTriggerRequest.create = function create(properties) { - return new UpdateTriggerRequest(properties); + ListPipelinesRequest.create = function create(properties) { + return new ListPipelinesRequest(properties); }; /** - * Encodes the specified UpdateTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateTriggerRequest.verify|verify} messages. + * Encodes the specified ListPipelinesRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListPipelinesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @static - * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest} message UpdateTriggerRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IListPipelinesRequest} message ListPipelinesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTriggerRequest.encode = function encode(message, writer) { + ListPipelinesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - $root.google.cloud.eventarc.v1.Trigger.encode(message.trigger, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); return writer; }; /** - * Encodes the specified UpdateTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateTriggerRequest.verify|verify} messages. + * Encodes the specified ListPipelinesRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListPipelinesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @static - * @param {google.cloud.eventarc.v1.IUpdateTriggerRequest} message UpdateTriggerRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IListPipelinesRequest} message ListPipelinesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListPipelinesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateTriggerRequest message from the specified reader or buffer. + * Decodes a ListPipelinesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.UpdateTriggerRequest} UpdateTriggerRequest + * @returns {google.cloud.eventarc.v1.ListPipelinesRequest} ListPipelinesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTriggerRequest.decode = function decode(reader, length) { + ListPipelinesRequest.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.eventarc.v1.UpdateTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.ListPipelinesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.trigger = $root.google.cloud.eventarc.v1.Trigger.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.allowMissing = reader.bool(); + message.pageToken = reader.string(); break; } case 4: { - message.validateOnly = reader.bool(); + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); break; } default: @@ -3543,160 +13278,159 @@ }; /** - * Decodes an UpdateTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPipelinesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.UpdateTriggerRequest} UpdateTriggerRequest + * @returns {google.cloud.eventarc.v1.ListPipelinesRequest} ListPipelinesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + ListPipelinesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateTriggerRequest message. + * Verifies a ListPipelinesRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateTriggerRequest.verify = function verify(message) { + ListPipelinesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.trigger != null && message.hasOwnProperty("trigger")) { - var error = $root.google.cloud.eventarc.v1.Trigger.verify(message.trigger); - if (error) - return "trigger." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates an UpdateTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPipelinesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.UpdateTriggerRequest} UpdateTriggerRequest + * @returns {google.cloud.eventarc.v1.ListPipelinesRequest} ListPipelinesRequest */ - UpdateTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.UpdateTriggerRequest) + ListPipelinesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListPipelinesRequest) return object; - var message = new $root.google.cloud.eventarc.v1.UpdateTriggerRequest(); - if (object.trigger != null) { - if (typeof object.trigger !== "object") - throw TypeError(".google.cloud.eventarc.v1.UpdateTriggerRequest.trigger: object expected"); - message.trigger = $root.google.cloud.eventarc.v1.Trigger.fromObject(object.trigger); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.eventarc.v1.UpdateTriggerRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.eventarc.v1.ListPipelinesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from an UpdateTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListPipelinesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @static - * @param {google.cloud.eventarc.v1.UpdateTriggerRequest} message UpdateTriggerRequest + * @param {google.cloud.eventarc.v1.ListPipelinesRequest} message ListPipelinesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateTriggerRequest.toObject = function toObject(message, options) { + ListPipelinesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.trigger = null; - object.updateMask = null; - object.allowMissing = false; - object.validateOnly = false; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; } - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = $root.google.cloud.eventarc.v1.Trigger.toObject(message.trigger, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this UpdateTriggerRequest to JSON. + * Converts this ListPipelinesRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @instance * @returns {Object.} JSON object */ - UpdateTriggerRequest.prototype.toJSON = function toJSON() { + ListPipelinesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateTriggerRequest + * Gets the default type url for ListPipelinesRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.UpdateTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPipelinesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.UpdateTriggerRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListPipelinesRequest"; }; - return UpdateTriggerRequest; + return ListPipelinesRequest; })(); - v1.DeleteTriggerRequest = (function() { + v1.ListPipelinesResponse = (function() { /** - * Properties of a DeleteTriggerRequest. + * Properties of a ListPipelinesResponse. * @memberof google.cloud.eventarc.v1 - * @interface IDeleteTriggerRequest - * @property {string|null} [name] DeleteTriggerRequest name - * @property {string|null} [etag] DeleteTriggerRequest etag - * @property {boolean|null} [allowMissing] DeleteTriggerRequest allowMissing - * @property {boolean|null} [validateOnly] DeleteTriggerRequest validateOnly + * @interface IListPipelinesResponse + * @property {Array.|null} [pipelines] ListPipelinesResponse pipelines + * @property {string|null} [nextPageToken] ListPipelinesResponse nextPageToken + * @property {Array.|null} [unreachable] ListPipelinesResponse unreachable */ /** - * Constructs a new DeleteTriggerRequest. + * Constructs a new ListPipelinesResponse. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a DeleteTriggerRequest. - * @implements IDeleteTriggerRequest + * @classdesc Represents a ListPipelinesResponse. + * @implements IListPipelinesResponse * @constructor - * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IListPipelinesResponse=} [properties] Properties to set */ - function DeleteTriggerRequest(properties) { + function ListPipelinesResponse(properties) { + this.pipelines = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3704,117 +13438,109 @@ } /** - * DeleteTriggerRequest name. - * @member {string} name - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest - * @instance - */ - DeleteTriggerRequest.prototype.name = ""; - - /** - * DeleteTriggerRequest etag. - * @member {string} etag - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * ListPipelinesResponse pipelines. + * @member {Array.} pipelines + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @instance */ - DeleteTriggerRequest.prototype.etag = ""; + ListPipelinesResponse.prototype.pipelines = $util.emptyArray; /** - * DeleteTriggerRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * ListPipelinesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @instance */ - DeleteTriggerRequest.prototype.allowMissing = false; + ListPipelinesResponse.prototype.nextPageToken = ""; /** - * DeleteTriggerRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * ListPipelinesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @instance */ - DeleteTriggerRequest.prototype.validateOnly = false; + ListPipelinesResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new DeleteTriggerRequest instance using the specified properties. + * Creates a new ListPipelinesResponse instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @static - * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.DeleteTriggerRequest} DeleteTriggerRequest instance + * @param {google.cloud.eventarc.v1.IListPipelinesResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListPipelinesResponse} ListPipelinesResponse instance */ - DeleteTriggerRequest.create = function create(properties) { - return new DeleteTriggerRequest(properties); + ListPipelinesResponse.create = function create(properties) { + return new ListPipelinesResponse(properties); }; /** - * Encodes the specified DeleteTriggerRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteTriggerRequest.verify|verify} messages. + * Encodes the specified ListPipelinesResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListPipelinesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @static - * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest} message DeleteTriggerRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IListPipelinesResponse} message ListPipelinesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTriggerRequest.encode = function encode(message, writer) { + ListPipelinesResponse.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.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.pipelines != null && message.pipelines.length) + for (var i = 0; i < message.pipelines.length; ++i) + $root.google.cloud.eventarc.v1.Pipeline.encode(message.pipelines[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified DeleteTriggerRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteTriggerRequest.verify|verify} messages. + * Encodes the specified ListPipelinesResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListPipelinesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @static - * @param {google.cloud.eventarc.v1.IDeleteTriggerRequest} message DeleteTriggerRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IListPipelinesResponse} message ListPipelinesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListPipelinesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTriggerRequest message from the specified reader or buffer. + * Decodes a ListPipelinesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.DeleteTriggerRequest} DeleteTriggerRequest + * @returns {google.cloud.eventarc.v1.ListPipelinesResponse} ListPipelinesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTriggerRequest.decode = function decode(reader, length) { + ListPipelinesResponse.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.eventarc.v1.DeleteTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.ListPipelinesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.pipelines && message.pipelines.length)) + message.pipelines = []; + message.pipelines.push($root.google.cloud.eventarc.v1.Pipeline.decode(reader, reader.uint32())); break; } case 2: { - message.etag = reader.string(); + message.nextPageToken = reader.string(); break; } case 3: { - message.allowMissing = reader.bool(); - break; - } - case 4: { - message.validateOnly = reader.bool(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -3826,147 +13552,172 @@ }; /** - * Decodes a DeleteTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPipelinesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.DeleteTriggerRequest} DeleteTriggerRequest + * @returns {google.cloud.eventarc.v1.ListPipelinesResponse} ListPipelinesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + ListPipelinesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTriggerRequest message. + * Verifies a ListPipelinesResponse message. * @function verify - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTriggerRequest.verify = function verify(message) { + ListPipelinesResponse.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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.pipelines != null && message.hasOwnProperty("pipelines")) { + if (!Array.isArray(message.pipelines)) + return "pipelines: array expected"; + for (var i = 0; i < message.pipelines.length; ++i) { + var error = $root.google.cloud.eventarc.v1.Pipeline.verify(message.pipelines[i]); + if (error) + return "pipelines." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates a DeleteTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPipelinesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.DeleteTriggerRequest} DeleteTriggerRequest + * @returns {google.cloud.eventarc.v1.ListPipelinesResponse} ListPipelinesResponse */ - DeleteTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.DeleteTriggerRequest) + ListPipelinesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListPipelinesResponse) return object; - var message = new $root.google.cloud.eventarc.v1.DeleteTriggerRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.eventarc.v1.ListPipelinesResponse(); + if (object.pipelines) { + if (!Array.isArray(object.pipelines)) + throw TypeError(".google.cloud.eventarc.v1.ListPipelinesResponse.pipelines: array expected"); + message.pipelines = []; + for (var i = 0; i < object.pipelines.length; ++i) { + if (typeof object.pipelines[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.ListPipelinesResponse.pipelines: object expected"); + message.pipelines[i] = $root.google.cloud.eventarc.v1.Pipeline.fromObject(object.pipelines[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.eventarc.v1.ListPipelinesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; /** - * Creates a plain object from a DeleteTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListPipelinesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @static - * @param {google.cloud.eventarc.v1.DeleteTriggerRequest} message DeleteTriggerRequest + * @param {google.cloud.eventarc.v1.ListPipelinesResponse} message ListPipelinesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTriggerRequest.toObject = function toObject(message, options) { + ListPipelinesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.etag = ""; - object.allowMissing = false; - object.validateOnly = false; + if (options.arrays || options.defaults) { + object.pipelines = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.pipelines && message.pipelines.length) { + object.pipelines = []; + for (var j = 0; j < message.pipelines.length; ++j) + object.pipelines[j] = $root.google.cloud.eventarc.v1.Pipeline.toObject(message.pipelines[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; return object; }; /** - * Converts this DeleteTriggerRequest to JSON. + * Converts this ListPipelinesResponse to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @instance * @returns {Object.} JSON object */ - DeleteTriggerRequest.prototype.toJSON = function toJSON() { + ListPipelinesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteTriggerRequest + * Gets the default type url for ListPipelinesResponse * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.DeleteTriggerRequest + * @memberof google.cloud.eventarc.v1.ListPipelinesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPipelinesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.DeleteTriggerRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListPipelinesResponse"; }; - return DeleteTriggerRequest; + return ListPipelinesResponse; })(); - v1.GetChannelRequest = (function() { + v1.CreatePipelineRequest = (function() { /** - * Properties of a GetChannelRequest. + * Properties of a CreatePipelineRequest. * @memberof google.cloud.eventarc.v1 - * @interface IGetChannelRequest - * @property {string|null} [name] GetChannelRequest name + * @interface ICreatePipelineRequest + * @property {string|null} [parent] CreatePipelineRequest parent + * @property {google.cloud.eventarc.v1.IPipeline|null} [pipeline] CreatePipelineRequest pipeline + * @property {string|null} [pipelineId] CreatePipelineRequest pipelineId + * @property {boolean|null} [validateOnly] CreatePipelineRequest validateOnly */ /** - * Constructs a new GetChannelRequest. + * Constructs a new CreatePipelineRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a GetChannelRequest. - * @implements IGetChannelRequest + * @classdesc Represents a CreatePipelineRequest. + * @implements ICreatePipelineRequest * @constructor - * @param {google.cloud.eventarc.v1.IGetChannelRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.ICreatePipelineRequest=} [properties] Properties to set */ - function GetChannelRequest(properties) { + function CreatePipelineRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3974,75 +13725,117 @@ } /** - * GetChannelRequest name. - * @member {string} name - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * CreatePipelineRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @instance */ - GetChannelRequest.prototype.name = ""; + CreatePipelineRequest.prototype.parent = ""; /** - * Creates a new GetChannelRequest instance using the specified properties. + * CreatePipelineRequest pipeline. + * @member {google.cloud.eventarc.v1.IPipeline|null|undefined} pipeline + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest + * @instance + */ + CreatePipelineRequest.prototype.pipeline = null; + + /** + * CreatePipelineRequest pipelineId. + * @member {string} pipelineId + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest + * @instance + */ + CreatePipelineRequest.prototype.pipelineId = ""; + + /** + * CreatePipelineRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest + * @instance + */ + CreatePipelineRequest.prototype.validateOnly = false; + + /** + * Creates a new CreatePipelineRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @static - * @param {google.cloud.eventarc.v1.IGetChannelRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.GetChannelRequest} GetChannelRequest instance + * @param {google.cloud.eventarc.v1.ICreatePipelineRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.CreatePipelineRequest} CreatePipelineRequest instance */ - GetChannelRequest.create = function create(properties) { - return new GetChannelRequest(properties); + CreatePipelineRequest.create = function create(properties) { + return new CreatePipelineRequest(properties); }; /** - * Encodes the specified GetChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelRequest.verify|verify} messages. + * Encodes the specified CreatePipelineRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreatePipelineRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @static - * @param {google.cloud.eventarc.v1.IGetChannelRequest} message GetChannelRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.ICreatePipelineRequest} message CreatePipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetChannelRequest.encode = function encode(message, writer) { + CreatePipelineRequest.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pipeline != null && Object.hasOwnProperty.call(message, "pipeline")) + $root.google.cloud.eventarc.v1.Pipeline.encode(message.pipeline, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pipelineId != null && Object.hasOwnProperty.call(message, "pipelineId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pipelineId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified GetChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelRequest.verify|verify} messages. + * Encodes the specified CreatePipelineRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreatePipelineRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @static - * @param {google.cloud.eventarc.v1.IGetChannelRequest} message GetChannelRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.ICreatePipelineRequest} message CreatePipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreatePipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetChannelRequest message from the specified reader or buffer. + * Decodes a CreatePipelineRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.GetChannelRequest} GetChannelRequest + * @returns {google.cloud.eventarc.v1.CreatePipelineRequest} CreatePipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetChannelRequest.decode = function decode(reader, length) { + CreatePipelineRequest.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.eventarc.v1.GetChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.CreatePipelineRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pipeline = $root.google.cloud.eventarc.v1.Pipeline.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pipelineId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -4054,125 +13847,155 @@ }; /** - * Decodes a GetChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a CreatePipelineRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.GetChannelRequest} GetChannelRequest + * @returns {google.cloud.eventarc.v1.CreatePipelineRequest} CreatePipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetChannelRequest.decodeDelimited = function decodeDelimited(reader) { + CreatePipelineRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetChannelRequest message. + * Verifies a CreatePipelineRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetChannelRequest.verify = function verify(message) { + CreatePipelineRequest.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.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pipeline != null && message.hasOwnProperty("pipeline")) { + var error = $root.google.cloud.eventarc.v1.Pipeline.verify(message.pipeline); + if (error) + return "pipeline." + error; + } + if (message.pipelineId != null && message.hasOwnProperty("pipelineId")) + if (!$util.isString(message.pipelineId)) + return "pipelineId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a GetChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreatePipelineRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.GetChannelRequest} GetChannelRequest + * @returns {google.cloud.eventarc.v1.CreatePipelineRequest} CreatePipelineRequest */ - GetChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.GetChannelRequest) + CreatePipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.CreatePipelineRequest) return object; - var message = new $root.google.cloud.eventarc.v1.GetChannelRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.eventarc.v1.CreatePipelineRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pipeline != null) { + if (typeof object.pipeline !== "object") + throw TypeError(".google.cloud.eventarc.v1.CreatePipelineRequest.pipeline: object expected"); + message.pipeline = $root.google.cloud.eventarc.v1.Pipeline.fromObject(object.pipeline); + } + if (object.pipelineId != null) + message.pipelineId = String(object.pipelineId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a GetChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreatePipelineRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @static - * @param {google.cloud.eventarc.v1.GetChannelRequest} message GetChannelRequest + * @param {google.cloud.eventarc.v1.CreatePipelineRequest} message CreatePipelineRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetChannelRequest.toObject = function toObject(message, options) { + CreatePipelineRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.pipeline = null; + object.pipelineId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pipeline != null && message.hasOwnProperty("pipeline")) + object.pipeline = $root.google.cloud.eventarc.v1.Pipeline.toObject(message.pipeline, options); + if (message.pipelineId != null && message.hasOwnProperty("pipelineId")) + object.pipelineId = message.pipelineId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this GetChannelRequest to JSON. + * Converts this CreatePipelineRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @instance * @returns {Object.} JSON object */ - GetChannelRequest.prototype.toJSON = function toJSON() { + CreatePipelineRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetChannelRequest + * Gets the default type url for CreatePipelineRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.GetChannelRequest + * @memberof google.cloud.eventarc.v1.CreatePipelineRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreatePipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.GetChannelRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.CreatePipelineRequest"; }; - return GetChannelRequest; + return CreatePipelineRequest; })(); - v1.ListChannelsRequest = (function() { + v1.UpdatePipelineRequest = (function() { /** - * Properties of a ListChannelsRequest. + * Properties of an UpdatePipelineRequest. * @memberof google.cloud.eventarc.v1 - * @interface IListChannelsRequest - * @property {string|null} [parent] ListChannelsRequest parent - * @property {number|null} [pageSize] ListChannelsRequest pageSize - * @property {string|null} [pageToken] ListChannelsRequest pageToken - * @property {string|null} [orderBy] ListChannelsRequest orderBy + * @interface IUpdatePipelineRequest + * @property {google.cloud.eventarc.v1.IPipeline|null} [pipeline] UpdatePipelineRequest pipeline + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePipelineRequest updateMask + * @property {boolean|null} [allowMissing] UpdatePipelineRequest allowMissing + * @property {boolean|null} [validateOnly] UpdatePipelineRequest validateOnly */ /** - * Constructs a new ListChannelsRequest. + * Constructs a new UpdatePipelineRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a ListChannelsRequest. - * @implements IListChannelsRequest + * @classdesc Represents an UpdatePipelineRequest. + * @implements IUpdatePipelineRequest * @constructor - * @param {google.cloud.eventarc.v1.IListChannelsRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IUpdatePipelineRequest=} [properties] Properties to set */ - function ListChannelsRequest(properties) { + function UpdatePipelineRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4180,117 +14003,117 @@ } /** - * ListChannelsRequest parent. - * @member {string} parent - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * UpdatePipelineRequest pipeline. + * @member {google.cloud.eventarc.v1.IPipeline|null|undefined} pipeline + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @instance */ - ListChannelsRequest.prototype.parent = ""; + UpdatePipelineRequest.prototype.pipeline = null; /** - * ListChannelsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * UpdatePipelineRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @instance */ - ListChannelsRequest.prototype.pageSize = 0; + UpdatePipelineRequest.prototype.updateMask = null; /** - * ListChannelsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * UpdatePipelineRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @instance */ - ListChannelsRequest.prototype.pageToken = ""; + UpdatePipelineRequest.prototype.allowMissing = false; /** - * ListChannelsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * UpdatePipelineRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @instance */ - ListChannelsRequest.prototype.orderBy = ""; + UpdatePipelineRequest.prototype.validateOnly = false; /** - * Creates a new ListChannelsRequest instance using the specified properties. + * Creates a new UpdatePipelineRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @static - * @param {google.cloud.eventarc.v1.IListChannelsRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.ListChannelsRequest} ListChannelsRequest instance + * @param {google.cloud.eventarc.v1.IUpdatePipelineRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.UpdatePipelineRequest} UpdatePipelineRequest instance */ - ListChannelsRequest.create = function create(properties) { - return new ListChannelsRequest(properties); + UpdatePipelineRequest.create = function create(properties) { + return new UpdatePipelineRequest(properties); }; /** - * Encodes the specified ListChannelsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsRequest.verify|verify} messages. + * Encodes the specified UpdatePipelineRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdatePipelineRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @static - * @param {google.cloud.eventarc.v1.IListChannelsRequest} message ListChannelsRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IUpdatePipelineRequest} message UpdatePipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelsRequest.encode = function encode(message, writer) { + UpdatePipelineRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.pipeline != null && Object.hasOwnProperty.call(message, "pipeline")) + $root.google.cloud.eventarc.v1.Pipeline.encode(message.pipeline, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListChannelsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsRequest.verify|verify} messages. + * Encodes the specified UpdatePipelineRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdatePipelineRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @static - * @param {google.cloud.eventarc.v1.IListChannelsRequest} message ListChannelsRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IUpdatePipelineRequest} message UpdatePipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdatePipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListChannelsRequest message from the specified reader or buffer. + * Decodes an UpdatePipelineRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.ListChannelsRequest} ListChannelsRequest + * @returns {google.cloud.eventarc.v1.UpdatePipelineRequest} UpdatePipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelsRequest.decode = function decode(reader, length) { + UpdatePipelineRequest.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.eventarc.v1.ListChannelsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.UpdatePipelineRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.pipeline = $root.google.cloud.eventarc.v1.Pipeline.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); + message.allowMissing = reader.bool(); break; } case 4: { - message.orderBy = reader.string(); + message.validateOnly = reader.bool(); break; } default: @@ -4302,151 +14125,160 @@ }; /** - * Decodes a ListChannelsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdatePipelineRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.ListChannelsRequest} ListChannelsRequest + * @returns {google.cloud.eventarc.v1.UpdatePipelineRequest} UpdatePipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelsRequest.decodeDelimited = function decodeDelimited(reader) { + UpdatePipelineRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListChannelsRequest message. + * Verifies an UpdatePipelineRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListChannelsRequest.verify = function verify(message) { + UpdatePipelineRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.pipeline != null && message.hasOwnProperty("pipeline")) { + var error = $root.google.cloud.eventarc.v1.Pipeline.verify(message.pipeline); + if (error) + return "pipeline." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListChannelsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdatePipelineRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.ListChannelsRequest} ListChannelsRequest + * @returns {google.cloud.eventarc.v1.UpdatePipelineRequest} UpdatePipelineRequest */ - ListChannelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.ListChannelsRequest) + UpdatePipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.UpdatePipelineRequest) return object; - var message = new $root.google.cloud.eventarc.v1.ListChannelsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.eventarc.v1.UpdatePipelineRequest(); + if (object.pipeline != null) { + if (typeof object.pipeline !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdatePipelineRequest.pipeline: object expected"); + message.pipeline = $root.google.cloud.eventarc.v1.Pipeline.fromObject(object.pipeline); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdatePipelineRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListChannelsRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdatePipelineRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @static - * @param {google.cloud.eventarc.v1.ListChannelsRequest} message ListChannelsRequest + * @param {google.cloud.eventarc.v1.UpdatePipelineRequest} message UpdatePipelineRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListChannelsRequest.toObject = function toObject(message, options) { + UpdatePipelineRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + object.pipeline = null; + object.updateMask = null; + object.allowMissing = false; + object.validateOnly = false; + } + if (message.pipeline != null && message.hasOwnProperty("pipeline")) + object.pipeline = $root.google.cloud.eventarc.v1.Pipeline.toObject(message.pipeline, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListChannelsRequest to JSON. + * Converts this UpdatePipelineRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @instance * @returns {Object.} JSON object */ - ListChannelsRequest.prototype.toJSON = function toJSON() { + UpdatePipelineRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListChannelsRequest + * Gets the default type url for UpdatePipelineRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.ListChannelsRequest + * @memberof google.cloud.eventarc.v1.UpdatePipelineRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListChannelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdatePipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.ListChannelsRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.UpdatePipelineRequest"; }; - return ListChannelsRequest; + return UpdatePipelineRequest; })(); - v1.ListChannelsResponse = (function() { + v1.DeletePipelineRequest = (function() { /** - * Properties of a ListChannelsResponse. + * Properties of a DeletePipelineRequest. * @memberof google.cloud.eventarc.v1 - * @interface IListChannelsResponse - * @property {Array.|null} [channels] ListChannelsResponse channels - * @property {string|null} [nextPageToken] ListChannelsResponse nextPageToken - * @property {Array.|null} [unreachable] ListChannelsResponse unreachable + * @interface IDeletePipelineRequest + * @property {string|null} [name] DeletePipelineRequest name + * @property {string|null} [etag] DeletePipelineRequest etag + * @property {boolean|null} [allowMissing] DeletePipelineRequest allowMissing + * @property {boolean|null} [validateOnly] DeletePipelineRequest validateOnly */ /** - * Constructs a new ListChannelsResponse. + * Constructs a new DeletePipelineRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a ListChannelsResponse. - * @implements IListChannelsResponse + * @classdesc Represents a DeletePipelineRequest. + * @implements IDeletePipelineRequest * @constructor - * @param {google.cloud.eventarc.v1.IListChannelsResponse=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IDeletePipelineRequest=} [properties] Properties to set */ - function ListChannelsResponse(properties) { - this.channels = []; - this.unreachable = []; + function DeletePipelineRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4454,109 +14286,117 @@ } /** - * ListChannelsResponse channels. - * @member {Array.} channels - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * DeletePipelineRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @instance */ - ListChannelsResponse.prototype.channels = $util.emptyArray; + DeletePipelineRequest.prototype.name = ""; /** - * ListChannelsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * DeletePipelineRequest etag. + * @member {string} etag + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @instance */ - ListChannelsResponse.prototype.nextPageToken = ""; + DeletePipelineRequest.prototype.etag = ""; /** - * ListChannelsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * DeletePipelineRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @instance */ - ListChannelsResponse.prototype.unreachable = $util.emptyArray; + DeletePipelineRequest.prototype.allowMissing = false; /** - * Creates a new ListChannelsResponse instance using the specified properties. + * DeletePipelineRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest + * @instance + */ + DeletePipelineRequest.prototype.validateOnly = false; + + /** + * Creates a new DeletePipelineRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @static - * @param {google.cloud.eventarc.v1.IListChannelsResponse=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.ListChannelsResponse} ListChannelsResponse instance + * @param {google.cloud.eventarc.v1.IDeletePipelineRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.DeletePipelineRequest} DeletePipelineRequest instance */ - ListChannelsResponse.create = function create(properties) { - return new ListChannelsResponse(properties); + DeletePipelineRequest.create = function create(properties) { + return new DeletePipelineRequest(properties); }; /** - * Encodes the specified ListChannelsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsResponse.verify|verify} messages. + * Encodes the specified DeletePipelineRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeletePipelineRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @static - * @param {google.cloud.eventarc.v1.IListChannelsResponse} message ListChannelsResponse message or plain object to encode + * @param {google.cloud.eventarc.v1.IDeletePipelineRequest} message DeletePipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelsResponse.encode = function encode(message, writer) { + DeletePipelineRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.channels != null && message.channels.length) - for (var i = 0; i < message.channels.length; ++i) - $root.google.cloud.eventarc.v1.Channel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListChannelsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelsResponse.verify|verify} messages. + * Encodes the specified DeletePipelineRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeletePipelineRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @static - * @param {google.cloud.eventarc.v1.IListChannelsResponse} message ListChannelsResponse message or plain object to encode + * @param {google.cloud.eventarc.v1.IDeletePipelineRequest} message DeletePipelineRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeletePipelineRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListChannelsResponse message from the specified reader or buffer. + * Decodes a DeletePipelineRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.ListChannelsResponse} ListChannelsResponse + * @returns {google.cloud.eventarc.v1.DeletePipelineRequest} DeletePipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelsResponse.decode = function decode(reader, length) { + DeletePipelineRequest.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.eventarc.v1.ListChannelsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.DeletePipelineRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.google.cloud.eventarc.v1.Channel.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.etag = reader.string(); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -4568,290 +14408,223 @@ }; /** - * Decodes a ListChannelsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeletePipelineRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.ListChannelsResponse} ListChannelsResponse + * @returns {google.cloud.eventarc.v1.DeletePipelineRequest} DeletePipelineRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelsResponse.decodeDelimited = function decodeDelimited(reader) { + DeletePipelineRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListChannelsResponse message. + * Verifies a DeletePipelineRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListChannelsResponse.verify = function verify(message) { + DeletePipelineRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (var i = 0; i < message.channels.length; ++i) { - var error = $root.google.cloud.eventarc.v1.Channel.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListChannelsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePipelineRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.ListChannelsResponse} ListChannelsResponse + * @returns {google.cloud.eventarc.v1.DeletePipelineRequest} DeletePipelineRequest */ - ListChannelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.ListChannelsResponse) + DeletePipelineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.DeletePipelineRequest) return object; - var message = new $root.google.cloud.eventarc.v1.ListChannelsResponse(); - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".google.cloud.eventarc.v1.ListChannelsResponse.channels: array expected"); - message.channels = []; - for (var i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".google.cloud.eventarc.v1.ListChannelsResponse.channels: object expected"); - message.channels[i] = $root.google.cloud.eventarc.v1.Channel.fromObject(object.channels[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.eventarc.v1.ListChannelsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.eventarc.v1.DeletePipelineRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListChannelsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeletePipelineRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @static - * @param {google.cloud.eventarc.v1.ListChannelsResponse} message ListChannelsResponse + * @param {google.cloud.eventarc.v1.DeletePipelineRequest} message DeletePipelineRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListChannelsResponse.toObject = function toObject(message, options) { + DeletePipelineRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.channels = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.channels && message.channels.length) { - object.channels = []; - for (var j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.google.cloud.eventarc.v1.Channel.toObject(message.channels[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.allowMissing = false; + object.validateOnly = false; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListChannelsResponse to JSON. + * Converts this DeletePipelineRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @instance * @returns {Object.} JSON object */ - ListChannelsResponse.prototype.toJSON = function toJSON() { + DeletePipelineRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListChannelsResponse + * Gets the default type url for DeletePipelineRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.ListChannelsResponse + * @memberof google.cloud.eventarc.v1.DeletePipelineRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListChannelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeletePipelineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.ListChannelsResponse"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.DeletePipelineRequest"; }; - return ListChannelsResponse; + return DeletePipelineRequest; })(); - v1.CreateChannelRequest = (function() { - - /** - * Properties of a CreateChannelRequest. - * @memberof google.cloud.eventarc.v1 - * @interface ICreateChannelRequest - * @property {string|null} [parent] CreateChannelRequest parent - * @property {google.cloud.eventarc.v1.IChannel|null} [channel] CreateChannelRequest channel - * @property {string|null} [channelId] CreateChannelRequest channelId - * @property {boolean|null} [validateOnly] CreateChannelRequest validateOnly - */ + v1.GetGoogleApiSourceRequest = (function() { /** - * Constructs a new CreateChannelRequest. + * Properties of a GetGoogleApiSourceRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a CreateChannelRequest. - * @implements ICreateChannelRequest - * @constructor - * @param {google.cloud.eventarc.v1.ICreateChannelRequest=} [properties] Properties to set - */ - function CreateChannelRequest(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]]; - } - - /** - * CreateChannelRequest parent. - * @member {string} parent - * @memberof google.cloud.eventarc.v1.CreateChannelRequest - * @instance - */ - CreateChannelRequest.prototype.parent = ""; - - /** - * CreateChannelRequest channel. - * @member {google.cloud.eventarc.v1.IChannel|null|undefined} channel - * @memberof google.cloud.eventarc.v1.CreateChannelRequest - * @instance + * @interface IGetGoogleApiSourceRequest + * @property {string|null} [name] GetGoogleApiSourceRequest name */ - CreateChannelRequest.prototype.channel = null; - - /** - * CreateChannelRequest channelId. - * @member {string} channelId - * @memberof google.cloud.eventarc.v1.CreateChannelRequest - * @instance + + /** + * Constructs a new GetGoogleApiSourceRequest. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a GetGoogleApiSourceRequest. + * @implements IGetGoogleApiSourceRequest + * @constructor + * @param {google.cloud.eventarc.v1.IGetGoogleApiSourceRequest=} [properties] Properties to set */ - CreateChannelRequest.prototype.channelId = ""; + function GetGoogleApiSourceRequest(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]]; + } /** - * CreateChannelRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * GetGoogleApiSourceRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @instance */ - CreateChannelRequest.prototype.validateOnly = false; + GetGoogleApiSourceRequest.prototype.name = ""; /** - * Creates a new CreateChannelRequest instance using the specified properties. + * Creates a new GetGoogleApiSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.ICreateChannelRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.CreateChannelRequest} CreateChannelRequest instance + * @param {google.cloud.eventarc.v1.IGetGoogleApiSourceRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GetGoogleApiSourceRequest} GetGoogleApiSourceRequest instance */ - CreateChannelRequest.create = function create(properties) { - return new CreateChannelRequest(properties); + GetGoogleApiSourceRequest.create = function create(properties) { + return new GetGoogleApiSourceRequest(properties); }; /** - * Encodes the specified CreateChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelRequest.verify|verify} messages. + * Encodes the specified GetGoogleApiSourceRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleApiSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.ICreateChannelRequest} message CreateChannelRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IGetGoogleApiSourceRequest} message GetGoogleApiSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateChannelRequest.encode = function encode(message, writer) { + GetGoogleApiSourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.google.cloud.eventarc.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.channelId); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelRequest.verify|verify} messages. + * Encodes the specified GetGoogleApiSourceRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleApiSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.ICreateChannelRequest} message CreateChannelRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IGetGoogleApiSourceRequest} message GetGoogleApiSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetGoogleApiSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateChannelRequest message from the specified reader or buffer. + * Decodes a GetGoogleApiSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.CreateChannelRequest} CreateChannelRequest + * @returns {google.cloud.eventarc.v1.GetGoogleApiSourceRequest} GetGoogleApiSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateChannelRequest.decode = function decode(reader, length) { + GetGoogleApiSourceRequest.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.eventarc.v1.CreateChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.GetGoogleApiSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.channel = $root.google.cloud.eventarc.v1.Channel.decode(reader, reader.uint32()); - break; - } - case 3: { - message.channelId = reader.string(); - break; - } - case 4: { - message.validateOnly = reader.bool(); + message.name = reader.string(); break; } default: @@ -4863,154 +14636,126 @@ }; /** - * Decodes a CreateChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a GetGoogleApiSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.CreateChannelRequest} CreateChannelRequest + * @returns {google.cloud.eventarc.v1.GetGoogleApiSourceRequest} GetGoogleApiSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateChannelRequest.decodeDelimited = function decodeDelimited(reader) { + GetGoogleApiSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateChannelRequest message. + * Verifies a GetGoogleApiSourceRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateChannelRequest.verify = function verify(message) { + GetGoogleApiSourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - var error = $root.google.cloud.eventarc.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - if (message.channelId != null && message.hasOwnProperty("channelId")) - if (!$util.isString(message.channelId)) - return "channelId: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetGoogleApiSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.CreateChannelRequest} CreateChannelRequest + * @returns {google.cloud.eventarc.v1.GetGoogleApiSourceRequest} GetGoogleApiSourceRequest */ - CreateChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.CreateChannelRequest) + GetGoogleApiSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GetGoogleApiSourceRequest) return object; - var message = new $root.google.cloud.eventarc.v1.CreateChannelRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".google.cloud.eventarc.v1.CreateChannelRequest.channel: object expected"); - message.channel = $root.google.cloud.eventarc.v1.Channel.fromObject(object.channel); - } - if (object.channelId != null) - message.channelId = String(object.channelId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.eventarc.v1.GetGoogleApiSourceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetGoogleApiSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.CreateChannelRequest} message CreateChannelRequest + * @param {google.cloud.eventarc.v1.GetGoogleApiSourceRequest} message GetGoogleApiSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateChannelRequest.toObject = function toObject(message, options) { + GetGoogleApiSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.channel = null; - object.channelId = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.google.cloud.eventarc.v1.Channel.toObject(message.channel, options); - if (message.channelId != null && message.hasOwnProperty("channelId")) - object.channelId = message.channelId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateChannelRequest to JSON. + * Converts this GetGoogleApiSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @instance * @returns {Object.} JSON object */ - CreateChannelRequest.prototype.toJSON = function toJSON() { + GetGoogleApiSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateChannelRequest + * Gets the default type url for GetGoogleApiSourceRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.CreateChannelRequest + * @memberof google.cloud.eventarc.v1.GetGoogleApiSourceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetGoogleApiSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.CreateChannelRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.GetGoogleApiSourceRequest"; }; - return CreateChannelRequest; + return GetGoogleApiSourceRequest; })(); - v1.UpdateChannelRequest = (function() { + v1.ListGoogleApiSourcesRequest = (function() { /** - * Properties of an UpdateChannelRequest. + * Properties of a ListGoogleApiSourcesRequest. * @memberof google.cloud.eventarc.v1 - * @interface IUpdateChannelRequest - * @property {google.cloud.eventarc.v1.IChannel|null} [channel] UpdateChannelRequest channel - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateChannelRequest updateMask - * @property {boolean|null} [validateOnly] UpdateChannelRequest validateOnly + * @interface IListGoogleApiSourcesRequest + * @property {string|null} [parent] ListGoogleApiSourcesRequest parent + * @property {number|null} [pageSize] ListGoogleApiSourcesRequest pageSize + * @property {string|null} [pageToken] ListGoogleApiSourcesRequest pageToken + * @property {string|null} [orderBy] ListGoogleApiSourcesRequest orderBy + * @property {string|null} [filter] ListGoogleApiSourcesRequest filter */ /** - * Constructs a new UpdateChannelRequest. + * Constructs a new ListGoogleApiSourcesRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents an UpdateChannelRequest. - * @implements IUpdateChannelRequest + * @classdesc Represents a ListGoogleApiSourcesRequest. + * @implements IListGoogleApiSourcesRequest * @constructor - * @param {google.cloud.eventarc.v1.IUpdateChannelRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IListGoogleApiSourcesRequest=} [properties] Properties to set */ - function UpdateChannelRequest(properties) { + function ListGoogleApiSourcesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5018,103 +14763,131 @@ } /** - * UpdateChannelRequest channel. - * @member {google.cloud.eventarc.v1.IChannel|null|undefined} channel - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * ListGoogleApiSourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @instance */ - UpdateChannelRequest.prototype.channel = null; + ListGoogleApiSourcesRequest.prototype.parent = ""; /** - * UpdateChannelRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * ListGoogleApiSourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @instance */ - UpdateChannelRequest.prototype.updateMask = null; + ListGoogleApiSourcesRequest.prototype.pageSize = 0; /** - * UpdateChannelRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * ListGoogleApiSourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @instance */ - UpdateChannelRequest.prototype.validateOnly = false; + ListGoogleApiSourcesRequest.prototype.pageToken = ""; /** - * Creates a new UpdateChannelRequest instance using the specified properties. + * ListGoogleApiSourcesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest + * @instance + */ + ListGoogleApiSourcesRequest.prototype.orderBy = ""; + + /** + * ListGoogleApiSourcesRequest filter. + * @member {string} filter + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest + * @instance + */ + ListGoogleApiSourcesRequest.prototype.filter = ""; + + /** + * Creates a new ListGoogleApiSourcesRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @static - * @param {google.cloud.eventarc.v1.IUpdateChannelRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.UpdateChannelRequest} UpdateChannelRequest instance + * @param {google.cloud.eventarc.v1.IListGoogleApiSourcesRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListGoogleApiSourcesRequest} ListGoogleApiSourcesRequest instance */ - UpdateChannelRequest.create = function create(properties) { - return new UpdateChannelRequest(properties); + ListGoogleApiSourcesRequest.create = function create(properties) { + return new ListGoogleApiSourcesRequest(properties); }; /** - * Encodes the specified UpdateChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateChannelRequest.verify|verify} messages. + * Encodes the specified ListGoogleApiSourcesRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListGoogleApiSourcesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @static - * @param {google.cloud.eventarc.v1.IUpdateChannelRequest} message UpdateChannelRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IListGoogleApiSourcesRequest} message ListGoogleApiSourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateChannelRequest.encode = function encode(message, writer) { + ListGoogleApiSourcesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.google.cloud.eventarc.v1.Channel.encode(message.channel, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); return writer; }; /** - * Encodes the specified UpdateChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateChannelRequest.verify|verify} messages. + * Encodes the specified ListGoogleApiSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListGoogleApiSourcesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @static - * @param {google.cloud.eventarc.v1.IUpdateChannelRequest} message UpdateChannelRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IListGoogleApiSourcesRequest} message ListGoogleApiSourcesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListGoogleApiSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateChannelRequest message from the specified reader or buffer. + * Decodes a ListGoogleApiSourcesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.UpdateChannelRequest} UpdateChannelRequest + * @returns {google.cloud.eventarc.v1.ListGoogleApiSourcesRequest} ListGoogleApiSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateChannelRequest.decode = function decode(reader, length) { + ListGoogleApiSourcesRequest.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.eventarc.v1.UpdateChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.channel = $root.google.cloud.eventarc.v1.Channel.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.validateOnly = reader.bool(); + message.pageToken = reader.string(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); break; } default: @@ -5126,150 +14899,159 @@ }; /** - * Decodes an UpdateChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGoogleApiSourcesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.UpdateChannelRequest} UpdateChannelRequest + * @returns {google.cloud.eventarc.v1.ListGoogleApiSourcesRequest} ListGoogleApiSourcesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateChannelRequest.decodeDelimited = function decodeDelimited(reader) { + ListGoogleApiSourcesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateChannelRequest message. + * Verifies a ListGoogleApiSourcesRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateChannelRequest.verify = function verify(message) { + ListGoogleApiSourcesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - var error = $root.google.cloud.eventarc.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates an UpdateChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGoogleApiSourcesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.UpdateChannelRequest} UpdateChannelRequest + * @returns {google.cloud.eventarc.v1.ListGoogleApiSourcesRequest} ListGoogleApiSourcesRequest */ - UpdateChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.UpdateChannelRequest) + ListGoogleApiSourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest) return object; - var message = new $root.google.cloud.eventarc.v1.UpdateChannelRequest(); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".google.cloud.eventarc.v1.UpdateChannelRequest.channel: object expected"); - message.channel = $root.google.cloud.eventarc.v1.Channel.fromObject(object.channel); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.eventarc.v1.UpdateChannelRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from an UpdateChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListGoogleApiSourcesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @static - * @param {google.cloud.eventarc.v1.UpdateChannelRequest} message UpdateChannelRequest + * @param {google.cloud.eventarc.v1.ListGoogleApiSourcesRequest} message ListGoogleApiSourcesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateChannelRequest.toObject = function toObject(message, options) { + ListGoogleApiSourcesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.channel = null; - object.updateMask = null; - object.validateOnly = false; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; + object.filter = ""; } - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.google.cloud.eventarc.v1.Channel.toObject(message.channel, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this UpdateChannelRequest to JSON. + * Converts this ListGoogleApiSourcesRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @instance * @returns {Object.} JSON object */ - UpdateChannelRequest.prototype.toJSON = function toJSON() { + ListGoogleApiSourcesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateChannelRequest + * Gets the default type url for ListGoogleApiSourcesRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.UpdateChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListGoogleApiSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.UpdateChannelRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListGoogleApiSourcesRequest"; }; - return UpdateChannelRequest; + return ListGoogleApiSourcesRequest; })(); - v1.DeleteChannelRequest = (function() { + v1.ListGoogleApiSourcesResponse = (function() { /** - * Properties of a DeleteChannelRequest. + * Properties of a ListGoogleApiSourcesResponse. * @memberof google.cloud.eventarc.v1 - * @interface IDeleteChannelRequest - * @property {string|null} [name] DeleteChannelRequest name - * @property {boolean|null} [validateOnly] DeleteChannelRequest validateOnly + * @interface IListGoogleApiSourcesResponse + * @property {Array.|null} [googleApiSources] ListGoogleApiSourcesResponse googleApiSources + * @property {string|null} [nextPageToken] ListGoogleApiSourcesResponse nextPageToken + * @property {Array.|null} [unreachable] ListGoogleApiSourcesResponse unreachable */ /** - * Constructs a new DeleteChannelRequest. + * Constructs a new ListGoogleApiSourcesResponse. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a DeleteChannelRequest. - * @implements IDeleteChannelRequest + * @classdesc Represents a ListGoogleApiSourcesResponse. + * @implements IListGoogleApiSourcesResponse * @constructor - * @param {google.cloud.eventarc.v1.IDeleteChannelRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IListGoogleApiSourcesResponse=} [properties] Properties to set */ - function DeleteChannelRequest(properties) { + function ListGoogleApiSourcesResponse(properties) { + this.googleApiSources = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5277,89 +15059,109 @@ } /** - * DeleteChannelRequest name. - * @member {string} name - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * ListGoogleApiSourcesResponse googleApiSources. + * @member {Array.} googleApiSources + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @instance */ - DeleteChannelRequest.prototype.name = ""; + ListGoogleApiSourcesResponse.prototype.googleApiSources = $util.emptyArray; /** - * DeleteChannelRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * ListGoogleApiSourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @instance */ - DeleteChannelRequest.prototype.validateOnly = false; + ListGoogleApiSourcesResponse.prototype.nextPageToken = ""; /** - * Creates a new DeleteChannelRequest instance using the specified properties. + * ListGoogleApiSourcesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse + * @instance + */ + ListGoogleApiSourcesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListGoogleApiSourcesResponse instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @static - * @param {google.cloud.eventarc.v1.IDeleteChannelRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.DeleteChannelRequest} DeleteChannelRequest instance + * @param {google.cloud.eventarc.v1.IListGoogleApiSourcesResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.ListGoogleApiSourcesResponse} ListGoogleApiSourcesResponse instance */ - DeleteChannelRequest.create = function create(properties) { - return new DeleteChannelRequest(properties); + ListGoogleApiSourcesResponse.create = function create(properties) { + return new ListGoogleApiSourcesResponse(properties); }; /** - * Encodes the specified DeleteChannelRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelRequest.verify|verify} messages. + * Encodes the specified ListGoogleApiSourcesResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListGoogleApiSourcesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @static - * @param {google.cloud.eventarc.v1.IDeleteChannelRequest} message DeleteChannelRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IListGoogleApiSourcesResponse} message ListGoogleApiSourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteChannelRequest.encode = function encode(message, writer) { + ListGoogleApiSourcesResponse.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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + if (message.googleApiSources != null && message.googleApiSources.length) + for (var i = 0; i < message.googleApiSources.length; ++i) + $root.google.cloud.eventarc.v1.GoogleApiSource.encode(message.googleApiSources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified DeleteChannelRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelRequest.verify|verify} messages. + * Encodes the specified ListGoogleApiSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListGoogleApiSourcesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @static - * @param {google.cloud.eventarc.v1.IDeleteChannelRequest} message DeleteChannelRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IListGoogleApiSourcesResponse} message ListGoogleApiSourcesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListGoogleApiSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteChannelRequest message from the specified reader or buffer. + * Decodes a ListGoogleApiSourcesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.DeleteChannelRequest} DeleteChannelRequest + * @returns {google.cloud.eventarc.v1.ListGoogleApiSourcesResponse} ListGoogleApiSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteChannelRequest.decode = function decode(reader, length) { + ListGoogleApiSourcesResponse.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.eventarc.v1.DeleteChannelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.ListGoogleApiSourcesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.googleApiSources && message.googleApiSources.length)) + message.googleApiSources = []; + message.googleApiSources.push($root.google.cloud.eventarc.v1.GoogleApiSource.decode(reader, reader.uint32())); break; } case 2: { - message.validateOnly = reader.bool(); + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -5371,131 +15173,172 @@ }; /** - * Decodes a DeleteChannelRequest message from the specified reader or buffer, length delimited. + * Decodes a ListGoogleApiSourcesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.DeleteChannelRequest} DeleteChannelRequest + * @returns {google.cloud.eventarc.v1.ListGoogleApiSourcesResponse} ListGoogleApiSourcesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteChannelRequest.decodeDelimited = function decodeDelimited(reader) { + ListGoogleApiSourcesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteChannelRequest message. + * Verifies a ListGoogleApiSourcesResponse message. * @function verify - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteChannelRequest.verify = function verify(message) { + ListGoogleApiSourcesResponse.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.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.googleApiSources != null && message.hasOwnProperty("googleApiSources")) { + if (!Array.isArray(message.googleApiSources)) + return "googleApiSources: array expected"; + for (var i = 0; i < message.googleApiSources.length; ++i) { + var error = $root.google.cloud.eventarc.v1.GoogleApiSource.verify(message.googleApiSources[i]); + if (error) + return "googleApiSources." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates a DeleteChannelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListGoogleApiSourcesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.DeleteChannelRequest} DeleteChannelRequest + * @returns {google.cloud.eventarc.v1.ListGoogleApiSourcesResponse} ListGoogleApiSourcesResponse */ - DeleteChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.DeleteChannelRequest) + ListGoogleApiSourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.ListGoogleApiSourcesResponse) return object; - var message = new $root.google.cloud.eventarc.v1.DeleteChannelRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.eventarc.v1.ListGoogleApiSourcesResponse(); + if (object.googleApiSources) { + if (!Array.isArray(object.googleApiSources)) + throw TypeError(".google.cloud.eventarc.v1.ListGoogleApiSourcesResponse.googleApiSources: array expected"); + message.googleApiSources = []; + for (var i = 0; i < object.googleApiSources.length; ++i) { + if (typeof object.googleApiSources[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.ListGoogleApiSourcesResponse.googleApiSources: object expected"); + message.googleApiSources[i] = $root.google.cloud.eventarc.v1.GoogleApiSource.fromObject(object.googleApiSources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.eventarc.v1.ListGoogleApiSourcesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; /** - * Creates a plain object from a DeleteChannelRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListGoogleApiSourcesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @static - * @param {google.cloud.eventarc.v1.DeleteChannelRequest} message DeleteChannelRequest + * @param {google.cloud.eventarc.v1.ListGoogleApiSourcesResponse} message ListGoogleApiSourcesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteChannelRequest.toObject = function toObject(message, options) { + ListGoogleApiSourcesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.validateOnly = false; + if (options.arrays || options.defaults) { + object.googleApiSources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.googleApiSources && message.googleApiSources.length) { + object.googleApiSources = []; + for (var j = 0; j < message.googleApiSources.length; ++j) + object.googleApiSources[j] = $root.google.cloud.eventarc.v1.GoogleApiSource.toObject(message.googleApiSources[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; return object; }; /** - * Converts this DeleteChannelRequest to JSON. + * Converts this ListGoogleApiSourcesResponse to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @instance * @returns {Object.} JSON object */ - DeleteChannelRequest.prototype.toJSON = function toJSON() { + ListGoogleApiSourcesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteChannelRequest + * Gets the default type url for ListGoogleApiSourcesResponse * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.DeleteChannelRequest + * @memberof google.cloud.eventarc.v1.ListGoogleApiSourcesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteChannelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListGoogleApiSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.DeleteChannelRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.ListGoogleApiSourcesResponse"; }; - return DeleteChannelRequest; + return ListGoogleApiSourcesResponse; })(); - v1.GetProviderRequest = (function() { + v1.CreateGoogleApiSourceRequest = (function() { /** - * Properties of a GetProviderRequest. + * Properties of a CreateGoogleApiSourceRequest. * @memberof google.cloud.eventarc.v1 - * @interface IGetProviderRequest - * @property {string|null} [name] GetProviderRequest name + * @interface ICreateGoogleApiSourceRequest + * @property {string|null} [parent] CreateGoogleApiSourceRequest parent + * @property {google.cloud.eventarc.v1.IGoogleApiSource|null} [googleApiSource] CreateGoogleApiSourceRequest googleApiSource + * @property {string|null} [googleApiSourceId] CreateGoogleApiSourceRequest googleApiSourceId + * @property {boolean|null} [validateOnly] CreateGoogleApiSourceRequest validateOnly */ /** - * Constructs a new GetProviderRequest. + * Constructs a new CreateGoogleApiSourceRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a GetProviderRequest. - * @implements IGetProviderRequest + * @classdesc Represents a CreateGoogleApiSourceRequest. + * @implements ICreateGoogleApiSourceRequest * @constructor - * @param {google.cloud.eventarc.v1.IGetProviderRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest=} [properties] Properties to set */ - function GetProviderRequest(properties) { + function CreateGoogleApiSourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5503,75 +15346,117 @@ } /** - * GetProviderRequest name. - * @member {string} name - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * CreateGoogleApiSourceRequest parent. + * @member {string} parent + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @instance */ - GetProviderRequest.prototype.name = ""; + CreateGoogleApiSourceRequest.prototype.parent = ""; /** - * Creates a new GetProviderRequest instance using the specified properties. + * CreateGoogleApiSourceRequest googleApiSource. + * @member {google.cloud.eventarc.v1.IGoogleApiSource|null|undefined} googleApiSource + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest + * @instance + */ + CreateGoogleApiSourceRequest.prototype.googleApiSource = null; + + /** + * CreateGoogleApiSourceRequest googleApiSourceId. + * @member {string} googleApiSourceId + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest + * @instance + */ + CreateGoogleApiSourceRequest.prototype.googleApiSourceId = ""; + + /** + * CreateGoogleApiSourceRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest + * @instance + */ + CreateGoogleApiSourceRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateGoogleApiSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.IGetProviderRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.GetProviderRequest} GetProviderRequest instance + * @param {google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.CreateGoogleApiSourceRequest} CreateGoogleApiSourceRequest instance */ - GetProviderRequest.create = function create(properties) { - return new GetProviderRequest(properties); + CreateGoogleApiSourceRequest.create = function create(properties) { + return new CreateGoogleApiSourceRequest(properties); }; /** - * Encodes the specified GetProviderRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetProviderRequest.verify|verify} messages. + * Encodes the specified CreateGoogleApiSourceRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateGoogleApiSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.IGetProviderRequest} message GetProviderRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest} message CreateGoogleApiSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetProviderRequest.encode = function encode(message, writer) { + CreateGoogleApiSourceRequest.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.googleApiSource != null && Object.hasOwnProperty.call(message, "googleApiSource")) + $root.google.cloud.eventarc.v1.GoogleApiSource.encode(message.googleApiSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.googleApiSourceId != null && Object.hasOwnProperty.call(message, "googleApiSourceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.googleApiSourceId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified GetProviderRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetProviderRequest.verify|verify} messages. + * Encodes the specified CreateGoogleApiSourceRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateGoogleApiSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.IGetProviderRequest} message GetProviderRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest} message CreateGoogleApiSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetProviderRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateGoogleApiSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetProviderRequest message from the specified reader or buffer. + * Decodes a CreateGoogleApiSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.GetProviderRequest} GetProviderRequest + * @returns {google.cloud.eventarc.v1.CreateGoogleApiSourceRequest} CreateGoogleApiSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetProviderRequest.decode = function decode(reader, length) { + CreateGoogleApiSourceRequest.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.eventarc.v1.GetProviderRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.googleApiSource = $root.google.cloud.eventarc.v1.GoogleApiSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.googleApiSourceId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -5583,126 +15468,155 @@ }; /** - * Decodes a GetProviderRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateGoogleApiSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.GetProviderRequest} GetProviderRequest + * @returns {google.cloud.eventarc.v1.CreateGoogleApiSourceRequest} CreateGoogleApiSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetProviderRequest.decodeDelimited = function decodeDelimited(reader) { + CreateGoogleApiSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetProviderRequest message. + * Verifies a CreateGoogleApiSourceRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetProviderRequest.verify = function verify(message) { + CreateGoogleApiSourceRequest.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.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.googleApiSource != null && message.hasOwnProperty("googleApiSource")) { + var error = $root.google.cloud.eventarc.v1.GoogleApiSource.verify(message.googleApiSource); + if (error) + return "googleApiSource." + error; + } + if (message.googleApiSourceId != null && message.hasOwnProperty("googleApiSourceId")) + if (!$util.isString(message.googleApiSourceId)) + return "googleApiSourceId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a GetProviderRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateGoogleApiSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.GetProviderRequest} GetProviderRequest + * @returns {google.cloud.eventarc.v1.CreateGoogleApiSourceRequest} CreateGoogleApiSourceRequest */ - GetProviderRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.GetProviderRequest) + CreateGoogleApiSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest) return object; - var message = new $root.google.cloud.eventarc.v1.GetProviderRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.googleApiSource != null) { + if (typeof object.googleApiSource !== "object") + throw TypeError(".google.cloud.eventarc.v1.CreateGoogleApiSourceRequest.googleApiSource: object expected"); + message.googleApiSource = $root.google.cloud.eventarc.v1.GoogleApiSource.fromObject(object.googleApiSource); + } + if (object.googleApiSourceId != null) + message.googleApiSourceId = String(object.googleApiSourceId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a GetProviderRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateGoogleApiSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.GetProviderRequest} message GetProviderRequest + * @param {google.cloud.eventarc.v1.CreateGoogleApiSourceRequest} message CreateGoogleApiSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetProviderRequest.toObject = function toObject(message, options) { + CreateGoogleApiSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.googleApiSource = null; + object.googleApiSourceId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.googleApiSource != null && message.hasOwnProperty("googleApiSource")) + object.googleApiSource = $root.google.cloud.eventarc.v1.GoogleApiSource.toObject(message.googleApiSource, options); + if (message.googleApiSourceId != null && message.hasOwnProperty("googleApiSourceId")) + object.googleApiSourceId = message.googleApiSourceId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this GetProviderRequest to JSON. + * Converts this CreateGoogleApiSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @instance * @returns {Object.} JSON object */ - GetProviderRequest.prototype.toJSON = function toJSON() { + CreateGoogleApiSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetProviderRequest + * Gets the default type url for CreateGoogleApiSourceRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.GetProviderRequest + * @memberof google.cloud.eventarc.v1.CreateGoogleApiSourceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetProviderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateGoogleApiSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.GetProviderRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.CreateGoogleApiSourceRequest"; }; - return GetProviderRequest; + return CreateGoogleApiSourceRequest; })(); - v1.ListProvidersRequest = (function() { + v1.UpdateGoogleApiSourceRequest = (function() { /** - * Properties of a ListProvidersRequest. + * Properties of an UpdateGoogleApiSourceRequest. * @memberof google.cloud.eventarc.v1 - * @interface IListProvidersRequest - * @property {string|null} [parent] ListProvidersRequest parent - * @property {number|null} [pageSize] ListProvidersRequest pageSize - * @property {string|null} [pageToken] ListProvidersRequest pageToken - * @property {string|null} [orderBy] ListProvidersRequest orderBy - * @property {string|null} [filter] ListProvidersRequest filter + * @interface IUpdateGoogleApiSourceRequest + * @property {google.cloud.eventarc.v1.IGoogleApiSource|null} [googleApiSource] UpdateGoogleApiSourceRequest googleApiSource + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGoogleApiSourceRequest updateMask + * @property {boolean|null} [allowMissing] UpdateGoogleApiSourceRequest allowMissing + * @property {boolean|null} [validateOnly] UpdateGoogleApiSourceRequest validateOnly */ /** - * Constructs a new ListProvidersRequest. + * Constructs a new UpdateGoogleApiSourceRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a ListProvidersRequest. - * @implements IListProvidersRequest + * @classdesc Represents an UpdateGoogleApiSourceRequest. + * @implements IUpdateGoogleApiSourceRequest * @constructor - * @param {google.cloud.eventarc.v1.IListProvidersRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest=} [properties] Properties to set */ - function ListProvidersRequest(properties) { + function UpdateGoogleApiSourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5710,131 +15624,117 @@ } /** - * ListProvidersRequest parent. - * @member {string} parent - * @memberof google.cloud.eventarc.v1.ListProvidersRequest - * @instance - */ - ListProvidersRequest.prototype.parent = ""; - - /** - * ListProvidersRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * UpdateGoogleApiSourceRequest googleApiSource. + * @member {google.cloud.eventarc.v1.IGoogleApiSource|null|undefined} googleApiSource + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @instance */ - ListProvidersRequest.prototype.pageSize = 0; + UpdateGoogleApiSourceRequest.prototype.googleApiSource = null; /** - * ListProvidersRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * UpdateGoogleApiSourceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @instance */ - ListProvidersRequest.prototype.pageToken = ""; + UpdateGoogleApiSourceRequest.prototype.updateMask = null; /** - * ListProvidersRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * UpdateGoogleApiSourceRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @instance */ - ListProvidersRequest.prototype.orderBy = ""; + UpdateGoogleApiSourceRequest.prototype.allowMissing = false; /** - * ListProvidersRequest filter. - * @member {string} filter - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * UpdateGoogleApiSourceRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @instance */ - ListProvidersRequest.prototype.filter = ""; + UpdateGoogleApiSourceRequest.prototype.validateOnly = false; /** - * Creates a new ListProvidersRequest instance using the specified properties. + * Creates a new UpdateGoogleApiSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.IListProvidersRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.ListProvidersRequest} ListProvidersRequest instance + * @param {google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest} UpdateGoogleApiSourceRequest instance */ - ListProvidersRequest.create = function create(properties) { - return new ListProvidersRequest(properties); + UpdateGoogleApiSourceRequest.create = function create(properties) { + return new UpdateGoogleApiSourceRequest(properties); }; /** - * Encodes the specified ListProvidersRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersRequest.verify|verify} messages. + * Encodes the specified UpdateGoogleApiSourceRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.IListProvidersRequest} message ListProvidersRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest} message UpdateGoogleApiSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListProvidersRequest.encode = function encode(message, writer) { + UpdateGoogleApiSourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.googleApiSource != null && Object.hasOwnProperty.call(message, "googleApiSource")) + $root.google.cloud.eventarc.v1.GoogleApiSource.encode(message.googleApiSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListProvidersRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersRequest.verify|verify} messages. + * Encodes the specified UpdateGoogleApiSourceRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.IListProvidersRequest} message ListProvidersRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest} message UpdateGoogleApiSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListProvidersRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateGoogleApiSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListProvidersRequest message from the specified reader or buffer. + * Decodes an UpdateGoogleApiSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.ListProvidersRequest} ListProvidersRequest + * @returns {google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest} UpdateGoogleApiSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListProvidersRequest.decode = function decode(reader, length) { + UpdateGoogleApiSourceRequest.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.eventarc.v1.ListProvidersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.googleApiSource = $root.google.cloud.eventarc.v1.GoogleApiSource.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); + message.allowMissing = reader.bool(); break; } case 4: { - message.orderBy = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); + message.validateOnly = reader.bool(); break; } default: @@ -5846,159 +15746,160 @@ }; /** - * Decodes a ListProvidersRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateGoogleApiSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.ListProvidersRequest} ListProvidersRequest + * @returns {google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest} UpdateGoogleApiSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListProvidersRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateGoogleApiSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListProvidersRequest message. + * Verifies an UpdateGoogleApiSourceRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListProvidersRequest.verify = function verify(message) { + UpdateGoogleApiSourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.googleApiSource != null && message.hasOwnProperty("googleApiSource")) { + var error = $root.google.cloud.eventarc.v1.GoogleApiSource.verify(message.googleApiSource); + if (error) + return "googleApiSource." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListProvidersRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateGoogleApiSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.ListProvidersRequest} ListProvidersRequest + * @returns {google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest} UpdateGoogleApiSourceRequest */ - ListProvidersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.ListProvidersRequest) + UpdateGoogleApiSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest) return object; - var message = new $root.google.cloud.eventarc.v1.ListProvidersRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest(); + if (object.googleApiSource != null) { + if (typeof object.googleApiSource !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest.googleApiSource: object expected"); + message.googleApiSource = $root.google.cloud.eventarc.v1.GoogleApiSource.fromObject(object.googleApiSource); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListProvidersRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateGoogleApiSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.ListProvidersRequest} message ListProvidersRequest + * @param {google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest} message UpdateGoogleApiSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListProvidersRequest.toObject = function toObject(message, options) { + UpdateGoogleApiSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; - object.filter = ""; + object.googleApiSource = null; + object.updateMask = null; + object.allowMissing = false; + object.validateOnly = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.googleApiSource != null && message.hasOwnProperty("googleApiSource")) + object.googleApiSource = $root.google.cloud.eventarc.v1.GoogleApiSource.toObject(message.googleApiSource, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListProvidersRequest to JSON. + * Converts this UpdateGoogleApiSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @instance * @returns {Object.} JSON object */ - ListProvidersRequest.prototype.toJSON = function toJSON() { + UpdateGoogleApiSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListProvidersRequest + * Gets the default type url for UpdateGoogleApiSourceRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.ListProvidersRequest + * @memberof google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListProvidersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateGoogleApiSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.ListProvidersRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest"; }; - return ListProvidersRequest; + return UpdateGoogleApiSourceRequest; })(); - v1.ListProvidersResponse = (function() { + v1.DeleteGoogleApiSourceRequest = (function() { /** - * Properties of a ListProvidersResponse. + * Properties of a DeleteGoogleApiSourceRequest. * @memberof google.cloud.eventarc.v1 - * @interface IListProvidersResponse - * @property {Array.|null} [providers] ListProvidersResponse providers - * @property {string|null} [nextPageToken] ListProvidersResponse nextPageToken - * @property {Array.|null} [unreachable] ListProvidersResponse unreachable + * @interface IDeleteGoogleApiSourceRequest + * @property {string|null} [name] DeleteGoogleApiSourceRequest name + * @property {string|null} [etag] DeleteGoogleApiSourceRequest etag + * @property {boolean|null} [allowMissing] DeleteGoogleApiSourceRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteGoogleApiSourceRequest validateOnly */ /** - * Constructs a new ListProvidersResponse. + * Constructs a new DeleteGoogleApiSourceRequest. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a ListProvidersResponse. - * @implements IListProvidersResponse + * @classdesc Represents a DeleteGoogleApiSourceRequest. + * @implements IDeleteGoogleApiSourceRequest * @constructor - * @param {google.cloud.eventarc.v1.IListProvidersResponse=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest=} [properties] Properties to set */ - function ListProvidersResponse(properties) { - this.providers = []; - this.unreachable = []; + function DeleteGoogleApiSourceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6006,109 +15907,117 @@ } /** - * ListProvidersResponse providers. - * @member {Array.} providers - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * DeleteGoogleApiSourceRequest name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @instance */ - ListProvidersResponse.prototype.providers = $util.emptyArray; + DeleteGoogleApiSourceRequest.prototype.name = ""; /** - * ListProvidersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * DeleteGoogleApiSourceRequest etag. + * @member {string} etag + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @instance */ - ListProvidersResponse.prototype.nextPageToken = ""; + DeleteGoogleApiSourceRequest.prototype.etag = ""; /** - * ListProvidersResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * DeleteGoogleApiSourceRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @instance */ - ListProvidersResponse.prototype.unreachable = $util.emptyArray; + DeleteGoogleApiSourceRequest.prototype.allowMissing = false; /** - * Creates a new ListProvidersResponse instance using the specified properties. + * DeleteGoogleApiSourceRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest + * @instance + */ + DeleteGoogleApiSourceRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteGoogleApiSourceRequest instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.IListProvidersResponse=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.ListProvidersResponse} ListProvidersResponse instance + * @param {google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest} DeleteGoogleApiSourceRequest instance */ - ListProvidersResponse.create = function create(properties) { - return new ListProvidersResponse(properties); + DeleteGoogleApiSourceRequest.create = function create(properties) { + return new DeleteGoogleApiSourceRequest(properties); }; /** - * Encodes the specified ListProvidersResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersResponse.verify|verify} messages. + * Encodes the specified DeleteGoogleApiSourceRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.IListProvidersResponse} message ListProvidersResponse message or plain object to encode + * @param {google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest} message DeleteGoogleApiSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListProvidersResponse.encode = function encode(message, writer) { + DeleteGoogleApiSourceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.providers != null && message.providers.length) - for (var i = 0; i < message.providers.length; ++i) - $root.google.cloud.eventarc.v1.Provider.encode(message.providers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListProvidersResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListProvidersResponse.verify|verify} messages. + * Encodes the specified DeleteGoogleApiSourceRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.IListProvidersResponse} message ListProvidersResponse message or plain object to encode + * @param {google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest} message DeleteGoogleApiSourceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListProvidersResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteGoogleApiSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListProvidersResponse message from the specified reader or buffer. + * Decodes a DeleteGoogleApiSourceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.ListProvidersResponse} ListProvidersResponse + * @returns {google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest} DeleteGoogleApiSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListProvidersResponse.decode = function decode(reader, length) { + DeleteGoogleApiSourceRequest.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.eventarc.v1.ListProvidersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.providers && message.providers.length)) - message.providers = []; - message.providers.push($root.google.cloud.eventarc.v1.Provider.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.etag = reader.string(); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -6120,245 +16029,313 @@ }; /** - * Decodes a ListProvidersResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteGoogleApiSourceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.ListProvidersResponse} ListProvidersResponse + * @returns {google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest} DeleteGoogleApiSourceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListProvidersResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteGoogleApiSourceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListProvidersResponse message. + * Verifies a DeleteGoogleApiSourceRequest message. * @function verify - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListProvidersResponse.verify = function verify(message) { + DeleteGoogleApiSourceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.providers != null && message.hasOwnProperty("providers")) { - if (!Array.isArray(message.providers)) - return "providers: array expected"; - for (var i = 0; i < message.providers.length; ++i) { - var error = $root.google.cloud.eventarc.v1.Provider.verify(message.providers[i]); - if (error) - return "providers." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListProvidersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteGoogleApiSourceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.ListProvidersResponse} ListProvidersResponse + * @returns {google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest} DeleteGoogleApiSourceRequest */ - ListProvidersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.ListProvidersResponse) + DeleteGoogleApiSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest) return object; - var message = new $root.google.cloud.eventarc.v1.ListProvidersResponse(); - if (object.providers) { - if (!Array.isArray(object.providers)) - throw TypeError(".google.cloud.eventarc.v1.ListProvidersResponse.providers: array expected"); - message.providers = []; - for (var i = 0; i < object.providers.length; ++i) { - if (typeof object.providers[i] !== "object") - throw TypeError(".google.cloud.eventarc.v1.ListProvidersResponse.providers: object expected"); - message.providers[i] = $root.google.cloud.eventarc.v1.Provider.fromObject(object.providers[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.eventarc.v1.ListProvidersResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListProvidersResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteGoogleApiSourceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @static - * @param {google.cloud.eventarc.v1.ListProvidersResponse} message ListProvidersResponse + * @param {google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest} message DeleteGoogleApiSourceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListProvidersResponse.toObject = function toObject(message, options) { + DeleteGoogleApiSourceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.providers = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.providers && message.providers.length) { - object.providers = []; - for (var j = 0; j < message.providers.length; ++j) - object.providers[j] = $root.google.cloud.eventarc.v1.Provider.toObject(message.providers[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.allowMissing = false; + object.validateOnly = false; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListProvidersResponse to JSON. + * Converts this DeleteGoogleApiSourceRequest to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @instance * @returns {Object.} JSON object */ - ListProvidersResponse.prototype.toJSON = function toJSON() { + DeleteGoogleApiSourceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListProvidersResponse + * Gets the default type url for DeleteGoogleApiSourceRequest * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.ListProvidersResponse + * @memberof google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListProvidersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteGoogleApiSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.ListProvidersResponse"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest"; }; - return ListProvidersResponse; + return DeleteGoogleApiSourceRequest; })(); - v1.GetChannelConnectionRequest = (function() { + v1.OperationMetadata = (function() { /** - * Properties of a GetChannelConnectionRequest. + * Properties of an OperationMetadata. * @memberof google.cloud.eventarc.v1 - * @interface IGetChannelConnectionRequest - * @property {string|null} [name] GetChannelConnectionRequest name + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion */ /** - * Constructs a new GetChannelConnectionRequest. + * Constructs a new OperationMetadata. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a GetChannelConnectionRequest. - * @implements IGetChannelConnectionRequest + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(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]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.eventarc.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.eventarc.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.eventarc.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.eventarc.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.eventarc.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.eventarc.v1.OperationMetadata + * @instance */ - function GetChannelConnectionRequest(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]]; - } + OperationMetadata.prototype.requestedCancellation = false; /** - * GetChannelConnectionRequest name. - * @member {string} name - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.eventarc.v1.OperationMetadata * @instance */ - GetChannelConnectionRequest.prototype.name = ""; + OperationMetadata.prototype.apiVersion = ""; /** - * Creates a new GetChannelConnectionRequest instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.OperationMetadata * @static - * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.GetChannelConnectionRequest} GetChannelConnectionRequest instance + * @param {google.cloud.eventarc.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.OperationMetadata} OperationMetadata instance */ - GetChannelConnectionRequest.create = function create(properties) { - return new GetChannelConnectionRequest(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified GetChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelConnectionRequest.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.eventarc.v1.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.OperationMetadata * @static - * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest} message GetChannelConnectionRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetChannelConnectionRequest.encode = function encode(message, writer) { + OperationMetadata.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 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); return writer; }; /** - * Encodes the specified GetChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetChannelConnectionRequest.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.OperationMetadata * @static - * @param {google.cloud.eventarc.v1.IGetChannelConnectionRequest} message GetChannelConnectionRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetChannelConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetChannelConnectionRequest message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.GetChannelConnectionRequest} GetChannelConnectionRequest + * @returns {google.cloud.eventarc.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetChannelConnectionRequest.decode = function decode(reader, length) { + OperationMetadata.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.eventarc.v1.GetChannelConnectionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); break; } default: @@ -6370,228 +16347,449 @@ }; /** - * Decodes a GetChannelConnectionRequest message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.GetChannelConnectionRequest} GetChannelConnectionRequest + * @returns {google.cloud.eventarc.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetChannelConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetChannelConnectionRequest message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetChannelConnectionRequest.verify = function verify(message) { + OperationMetadata.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.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates a GetChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.GetChannelConnectionRequest} GetChannelConnectionRequest + * @returns {google.cloud.eventarc.v1.OperationMetadata} OperationMetadata */ - GetChannelConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.GetChannelConnectionRequest) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.OperationMetadata) return object; - var message = new $root.google.cloud.eventarc.v1.GetChannelConnectionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.eventarc.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.eventarc.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.eventarc.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from a GetChannelConnectionRequest message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.OperationMetadata * @static - * @param {google.cloud.eventarc.v1.GetChannelConnectionRequest} message GetChannelConnectionRequest + * @param {google.cloud.eventarc.v1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetChannelConnectionRequest.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; return object; }; /** - * Converts this GetChannelConnectionRequest to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.OperationMetadata * @instance * @returns {Object.} JSON object */ - GetChannelConnectionRequest.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetChannelConnectionRequest + * Gets the default type url for OperationMetadata * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.GetChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.OperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetChannelConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.GetChannelConnectionRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.OperationMetadata"; }; - return GetChannelConnectionRequest; - })(); + return OperationMetadata; + })(); + + v1.GoogleApiSource = (function() { + + /** + * Properties of a GoogleApiSource. + * @memberof google.cloud.eventarc.v1 + * @interface IGoogleApiSource + * @property {string|null} [name] GoogleApiSource name + * @property {string|null} [uid] GoogleApiSource uid + * @property {string|null} [etag] GoogleApiSource etag + * @property {google.protobuf.ITimestamp|null} [createTime] GoogleApiSource createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] GoogleApiSource updateTime + * @property {Object.|null} [labels] GoogleApiSource labels + * @property {Object.|null} [annotations] GoogleApiSource annotations + * @property {string|null} [displayName] GoogleApiSource displayName + * @property {string|null} [destination] GoogleApiSource destination + * @property {string|null} [cryptoKeyName] GoogleApiSource cryptoKeyName + * @property {google.cloud.eventarc.v1.ILoggingConfig|null} [loggingConfig] GoogleApiSource loggingConfig + */ + + /** + * Constructs a new GoogleApiSource. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a GoogleApiSource. + * @implements IGoogleApiSource + * @constructor + * @param {google.cloud.eventarc.v1.IGoogleApiSource=} [properties] Properties to set + */ + function GoogleApiSource(properties) { + this.labels = {}; + this.annotations = {}; + 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]]; + } + + /** + * GoogleApiSource name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GoogleApiSource + * @instance + */ + GoogleApiSource.prototype.name = ""; + + /** + * GoogleApiSource uid. + * @member {string} uid + * @memberof google.cloud.eventarc.v1.GoogleApiSource + * @instance + */ + GoogleApiSource.prototype.uid = ""; + + /** + * GoogleApiSource etag. + * @member {string} etag + * @memberof google.cloud.eventarc.v1.GoogleApiSource + * @instance + */ + GoogleApiSource.prototype.etag = ""; + + /** + * GoogleApiSource createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.eventarc.v1.GoogleApiSource + * @instance + */ + GoogleApiSource.prototype.createTime = null; + + /** + * GoogleApiSource updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.eventarc.v1.GoogleApiSource + * @instance + */ + GoogleApiSource.prototype.updateTime = null; - v1.ListChannelConnectionsRequest = (function() { + /** + * GoogleApiSource labels. + * @member {Object.} labels + * @memberof google.cloud.eventarc.v1.GoogleApiSource + * @instance + */ + GoogleApiSource.prototype.labels = $util.emptyObject; /** - * Properties of a ListChannelConnectionsRequest. - * @memberof google.cloud.eventarc.v1 - * @interface IListChannelConnectionsRequest - * @property {string|null} [parent] ListChannelConnectionsRequest parent - * @property {number|null} [pageSize] ListChannelConnectionsRequest pageSize - * @property {string|null} [pageToken] ListChannelConnectionsRequest pageToken + * GoogleApiSource annotations. + * @member {Object.} annotations + * @memberof google.cloud.eventarc.v1.GoogleApiSource + * @instance */ + GoogleApiSource.prototype.annotations = $util.emptyObject; /** - * Constructs a new ListChannelConnectionsRequest. - * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a ListChannelConnectionsRequest. - * @implements IListChannelConnectionsRequest - * @constructor - * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest=} [properties] Properties to set + * GoogleApiSource displayName. + * @member {string} displayName + * @memberof google.cloud.eventarc.v1.GoogleApiSource + * @instance */ - function ListChannelConnectionsRequest(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]]; - } + GoogleApiSource.prototype.displayName = ""; /** - * ListChannelConnectionsRequest parent. - * @member {string} parent - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * GoogleApiSource destination. + * @member {string} destination + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @instance */ - ListChannelConnectionsRequest.prototype.parent = ""; + GoogleApiSource.prototype.destination = ""; /** - * ListChannelConnectionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * GoogleApiSource cryptoKeyName. + * @member {string} cryptoKeyName + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @instance */ - ListChannelConnectionsRequest.prototype.pageSize = 0; + GoogleApiSource.prototype.cryptoKeyName = ""; /** - * ListChannelConnectionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * GoogleApiSource loggingConfig. + * @member {google.cloud.eventarc.v1.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @instance */ - ListChannelConnectionsRequest.prototype.pageToken = ""; + GoogleApiSource.prototype.loggingConfig = null; /** - * Creates a new ListChannelConnectionsRequest instance using the specified properties. + * Creates a new GoogleApiSource instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @static - * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.ListChannelConnectionsRequest} ListChannelConnectionsRequest instance + * @param {google.cloud.eventarc.v1.IGoogleApiSource=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GoogleApiSource} GoogleApiSource instance */ - ListChannelConnectionsRequest.create = function create(properties) { - return new ListChannelConnectionsRequest(properties); + GoogleApiSource.create = function create(properties) { + return new GoogleApiSource(properties); }; /** - * Encodes the specified ListChannelConnectionsRequest message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsRequest.verify|verify} messages. + * Encodes the specified GoogleApiSource message. Does not implicitly {@link google.cloud.eventarc.v1.GoogleApiSource.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @static - * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest} message ListChannelConnectionsRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IGoogleApiSource} message GoogleApiSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelConnectionsRequest.encode = function encode(message, writer) { + GoogleApiSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.etag); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.destination); + if (message.cryptoKeyName != null && Object.hasOwnProperty.call(message, "cryptoKeyName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.cryptoKeyName); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.cloud.eventarc.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListChannelConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsRequest.verify|verify} messages. + * Encodes the specified GoogleApiSource message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GoogleApiSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @static - * @param {google.cloud.eventarc.v1.IListChannelConnectionsRequest} message ListChannelConnectionsRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IGoogleApiSource} message GoogleApiSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GoogleApiSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListChannelConnectionsRequest message from the specified reader or buffer. + * Decodes a GoogleApiSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.ListChannelConnectionsRequest} ListChannelConnectionsRequest + * @returns {google.cloud.eventarc.v1.GoogleApiSource} GoogleApiSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelConnectionsRequest.decode = function decode(reader, length) { + GoogleApiSource.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.eventarc.v1.ListChannelConnectionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.GoogleApiSource(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.uid = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.etag = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + 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 7: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + case 8: { + message.displayName = reader.string(); + break; + } + case 9: { + message.destination = reader.string(); + break; + } + case 10: { + message.cryptoKeyName = reader.string(); + break; + } + case 11: { + message.loggingConfig = $root.google.cloud.eventarc.v1.LoggingConfig.decode(reader, reader.uint32()); break; } default: @@ -6603,143 +16801,247 @@ }; /** - * Decodes a ListChannelConnectionsRequest message from the specified reader or buffer, length delimited. + * Decodes a GoogleApiSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.ListChannelConnectionsRequest} ListChannelConnectionsRequest + * @returns {google.cloud.eventarc.v1.GoogleApiSource} GoogleApiSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { + GoogleApiSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListChannelConnectionsRequest message. + * Verifies a GoogleApiSource message. * @function verify - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListChannelConnectionsRequest.verify = function verify(message) { + GoogleApiSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: 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.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + if (!$util.isString(message.cryptoKeyName)) + return "cryptoKeyName: string expected"; + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.cloud.eventarc.v1.LoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } return null; }; /** - * Creates a ListChannelConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GoogleApiSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.ListChannelConnectionsRequest} ListChannelConnectionsRequest + * @returns {google.cloud.eventarc.v1.GoogleApiSource} GoogleApiSource */ - ListChannelConnectionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.ListChannelConnectionsRequest) + GoogleApiSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GoogleApiSource) return object; - var message = new $root.google.cloud.eventarc.v1.ListChannelConnectionsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.cloud.eventarc.v1.GoogleApiSource(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.etag != null) + message.etag = String(object.etag); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.eventarc.v1.GoogleApiSource.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.eventarc.v1.GoogleApiSource.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.eventarc.v1.GoogleApiSource.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.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.eventarc.v1.GoogleApiSource.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.destination != null) + message.destination = String(object.destination); + if (object.cryptoKeyName != null) + message.cryptoKeyName = String(object.cryptoKeyName); + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.cloud.eventarc.v1.GoogleApiSource.loggingConfig: object expected"); + message.loggingConfig = $root.google.cloud.eventarc.v1.LoggingConfig.fromObject(object.loggingConfig); + } return message; }; /** - * Creates a plain object from a ListChannelConnectionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GoogleApiSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @static - * @param {google.cloud.eventarc.v1.ListChannelConnectionsRequest} message ListChannelConnectionsRequest + * @param {google.cloud.eventarc.v1.GoogleApiSource} message GoogleApiSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListChannelConnectionsRequest.toObject = function toObject(message, options) { + GoogleApiSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.etag = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.destination = ""; + object.cryptoKeyName = ""; + object.loggingConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + 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.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + object.cryptoKeyName = message.cryptoKeyName; + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.cloud.eventarc.v1.LoggingConfig.toObject(message.loggingConfig, options); return object; }; /** - * Converts this ListChannelConnectionsRequest to JSON. + * Converts this GoogleApiSource to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @instance * @returns {Object.} JSON object */ - ListChannelConnectionsRequest.prototype.toJSON = function toJSON() { + GoogleApiSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListChannelConnectionsRequest + * Gets the default type url for GoogleApiSource * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsRequest + * @memberof google.cloud.eventarc.v1.GoogleApiSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListChannelConnectionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GoogleApiSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.ListChannelConnectionsRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.GoogleApiSource"; }; - return ListChannelConnectionsRequest; + return GoogleApiSource; })(); - v1.ListChannelConnectionsResponse = (function() { + v1.LoggingConfig = (function() { /** - * Properties of a ListChannelConnectionsResponse. + * Properties of a LoggingConfig. * @memberof google.cloud.eventarc.v1 - * @interface IListChannelConnectionsResponse - * @property {Array.|null} [channelConnections] ListChannelConnectionsResponse channelConnections - * @property {string|null} [nextPageToken] ListChannelConnectionsResponse nextPageToken - * @property {Array.|null} [unreachable] ListChannelConnectionsResponse unreachable + * @interface ILoggingConfig + * @property {google.cloud.eventarc.v1.LoggingConfig.LogSeverity|null} [logSeverity] LoggingConfig logSeverity */ /** - * Constructs a new ListChannelConnectionsResponse. + * Constructs a new LoggingConfig. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a ListChannelConnectionsResponse. - * @implements IListChannelConnectionsResponse + * @classdesc Represents a LoggingConfig. + * @implements ILoggingConfig * @constructor - * @param {google.cloud.eventarc.v1.IListChannelConnectionsResponse=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.ILoggingConfig=} [properties] Properties to set */ - function ListChannelConnectionsResponse(properties) { - this.channelConnections = []; - this.unreachable = []; + function LoggingConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6747,109 +17049,75 @@ } /** - * ListChannelConnectionsResponse channelConnections. - * @member {Array.} channelConnections - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse - * @instance - */ - ListChannelConnectionsResponse.prototype.channelConnections = $util.emptyArray; - - /** - * ListChannelConnectionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse - * @instance - */ - ListChannelConnectionsResponse.prototype.nextPageToken = ""; - - /** - * ListChannelConnectionsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * LoggingConfig logSeverity. + * @member {google.cloud.eventarc.v1.LoggingConfig.LogSeverity} logSeverity + * @memberof google.cloud.eventarc.v1.LoggingConfig * @instance */ - ListChannelConnectionsResponse.prototype.unreachable = $util.emptyArray; + LoggingConfig.prototype.logSeverity = 0; /** - * Creates a new ListChannelConnectionsResponse instance using the specified properties. + * Creates a new LoggingConfig instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @memberof google.cloud.eventarc.v1.LoggingConfig * @static - * @param {google.cloud.eventarc.v1.IListChannelConnectionsResponse=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.ListChannelConnectionsResponse} ListChannelConnectionsResponse instance + * @param {google.cloud.eventarc.v1.ILoggingConfig=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.LoggingConfig} LoggingConfig instance */ - ListChannelConnectionsResponse.create = function create(properties) { - return new ListChannelConnectionsResponse(properties); + LoggingConfig.create = function create(properties) { + return new LoggingConfig(properties); }; /** - * Encodes the specified ListChannelConnectionsResponse message. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsResponse.verify|verify} messages. + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.eventarc.v1.LoggingConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @memberof google.cloud.eventarc.v1.LoggingConfig * @static - * @param {google.cloud.eventarc.v1.IListChannelConnectionsResponse} message ListChannelConnectionsResponse message or plain object to encode + * @param {google.cloud.eventarc.v1.ILoggingConfig} message LoggingConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelConnectionsResponse.encode = function encode(message, writer) { + LoggingConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.channelConnections != null && message.channelConnections.length) - for (var i = 0; i < message.channelConnections.length; ++i) - $root.google.cloud.eventarc.v1.ChannelConnection.encode(message.channelConnections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.logSeverity != null && Object.hasOwnProperty.call(message, "logSeverity")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logSeverity); return writer; }; /** - * Encodes the specified ListChannelConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.ListChannelConnectionsResponse.verify|verify} messages. + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.LoggingConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @memberof google.cloud.eventarc.v1.LoggingConfig * @static - * @param {google.cloud.eventarc.v1.IListChannelConnectionsResponse} message ListChannelConnectionsResponse message or plain object to encode + * @param {google.cloud.eventarc.v1.ILoggingConfig} message LoggingConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListChannelConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListChannelConnectionsResponse message from the specified reader or buffer. + * Decodes a LoggingConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @memberof google.cloud.eventarc.v1.LoggingConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.ListChannelConnectionsResponse} ListChannelConnectionsResponse + * @returns {google.cloud.eventarc.v1.LoggingConfig} LoggingConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelConnectionsResponse.decode = function decode(reader, length) { + LoggingConfig.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.eventarc.v1.ListChannelConnectionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.LoggingConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.channelConnections && message.channelConnections.length)) - message.channelConnections = []; - message.channelConnections.push($root.google.cloud.eventarc.v1.ChannelConnection.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.logSeverity = reader.int32(); break; } default: @@ -6861,171 +17129,213 @@ }; /** - * Decodes a ListChannelConnectionsResponse message from the specified reader or buffer, length delimited. + * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @memberof google.cloud.eventarc.v1.LoggingConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.ListChannelConnectionsResponse} ListChannelConnectionsResponse + * @returns {google.cloud.eventarc.v1.LoggingConfig} LoggingConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListChannelConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { + LoggingConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListChannelConnectionsResponse message. + * Verifies a LoggingConfig message. * @function verify - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @memberof google.cloud.eventarc.v1.LoggingConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListChannelConnectionsResponse.verify = function verify(message) { + LoggingConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.channelConnections != null && message.hasOwnProperty("channelConnections")) { - if (!Array.isArray(message.channelConnections)) - return "channelConnections: array expected"; - for (var i = 0; i < message.channelConnections.length; ++i) { - var error = $root.google.cloud.eventarc.v1.ChannelConnection.verify(message.channelConnections[i]); - if (error) - return "channelConnections." + error; + if (message.logSeverity != null && message.hasOwnProperty("logSeverity")) + switch (message.logSeverity) { + default: + return "logSeverity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } return null; }; /** - * Creates a ListChannelConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @memberof google.cloud.eventarc.v1.LoggingConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.ListChannelConnectionsResponse} ListChannelConnectionsResponse + * @returns {google.cloud.eventarc.v1.LoggingConfig} LoggingConfig */ - ListChannelConnectionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.ListChannelConnectionsResponse) + LoggingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.LoggingConfig) return object; - var message = new $root.google.cloud.eventarc.v1.ListChannelConnectionsResponse(); - if (object.channelConnections) { - if (!Array.isArray(object.channelConnections)) - throw TypeError(".google.cloud.eventarc.v1.ListChannelConnectionsResponse.channelConnections: array expected"); - message.channelConnections = []; - for (var i = 0; i < object.channelConnections.length; ++i) { - if (typeof object.channelConnections[i] !== "object") - throw TypeError(".google.cloud.eventarc.v1.ListChannelConnectionsResponse.channelConnections: object expected"); - message.channelConnections[i] = $root.google.cloud.eventarc.v1.ChannelConnection.fromObject(object.channelConnections[i]); + var message = new $root.google.cloud.eventarc.v1.LoggingConfig(); + switch (object.logSeverity) { + default: + if (typeof object.logSeverity === "number") { + message.logSeverity = object.logSeverity; + break; } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.eventarc.v1.ListChannelConnectionsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + break; + case "LOG_SEVERITY_UNSPECIFIED": + case 0: + message.logSeverity = 0; + break; + case "NONE": + case 1: + message.logSeverity = 1; + break; + case "DEBUG": + case 2: + message.logSeverity = 2; + break; + case "INFO": + case 3: + message.logSeverity = 3; + break; + case "NOTICE": + case 4: + message.logSeverity = 4; + break; + case "WARNING": + case 5: + message.logSeverity = 5; + break; + case "ERROR": + case 6: + message.logSeverity = 6; + break; + case "CRITICAL": + case 7: + message.logSeverity = 7; + break; + case "ALERT": + case 8: + message.logSeverity = 8; + break; + case "EMERGENCY": + case 9: + message.logSeverity = 9; + break; } return message; }; /** - * Creates a plain object from a ListChannelConnectionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @memberof google.cloud.eventarc.v1.LoggingConfig * @static - * @param {google.cloud.eventarc.v1.ListChannelConnectionsResponse} message ListChannelConnectionsResponse + * @param {google.cloud.eventarc.v1.LoggingConfig} message LoggingConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListChannelConnectionsResponse.toObject = function toObject(message, options) { + LoggingConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.channelConnections = []; - object.unreachable = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.channelConnections && message.channelConnections.length) { - object.channelConnections = []; - for (var j = 0; j < message.channelConnections.length; ++j) - object.channelConnections[j] = $root.google.cloud.eventarc.v1.ChannelConnection.toObject(message.channelConnections[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } + object.logSeverity = options.enums === String ? "LOG_SEVERITY_UNSPECIFIED" : 0; + if (message.logSeverity != null && message.hasOwnProperty("logSeverity")) + object.logSeverity = options.enums === String ? $root.google.cloud.eventarc.v1.LoggingConfig.LogSeverity[message.logSeverity] === undefined ? message.logSeverity : $root.google.cloud.eventarc.v1.LoggingConfig.LogSeverity[message.logSeverity] : message.logSeverity; return object; }; /** - * Converts this ListChannelConnectionsResponse to JSON. + * Converts this LoggingConfig to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @memberof google.cloud.eventarc.v1.LoggingConfig * @instance * @returns {Object.} JSON object */ - ListChannelConnectionsResponse.prototype.toJSON = function toJSON() { + LoggingConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListChannelConnectionsResponse + * Gets the default type url for LoggingConfig * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.ListChannelConnectionsResponse + * @memberof google.cloud.eventarc.v1.LoggingConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListChannelConnectionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.ListChannelConnectionsResponse"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.LoggingConfig"; }; - return ListChannelConnectionsResponse; + /** + * LogSeverity enum. + * @name google.cloud.eventarc.v1.LoggingConfig.LogSeverity + * @enum {number} + * @property {number} LOG_SEVERITY_UNSPECIFIED=0 LOG_SEVERITY_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} DEBUG=2 DEBUG value + * @property {number} INFO=3 INFO value + * @property {number} NOTICE=4 NOTICE value + * @property {number} WARNING=5 WARNING value + * @property {number} ERROR=6 ERROR value + * @property {number} CRITICAL=7 CRITICAL value + * @property {number} ALERT=8 ALERT value + * @property {number} EMERGENCY=9 EMERGENCY value + */ + LoggingConfig.LogSeverity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "DEBUG"] = 2; + values[valuesById[3] = "INFO"] = 3; + values[valuesById[4] = "NOTICE"] = 4; + values[valuesById[5] = "WARNING"] = 5; + values[valuesById[6] = "ERROR"] = 6; + values[valuesById[7] = "CRITICAL"] = 7; + values[valuesById[8] = "ALERT"] = 8; + values[valuesById[9] = "EMERGENCY"] = 9; + return values; + })(); + + return LoggingConfig; })(); - v1.CreateChannelConnectionRequest = (function() { + v1.GoogleChannelConfig = (function() { /** - * Properties of a CreateChannelConnectionRequest. + * Properties of a GoogleChannelConfig. * @memberof google.cloud.eventarc.v1 - * @interface ICreateChannelConnectionRequest - * @property {string|null} [parent] CreateChannelConnectionRequest parent - * @property {google.cloud.eventarc.v1.IChannelConnection|null} [channelConnection] CreateChannelConnectionRequest channelConnection - * @property {string|null} [channelConnectionId] CreateChannelConnectionRequest channelConnectionId + * @interface IGoogleChannelConfig + * @property {string|null} [name] GoogleChannelConfig name + * @property {google.protobuf.ITimestamp|null} [updateTime] GoogleChannelConfig updateTime + * @property {string|null} [cryptoKeyName] GoogleChannelConfig cryptoKeyName */ /** - * Constructs a new CreateChannelConnectionRequest. + * Constructs a new GoogleChannelConfig. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a CreateChannelConnectionRequest. - * @implements ICreateChannelConnectionRequest + * @classdesc Represents a GoogleChannelConfig. + * @implements IGoogleChannelConfig * @constructor - * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IGoogleChannelConfig=} [properties] Properties to set */ - function CreateChannelConnectionRequest(properties) { + function GoogleChannelConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7033,103 +17343,103 @@ } /** - * CreateChannelConnectionRequest parent. - * @member {string} parent - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * GoogleChannelConfig name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @instance */ - CreateChannelConnectionRequest.prototype.parent = ""; + GoogleChannelConfig.prototype.name = ""; /** - * CreateChannelConnectionRequest channelConnection. - * @member {google.cloud.eventarc.v1.IChannelConnection|null|undefined} channelConnection - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * GoogleChannelConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @instance */ - CreateChannelConnectionRequest.prototype.channelConnection = null; + GoogleChannelConfig.prototype.updateTime = null; /** - * CreateChannelConnectionRequest channelConnectionId. - * @member {string} channelConnectionId - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * GoogleChannelConfig cryptoKeyName. + * @member {string} cryptoKeyName + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @instance */ - CreateChannelConnectionRequest.prototype.channelConnectionId = ""; + GoogleChannelConfig.prototype.cryptoKeyName = ""; /** - * Creates a new CreateChannelConnectionRequest instance using the specified properties. + * Creates a new GoogleChannelConfig instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @static - * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.CreateChannelConnectionRequest} CreateChannelConnectionRequest instance + * @param {google.cloud.eventarc.v1.IGoogleChannelConfig=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GoogleChannelConfig} GoogleChannelConfig instance */ - CreateChannelConnectionRequest.create = function create(properties) { - return new CreateChannelConnectionRequest(properties); + GoogleChannelConfig.create = function create(properties) { + return new GoogleChannelConfig(properties); }; /** - * Encodes the specified CreateChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelConnectionRequest.verify|verify} messages. + * Encodes the specified GoogleChannelConfig message. Does not implicitly {@link google.cloud.eventarc.v1.GoogleChannelConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @static - * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest} message CreateChannelConnectionRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IGoogleChannelConfig} message GoogleChannelConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateChannelConnectionRequest.encode = function encode(message, writer) { + GoogleChannelConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.channelConnection != null && Object.hasOwnProperty.call(message, "channelConnection")) - $root.google.cloud.eventarc.v1.ChannelConnection.encode(message.channelConnection, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.channelConnectionId != null && Object.hasOwnProperty.call(message, "channelConnectionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.channelConnectionId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.cryptoKeyName != null && Object.hasOwnProperty.call(message, "cryptoKeyName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.cryptoKeyName); return writer; }; /** - * Encodes the specified CreateChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CreateChannelConnectionRequest.verify|verify} messages. + * Encodes the specified GoogleChannelConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GoogleChannelConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @static - * @param {google.cloud.eventarc.v1.ICreateChannelConnectionRequest} message CreateChannelConnectionRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IGoogleChannelConfig} message GoogleChannelConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateChannelConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + GoogleChannelConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateChannelConnectionRequest message from the specified reader or buffer. + * Decodes a GoogleChannelConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.CreateChannelConnectionRequest} CreateChannelConnectionRequest + * @returns {google.cloud.eventarc.v1.GoogleChannelConfig} GoogleChannelConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateChannelConnectionRequest.decode = function decode(reader, length) { + GoogleChannelConfig.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.eventarc.v1.CreateChannelConnectionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.GoogleChannelConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } - case 2: { - message.channelConnection = $root.google.cloud.eventarc.v1.ChannelConnection.decode(reader, reader.uint32()); + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 3: { - message.channelConnectionId = reader.string(); + case 7: { + message.cryptoKeyName = reader.string(); break; } default: @@ -7141,144 +17451,155 @@ }; /** - * Decodes a CreateChannelConnectionRequest message from the specified reader or buffer, length delimited. + * Decodes a GoogleChannelConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.CreateChannelConnectionRequest} CreateChannelConnectionRequest + * @returns {google.cloud.eventarc.v1.GoogleChannelConfig} GoogleChannelConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateChannelConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + GoogleChannelConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateChannelConnectionRequest message. + * Verifies a GoogleChannelConfig message. * @function verify - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateChannelConnectionRequest.verify = function verify(message) { + GoogleChannelConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.channelConnection != null && message.hasOwnProperty("channelConnection")) { - var error = $root.google.cloud.eventarc.v1.ChannelConnection.verify(message.channelConnection); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "channelConnection." + error; + return "updateTime." + error; } - if (message.channelConnectionId != null && message.hasOwnProperty("channelConnectionId")) - if (!$util.isString(message.channelConnectionId)) - return "channelConnectionId: string expected"; + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + if (!$util.isString(message.cryptoKeyName)) + return "cryptoKeyName: string expected"; return null; }; /** - * Creates a CreateChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GoogleChannelConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.CreateChannelConnectionRequest} CreateChannelConnectionRequest + * @returns {google.cloud.eventarc.v1.GoogleChannelConfig} GoogleChannelConfig */ - CreateChannelConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.CreateChannelConnectionRequest) + GoogleChannelConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GoogleChannelConfig) return object; - var message = new $root.google.cloud.eventarc.v1.CreateChannelConnectionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.channelConnection != null) { - if (typeof object.channelConnection !== "object") - throw TypeError(".google.cloud.eventarc.v1.CreateChannelConnectionRequest.channelConnection: object expected"); - message.channelConnection = $root.google.cloud.eventarc.v1.ChannelConnection.fromObject(object.channelConnection); + var message = new $root.google.cloud.eventarc.v1.GoogleChannelConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.eventarc.v1.GoogleChannelConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.channelConnectionId != null) - message.channelConnectionId = String(object.channelConnectionId); + if (object.cryptoKeyName != null) + message.cryptoKeyName = String(object.cryptoKeyName); return message; }; /** - * Creates a plain object from a CreateChannelConnectionRequest message. Also converts values to other types if specified. + * Creates a plain object from a GoogleChannelConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @static - * @param {google.cloud.eventarc.v1.CreateChannelConnectionRequest} message CreateChannelConnectionRequest + * @param {google.cloud.eventarc.v1.GoogleChannelConfig} message GoogleChannelConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateChannelConnectionRequest.toObject = function toObject(message, options) { + GoogleChannelConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.channelConnection = null; - object.channelConnectionId = ""; + object.name = ""; + object.updateTime = null; + object.cryptoKeyName = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.channelConnection != null && message.hasOwnProperty("channelConnection")) - object.channelConnection = $root.google.cloud.eventarc.v1.ChannelConnection.toObject(message.channelConnection, options); - if (message.channelConnectionId != null && message.hasOwnProperty("channelConnectionId")) - object.channelConnectionId = message.channelConnectionId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + object.cryptoKeyName = message.cryptoKeyName; return object; }; /** - * Converts this CreateChannelConnectionRequest to JSON. + * Converts this GoogleChannelConfig to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @instance * @returns {Object.} JSON object */ - CreateChannelConnectionRequest.prototype.toJSON = function toJSON() { + GoogleChannelConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateChannelConnectionRequest + * Gets the default type url for GoogleChannelConfig * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.CreateChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.GoogleChannelConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateChannelConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GoogleChannelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.CreateChannelConnectionRequest"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.GoogleChannelConfig"; }; - return CreateChannelConnectionRequest; + return GoogleChannelConfig; })(); - v1.DeleteChannelConnectionRequest = (function() { + v1.MessageBus = (function() { /** - * Properties of a DeleteChannelConnectionRequest. + * Properties of a MessageBus. * @memberof google.cloud.eventarc.v1 - * @interface IDeleteChannelConnectionRequest - * @property {string|null} [name] DeleteChannelConnectionRequest name + * @interface IMessageBus + * @property {string|null} [name] MessageBus name + * @property {string|null} [uid] MessageBus uid + * @property {string|null} [etag] MessageBus etag + * @property {google.protobuf.ITimestamp|null} [createTime] MessageBus createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MessageBus updateTime + * @property {Object.|null} [labels] MessageBus labels + * @property {Object.|null} [annotations] MessageBus annotations + * @property {string|null} [displayName] MessageBus displayName + * @property {string|null} [cryptoKeyName] MessageBus cryptoKeyName + * @property {google.cloud.eventarc.v1.ILoggingConfig|null} [loggingConfig] MessageBus loggingConfig */ /** - * Constructs a new DeleteChannelConnectionRequest. + * Constructs a new MessageBus. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a DeleteChannelConnectionRequest. - * @implements IDeleteChannelConnectionRequest + * @classdesc Represents a MessageBus. + * @implements IMessageBus * @constructor - * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IMessageBus=} [properties] Properties to set */ - function DeleteChannelConnectionRequest(properties) { + function MessageBus(properties) { + this.labels = {}; + this.annotations = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7286,70 +17607,162 @@ } /** - * DeleteChannelConnectionRequest name. + * MessageBus name. * @member {string} name - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.MessageBus * @instance */ - DeleteChannelConnectionRequest.prototype.name = ""; + MessageBus.prototype.name = ""; /** - * Creates a new DeleteChannelConnectionRequest instance using the specified properties. + * MessageBus uid. + * @member {string} uid + * @memberof google.cloud.eventarc.v1.MessageBus + * @instance + */ + MessageBus.prototype.uid = ""; + + /** + * MessageBus etag. + * @member {string} etag + * @memberof google.cloud.eventarc.v1.MessageBus + * @instance + */ + MessageBus.prototype.etag = ""; + + /** + * MessageBus createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.eventarc.v1.MessageBus + * @instance + */ + MessageBus.prototype.createTime = null; + + /** + * MessageBus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.eventarc.v1.MessageBus + * @instance + */ + MessageBus.prototype.updateTime = null; + + /** + * MessageBus labels. + * @member {Object.} labels + * @memberof google.cloud.eventarc.v1.MessageBus + * @instance + */ + MessageBus.prototype.labels = $util.emptyObject; + + /** + * MessageBus annotations. + * @member {Object.} annotations + * @memberof google.cloud.eventarc.v1.MessageBus + * @instance + */ + MessageBus.prototype.annotations = $util.emptyObject; + + /** + * MessageBus displayName. + * @member {string} displayName + * @memberof google.cloud.eventarc.v1.MessageBus + * @instance + */ + MessageBus.prototype.displayName = ""; + + /** + * MessageBus cryptoKeyName. + * @member {string} cryptoKeyName + * @memberof google.cloud.eventarc.v1.MessageBus + * @instance + */ + MessageBus.prototype.cryptoKeyName = ""; + + /** + * MessageBus loggingConfig. + * @member {google.cloud.eventarc.v1.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.cloud.eventarc.v1.MessageBus + * @instance + */ + MessageBus.prototype.loggingConfig = null; + + /** + * Creates a new MessageBus instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.MessageBus * @static - * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.DeleteChannelConnectionRequest} DeleteChannelConnectionRequest instance + * @param {google.cloud.eventarc.v1.IMessageBus=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.MessageBus} MessageBus instance */ - DeleteChannelConnectionRequest.create = function create(properties) { - return new DeleteChannelConnectionRequest(properties); + MessageBus.create = function create(properties) { + return new MessageBus(properties); }; /** - * Encodes the specified DeleteChannelConnectionRequest message. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelConnectionRequest.verify|verify} messages. + * Encodes the specified MessageBus message. Does not implicitly {@link google.cloud.eventarc.v1.MessageBus.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.MessageBus * @static - * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest} message DeleteChannelConnectionRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IMessageBus} message MessageBus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteChannelConnectionRequest.encode = function encode(message, writer) { + MessageBus.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.etag); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.displayName); + if (message.cryptoKeyName != null && Object.hasOwnProperty.call(message, "cryptoKeyName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.cryptoKeyName); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.cloud.eventarc.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteChannelConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.DeleteChannelConnectionRequest.verify|verify} messages. + * Encodes the specified MessageBus message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.MessageBus.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.MessageBus * @static - * @param {google.cloud.eventarc.v1.IDeleteChannelConnectionRequest} message DeleteChannelConnectionRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IMessageBus} message MessageBus message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteChannelConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + MessageBus.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteChannelConnectionRequest message from the specified reader or buffer. + * Decodes a MessageBus message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.MessageBus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.DeleteChannelConnectionRequest} DeleteChannelConnectionRequest + * @returns {google.cloud.eventarc.v1.MessageBus} MessageBus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteChannelConnectionRequest.decode = function decode(reader, length) { + MessageBus.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.eventarc.v1.DeleteChannelConnectionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.MessageBus(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -7357,6 +17770,80 @@ message.name = reader.string(); break; } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.etag = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + 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 7: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + case 8: { + message.displayName = reader.string(); + break; + } + case 10: { + message.cryptoKeyName = reader.string(); + break; + } + case 11: { + message.loggingConfig = $root.google.cloud.eventarc.v1.LoggingConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7366,213 +17853,560 @@ }; /** - * Decodes a DeleteChannelConnectionRequest message from the specified reader or buffer, length delimited. + * Decodes a MessageBus message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.MessageBus * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.DeleteChannelConnectionRequest} DeleteChannelConnectionRequest + * @returns {google.cloud.eventarc.v1.MessageBus} MessageBus * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteChannelConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + MessageBus.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteChannelConnectionRequest message. + * Verifies a MessageBus message. * @function verify - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.MessageBus * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteChannelConnectionRequest.verify = function verify(message) { + MessageBus.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: 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.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + if (!$util.isString(message.cryptoKeyName)) + return "cryptoKeyName: string expected"; + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.cloud.eventarc.v1.LoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } return null; }; /** - * Creates a DeleteChannelConnectionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MessageBus message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.MessageBus * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.DeleteChannelConnectionRequest} DeleteChannelConnectionRequest + * @returns {google.cloud.eventarc.v1.MessageBus} MessageBus */ - DeleteChannelConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.DeleteChannelConnectionRequest) + MessageBus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.MessageBus) return object; - var message = new $root.google.cloud.eventarc.v1.DeleteChannelConnectionRequest(); + var message = new $root.google.cloud.eventarc.v1.MessageBus(); if (object.name != null) message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.etag != null) + message.etag = String(object.etag); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.eventarc.v1.MessageBus.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.eventarc.v1.MessageBus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.eventarc.v1.MessageBus.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.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.eventarc.v1.MessageBus.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.cryptoKeyName != null) + message.cryptoKeyName = String(object.cryptoKeyName); + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.cloud.eventarc.v1.MessageBus.loggingConfig: object expected"); + message.loggingConfig = $root.google.cloud.eventarc.v1.LoggingConfig.fromObject(object.loggingConfig); + } return message; }; /** - * Creates a plain object from a DeleteChannelConnectionRequest message. Also converts values to other types if specified. + * Creates a plain object from a MessageBus message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.MessageBus * @static - * @param {google.cloud.eventarc.v1.DeleteChannelConnectionRequest} message DeleteChannelConnectionRequest + * @param {google.cloud.eventarc.v1.MessageBus} message MessageBus * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteChannelConnectionRequest.toObject = function toObject(message, options) { + MessageBus.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { object.name = ""; + object.uid = ""; + object.etag = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.cryptoKeyName = ""; + object.loggingConfig = null; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + 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.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + object.cryptoKeyName = message.cryptoKeyName; + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.cloud.eventarc.v1.LoggingConfig.toObject(message.loggingConfig, options); return object; }; /** - * Converts this DeleteChannelConnectionRequest to JSON. + * Converts this MessageBus to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest + * @memberof google.cloud.eventarc.v1.MessageBus * @instance * @returns {Object.} JSON object */ - DeleteChannelConnectionRequest.prototype.toJSON = function toJSON() { + MessageBus.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteChannelConnectionRequest - * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.DeleteChannelConnectionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Gets the default type url for MessageBus + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.MessageBus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageBus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.MessageBus"; + }; + + return MessageBus; + })(); + + v1.Pipeline = (function() { + + /** + * Properties of a Pipeline. + * @memberof google.cloud.eventarc.v1 + * @interface IPipeline + * @property {string|null} [name] Pipeline name + * @property {google.protobuf.ITimestamp|null} [createTime] Pipeline createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Pipeline updateTime + * @property {Object.|null} [labels] Pipeline labels + * @property {string|null} [uid] Pipeline uid + * @property {Object.|null} [annotations] Pipeline annotations + * @property {string|null} [displayName] Pipeline displayName + * @property {Array.|null} [destinations] Pipeline destinations + * @property {Array.|null} [mediations] Pipeline mediations + * @property {string|null} [cryptoKeyName] Pipeline cryptoKeyName + * @property {google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat|null} [inputPayloadFormat] Pipeline inputPayloadFormat + * @property {google.cloud.eventarc.v1.ILoggingConfig|null} [loggingConfig] Pipeline loggingConfig + * @property {google.cloud.eventarc.v1.Pipeline.IRetryPolicy|null} [retryPolicy] Pipeline retryPolicy + * @property {string|null} [etag] Pipeline etag + */ + + /** + * Constructs a new Pipeline. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a Pipeline. + * @implements IPipeline + * @constructor + * @param {google.cloud.eventarc.v1.IPipeline=} [properties] Properties to set + */ + function Pipeline(properties) { + this.labels = {}; + this.annotations = {}; + this.destinations = []; + this.mediations = []; + 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]]; + } + + /** + * Pipeline name. + * @member {string} name + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance + */ + Pipeline.prototype.name = ""; + + /** + * Pipeline createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance + */ + Pipeline.prototype.createTime = null; + + /** + * Pipeline updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance + */ + Pipeline.prototype.updateTime = null; + + /** + * Pipeline labels. + * @member {Object.} labels + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance + */ + Pipeline.prototype.labels = $util.emptyObject; + + /** + * Pipeline uid. + * @member {string} uid + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance + */ + Pipeline.prototype.uid = ""; + + /** + * Pipeline annotations. + * @member {Object.} annotations + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance + */ + Pipeline.prototype.annotations = $util.emptyObject; + + /** + * Pipeline displayName. + * @member {string} displayName + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance + */ + Pipeline.prototype.displayName = ""; + + /** + * Pipeline destinations. + * @member {Array.} destinations + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance */ - DeleteChannelConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.v1.DeleteChannelConnectionRequest"; - }; + Pipeline.prototype.destinations = $util.emptyArray; - return DeleteChannelConnectionRequest; - })(); + /** + * Pipeline mediations. + * @member {Array.} mediations + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance + */ + Pipeline.prototype.mediations = $util.emptyArray; - v1.UpdateGoogleChannelConfigRequest = (function() { + /** + * Pipeline cryptoKeyName. + * @member {string} cryptoKeyName + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance + */ + Pipeline.prototype.cryptoKeyName = ""; /** - * Properties of an UpdateGoogleChannelConfigRequest. - * @memberof google.cloud.eventarc.v1 - * @interface IUpdateGoogleChannelConfigRequest - * @property {google.cloud.eventarc.v1.IGoogleChannelConfig|null} [googleChannelConfig] UpdateGoogleChannelConfigRequest googleChannelConfig - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGoogleChannelConfigRequest updateMask + * Pipeline inputPayloadFormat. + * @member {google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat|null|undefined} inputPayloadFormat + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance */ + Pipeline.prototype.inputPayloadFormat = null; /** - * Constructs a new UpdateGoogleChannelConfigRequest. - * @memberof google.cloud.eventarc.v1 - * @classdesc Represents an UpdateGoogleChannelConfigRequest. - * @implements IUpdateGoogleChannelConfigRequest - * @constructor - * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest=} [properties] Properties to set + * Pipeline loggingConfig. + * @member {google.cloud.eventarc.v1.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.cloud.eventarc.v1.Pipeline + * @instance */ - function UpdateGoogleChannelConfigRequest(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]]; - } + Pipeline.prototype.loggingConfig = null; /** - * UpdateGoogleChannelConfigRequest googleChannelConfig. - * @member {google.cloud.eventarc.v1.IGoogleChannelConfig|null|undefined} googleChannelConfig - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * Pipeline retryPolicy. + * @member {google.cloud.eventarc.v1.Pipeline.IRetryPolicy|null|undefined} retryPolicy + * @memberof google.cloud.eventarc.v1.Pipeline * @instance */ - UpdateGoogleChannelConfigRequest.prototype.googleChannelConfig = null; + Pipeline.prototype.retryPolicy = null; /** - * UpdateGoogleChannelConfigRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * Pipeline etag. + * @member {string} etag + * @memberof google.cloud.eventarc.v1.Pipeline * @instance */ - UpdateGoogleChannelConfigRequest.prototype.updateMask = null; + Pipeline.prototype.etag = ""; /** - * Creates a new UpdateGoogleChannelConfigRequest instance using the specified properties. + * Creates a new Pipeline instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @memberof google.cloud.eventarc.v1.Pipeline * @static - * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest} UpdateGoogleChannelConfigRequest instance + * @param {google.cloud.eventarc.v1.IPipeline=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline} Pipeline instance */ - UpdateGoogleChannelConfigRequest.create = function create(properties) { - return new UpdateGoogleChannelConfigRequest(properties); + Pipeline.create = function create(properties) { + return new Pipeline(properties); }; /** - * Encodes the specified UpdateGoogleChannelConfigRequest message. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.verify|verify} messages. + * Encodes the specified Pipeline message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @memberof google.cloud.eventarc.v1.Pipeline * @static - * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest} message UpdateGoogleChannelConfigRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IPipeline} message Pipeline message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateGoogleChannelConfigRequest.encode = function encode(message, writer) { + Pipeline.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.googleChannelConfig != null && Object.hasOwnProperty.call(message, "googleChannelConfig")) - $root.google.cloud.eventarc.v1.GoogleChannelConfig.encode(message.googleChannelConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.uid); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), 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.annotations[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.destinations != null && message.destinations.length) + for (var i = 0; i < message.destinations.length; ++i) + $root.google.cloud.eventarc.v1.Pipeline.Destination.encode(message.destinations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.mediations != null && message.mediations.length) + for (var i = 0; i < message.mediations.length; ++i) + $root.google.cloud.eventarc.v1.Pipeline.Mediation.encode(message.mediations[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.cryptoKeyName != null && Object.hasOwnProperty.call(message, "cryptoKeyName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.cryptoKeyName); + if (message.inputPayloadFormat != null && Object.hasOwnProperty.call(message, "inputPayloadFormat")) + $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.encode(message.inputPayloadFormat, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.cloud.eventarc.v1.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.retryPolicy != null && Object.hasOwnProperty.call(message, "retryPolicy")) + $root.google.cloud.eventarc.v1.Pipeline.RetryPolicy.encode(message.retryPolicy, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 99, wireType 2 =*/794).string(message.etag); return writer; }; /** - * Encodes the specified UpdateGoogleChannelConfigRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.verify|verify} messages. + * Encodes the specified Pipeline message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @memberof google.cloud.eventarc.v1.Pipeline * @static - * @param {google.cloud.eventarc.v1.IUpdateGoogleChannelConfigRequest} message UpdateGoogleChannelConfigRequest message or plain object to encode + * @param {google.cloud.eventarc.v1.IPipeline} message Pipeline message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateGoogleChannelConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + Pipeline.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateGoogleChannelConfigRequest message from the specified reader or buffer. + * Decodes a Pipeline message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @memberof google.cloud.eventarc.v1.Pipeline * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest} UpdateGoogleChannelConfigRequest + * @returns {google.cloud.eventarc.v1.Pipeline} Pipeline * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateGoogleChannelConfigRequest.decode = function decode(reader, length) { + Pipeline.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.eventarc.v1.UpdateGoogleChannelConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.Pipeline(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.googleChannelConfig = $root.google.cloud.eventarc.v1.GoogleChannelConfig.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.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.uid = reader.string(); + break; + } + case 6: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + case 7: { + message.displayName = reader.string(); + break; + } + case 8: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + message.destinations.push($root.google.cloud.eventarc.v1.Pipeline.Destination.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.mediations && message.mediations.length)) + message.mediations = []; + message.mediations.push($root.google.cloud.eventarc.v1.Pipeline.Mediation.decode(reader, reader.uint32())); + break; + } + case 10: { + message.cryptoKeyName = reader.string(); + break; + } + case 11: { + message.inputPayloadFormat = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.decode(reader, reader.uint32()); + break; + } + case 12: { + message.loggingConfig = $root.google.cloud.eventarc.v1.LoggingConfig.decode(reader, reader.uint32()); + break; + } + case 13: { + message.retryPolicy = $root.google.cloud.eventarc.v1.Pipeline.RetryPolicy.decode(reader, reader.uint32()); + break; + } + case 99: { + message.etag = reader.string(); break; } default: @@ -7584,141 +18418,3447 @@ }; /** - * Decodes an UpdateGoogleChannelConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a Pipeline message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @memberof google.cloud.eventarc.v1.Pipeline * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest} UpdateGoogleChannelConfigRequest + * @returns {google.cloud.eventarc.v1.Pipeline} Pipeline * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateGoogleChannelConfigRequest.decodeDelimited = function decodeDelimited(reader) { + Pipeline.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateGoogleChannelConfigRequest message. + * Verifies a Pipeline message. * @function verify - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @memberof google.cloud.eventarc.v1.Pipeline * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateGoogleChannelConfigRequest.verify = function verify(message) { + Pipeline.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.googleChannelConfig != null && message.hasOwnProperty("googleChannelConfig")) { - var error = $root.google.cloud.eventarc.v1.GoogleChannelConfig.verify(message.googleChannelConfig); + 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 "googleChannelConfig." + 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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) { + var error = $root.google.cloud.eventarc.v1.Pipeline.Destination.verify(message.destinations[i]); + if (error) + return "destinations." + error; + } + } + if (message.mediations != null && message.hasOwnProperty("mediations")) { + if (!Array.isArray(message.mediations)) + return "mediations: array expected"; + for (var i = 0; i < message.mediations.length; ++i) { + var error = $root.google.cloud.eventarc.v1.Pipeline.Mediation.verify(message.mediations[i]); + if (error) + return "mediations." + error; + } + } + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + if (!$util.isString(message.cryptoKeyName)) + return "cryptoKeyName: string expected"; + if (message.inputPayloadFormat != null && message.hasOwnProperty("inputPayloadFormat")) { + var error = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.verify(message.inputPayloadFormat); + if (error) + return "inputPayloadFormat." + error; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.cloud.eventarc.v1.LoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.retryPolicy != null && message.hasOwnProperty("retryPolicy")) { + var error = $root.google.cloud.eventarc.v1.Pipeline.RetryPolicy.verify(message.retryPolicy); + if (error) + return "retryPolicy." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a Pipeline message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline} Pipeline + */ + Pipeline.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.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.eventarc.v1.Pipeline.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.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.uid != null) + message.uid = String(object.uid); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.cloud.eventarc.v1.Pipeline.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) { + if (typeof object.destinations[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.destinations: object expected"); + message.destinations[i] = $root.google.cloud.eventarc.v1.Pipeline.Destination.fromObject(object.destinations[i]); + } + } + if (object.mediations) { + if (!Array.isArray(object.mediations)) + throw TypeError(".google.cloud.eventarc.v1.Pipeline.mediations: array expected"); + message.mediations = []; + for (var i = 0; i < object.mediations.length; ++i) { + if (typeof object.mediations[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.mediations: object expected"); + message.mediations[i] = $root.google.cloud.eventarc.v1.Pipeline.Mediation.fromObject(object.mediations[i]); + } } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (object.cryptoKeyName != null) + message.cryptoKeyName = String(object.cryptoKeyName); + if (object.inputPayloadFormat != null) { + if (typeof object.inputPayloadFormat !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.inputPayloadFormat: object expected"); + message.inputPayloadFormat = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.fromObject(object.inputPayloadFormat); } - return null; - }; - - /** - * Creates an UpdateGoogleChannelConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest} UpdateGoogleChannelConfigRequest - */ - UpdateGoogleChannelConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest) - return object; - var message = new $root.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest(); - if (object.googleChannelConfig != null) { - if (typeof object.googleChannelConfig !== "object") - throw TypeError(".google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.googleChannelConfig: object expected"); - message.googleChannelConfig = $root.google.cloud.eventarc.v1.GoogleChannelConfig.fromObject(object.googleChannelConfig); + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.loggingConfig: object expected"); + message.loggingConfig = $root.google.cloud.eventarc.v1.LoggingConfig.fromObject(object.loggingConfig); } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.retryPolicy != null) { + if (typeof object.retryPolicy !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.retryPolicy: object expected"); + message.retryPolicy = $root.google.cloud.eventarc.v1.Pipeline.RetryPolicy.fromObject(object.retryPolicy); } + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from an UpdateGoogleChannelConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a Pipeline message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @memberof google.cloud.eventarc.v1.Pipeline * @static - * @param {google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest} message UpdateGoogleChannelConfigRequest + * @param {google.cloud.eventarc.v1.Pipeline} message Pipeline * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateGoogleChannelConfigRequest.toObject = function toObject(message, options) { + Pipeline.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.destinations = []; + object.mediations = []; + } + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } if (options.defaults) { - object.googleChannelConfig = null; - object.updateMask = null; + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.uid = ""; + object.displayName = ""; + object.cryptoKeyName = ""; + object.inputPayloadFormat = null; + object.loggingConfig = null; + object.retryPolicy = null; + object.etag = ""; } - if (message.googleChannelConfig != null && message.hasOwnProperty("googleChannelConfig")) - object.googleChannelConfig = $root.google.cloud.eventarc.v1.GoogleChannelConfig.toObject(message.googleChannelConfig, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + 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.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = $root.google.cloud.eventarc.v1.Pipeline.Destination.toObject(message.destinations[j], options); + } + if (message.mediations && message.mediations.length) { + object.mediations = []; + for (var j = 0; j < message.mediations.length; ++j) + object.mediations[j] = $root.google.cloud.eventarc.v1.Pipeline.Mediation.toObject(message.mediations[j], options); + } + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + object.cryptoKeyName = message.cryptoKeyName; + if (message.inputPayloadFormat != null && message.hasOwnProperty("inputPayloadFormat")) + object.inputPayloadFormat = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.toObject(message.inputPayloadFormat, options); + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.cloud.eventarc.v1.LoggingConfig.toObject(message.loggingConfig, options); + if (message.retryPolicy != null && message.hasOwnProperty("retryPolicy")) + object.retryPolicy = $root.google.cloud.eventarc.v1.Pipeline.RetryPolicy.toObject(message.retryPolicy, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; return object; }; /** - * Converts this UpdateGoogleChannelConfigRequest to JSON. + * Converts this Pipeline to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @memberof google.cloud.eventarc.v1.Pipeline * @instance * @returns {Object.} JSON object */ - UpdateGoogleChannelConfigRequest.prototype.toJSON = function toJSON() { + Pipeline.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateGoogleChannelConfigRequest + * Gets the default type url for Pipeline * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + * @memberof google.cloud.eventarc.v1.Pipeline * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateGoogleChannelConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Pipeline.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest"; - }; + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline"; + }; + + Pipeline.MessagePayloadFormat = (function() { + + /** + * Properties of a MessagePayloadFormat. + * @memberof google.cloud.eventarc.v1.Pipeline + * @interface IMessagePayloadFormat + * @property {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat|null} [protobuf] MessagePayloadFormat protobuf + * @property {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat|null} [avro] MessagePayloadFormat avro + * @property {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat|null} [json] MessagePayloadFormat json + */ + + /** + * Constructs a new MessagePayloadFormat. + * @memberof google.cloud.eventarc.v1.Pipeline + * @classdesc Represents a MessagePayloadFormat. + * @implements IMessagePayloadFormat + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat=} [properties] Properties to set + */ + function MessagePayloadFormat(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]]; + } + + /** + * MessagePayloadFormat protobuf. + * @member {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat|null|undefined} protobuf + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @instance + */ + MessagePayloadFormat.prototype.protobuf = null; + + /** + * MessagePayloadFormat avro. + * @member {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat|null|undefined} avro + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @instance + */ + MessagePayloadFormat.prototype.avro = null; + + /** + * MessagePayloadFormat json. + * @member {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat|null|undefined} json + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @instance + */ + MessagePayloadFormat.prototype.json = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MessagePayloadFormat kind. + * @member {"protobuf"|"avro"|"json"|undefined} kind + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @instance + */ + Object.defineProperty(MessagePayloadFormat.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["protobuf", "avro", "json"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MessagePayloadFormat instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat} MessagePayloadFormat instance + */ + MessagePayloadFormat.create = function create(properties) { + return new MessagePayloadFormat(properties); + }; + + /** + * Encodes the specified MessagePayloadFormat message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat} message MessagePayloadFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessagePayloadFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protobuf != null && Object.hasOwnProperty.call(message, "protobuf")) + $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat.encode(message.protobuf, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.avro != null && Object.hasOwnProperty.call(message, "avro")) + $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat.encode(message.avro, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.json != null && Object.hasOwnProperty.call(message, "json")) + $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat.encode(message.json, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessagePayloadFormat message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat} message MessagePayloadFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessagePayloadFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessagePayloadFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat} MessagePayloadFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessagePayloadFormat.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.eventarc.v1.Pipeline.MessagePayloadFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.protobuf = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat.decode(reader, reader.uint32()); + break; + } + case 2: { + message.avro = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat.decode(reader, reader.uint32()); + break; + } + case 3: { + message.json = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessagePayloadFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat} MessagePayloadFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessagePayloadFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessagePayloadFormat message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessagePayloadFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.protobuf != null && message.hasOwnProperty("protobuf")) { + properties.kind = 1; + { + var error = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat.verify(message.protobuf); + if (error) + return "protobuf." + error; + } + } + if (message.avro != null && message.hasOwnProperty("avro")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat.verify(message.avro); + if (error) + return "avro." + error; + } + } + if (message.json != null && message.hasOwnProperty("json")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat.verify(message.json); + if (error) + return "json." + error; + } + } + return null; + }; + + /** + * Creates a MessagePayloadFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat} MessagePayloadFormat + */ + MessagePayloadFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat(); + if (object.protobuf != null) { + if (typeof object.protobuf !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.protobuf: object expected"); + message.protobuf = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat.fromObject(object.protobuf); + } + if (object.avro != null) { + if (typeof object.avro !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.avro: object expected"); + message.avro = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat.fromObject(object.avro); + } + if (object.json != null) { + if (typeof object.json !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.json: object expected"); + message.json = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat.fromObject(object.json); + } + return message; + }; + + /** + * Creates a plain object from a MessagePayloadFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat} message MessagePayloadFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessagePayloadFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.protobuf != null && message.hasOwnProperty("protobuf")) { + object.protobuf = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat.toObject(message.protobuf, options); + if (options.oneofs) + object.kind = "protobuf"; + } + if (message.avro != null && message.hasOwnProperty("avro")) { + object.avro = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat.toObject(message.avro, options); + if (options.oneofs) + object.kind = "avro"; + } + if (message.json != null && message.hasOwnProperty("json")) { + object.json = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat.toObject(message.json, options); + if (options.oneofs) + object.kind = "json"; + } + return object; + }; + + /** + * Converts this MessagePayloadFormat to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @instance + * @returns {Object.} JSON object + */ + MessagePayloadFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessagePayloadFormat + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessagePayloadFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat"; + }; + + MessagePayloadFormat.JsonFormat = (function() { + + /** + * Properties of a JsonFormat. + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @interface IJsonFormat + */ + + /** + * Constructs a new JsonFormat. + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @classdesc Represents a JsonFormat. + * @implements IJsonFormat + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat=} [properties] Properties to set + */ + function JsonFormat(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 JsonFormat instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat} JsonFormat instance + */ + JsonFormat.create = function create(properties) { + return new JsonFormat(properties); + }; + + /** + * Encodes the specified JsonFormat message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat} message JsonFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified JsonFormat message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IJsonFormat} message JsonFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JsonFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JsonFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat} JsonFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonFormat.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.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JsonFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat} JsonFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JsonFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JsonFormat message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JsonFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a JsonFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat} JsonFormat + */ + JsonFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat) + return object; + return new $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat(); + }; + + /** + * Creates a plain object from a JsonFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat} message JsonFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JsonFormat.toObject = function toObject() { + return {}; + }; + + /** + * Converts this JsonFormat to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat + * @instance + * @returns {Object.} JSON object + */ + JsonFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JsonFormat + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JsonFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormat"; + }; + + return JsonFormat; + })(); + + MessagePayloadFormat.ProtobufFormat = (function() { + + /** + * Properties of a ProtobufFormat. + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @interface IProtobufFormat + * @property {string|null} [schemaDefinition] ProtobufFormat schemaDefinition + */ + + /** + * Constructs a new ProtobufFormat. + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @classdesc Represents a ProtobufFormat. + * @implements IProtobufFormat + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat=} [properties] Properties to set + */ + function ProtobufFormat(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]]; + } + + /** + * ProtobufFormat schemaDefinition. + * @member {string} schemaDefinition + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @instance + */ + ProtobufFormat.prototype.schemaDefinition = ""; + + /** + * Creates a new ProtobufFormat instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat} ProtobufFormat instance + */ + ProtobufFormat.create = function create(properties) { + return new ProtobufFormat(properties); + }; + + /** + * Encodes the specified ProtobufFormat message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat} message ProtobufFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtobufFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schemaDefinition != null && Object.hasOwnProperty.call(message, "schemaDefinition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaDefinition); + return writer; + }; + + /** + * Encodes the specified ProtobufFormat message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IProtobufFormat} message ProtobufFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtobufFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProtobufFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat} ProtobufFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtobufFormat.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.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.schemaDefinition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProtobufFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat} ProtobufFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtobufFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtobufFormat message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtobufFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schemaDefinition != null && message.hasOwnProperty("schemaDefinition")) + if (!$util.isString(message.schemaDefinition)) + return "schemaDefinition: string expected"; + return null; + }; + + /** + * Creates a ProtobufFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat} ProtobufFormat + */ + ProtobufFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat(); + if (object.schemaDefinition != null) + message.schemaDefinition = String(object.schemaDefinition); + return message; + }; + + /** + * Creates a plain object from a ProtobufFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat} message ProtobufFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtobufFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.schemaDefinition = ""; + if (message.schemaDefinition != null && message.hasOwnProperty("schemaDefinition")) + object.schemaDefinition = message.schemaDefinition; + return object; + }; + + /** + * Converts this ProtobufFormat to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @instance + * @returns {Object.} JSON object + */ + ProtobufFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProtobufFormat + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtobufFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormat"; + }; + + return ProtobufFormat; + })(); + + MessagePayloadFormat.AvroFormat = (function() { + + /** + * Properties of an AvroFormat. + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @interface IAvroFormat + * @property {string|null} [schemaDefinition] AvroFormat schemaDefinition + */ + + /** + * Constructs a new AvroFormat. + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat + * @classdesc Represents an AvroFormat. + * @implements IAvroFormat + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat=} [properties] Properties to set + */ + function AvroFormat(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]]; + } + + /** + * AvroFormat schemaDefinition. + * @member {string} schemaDefinition + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @instance + */ + AvroFormat.prototype.schemaDefinition = ""; + + /** + * Creates a new AvroFormat instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat} AvroFormat instance + */ + AvroFormat.create = function create(properties) { + return new AvroFormat(properties); + }; + + /** + * Encodes the specified AvroFormat message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat} message AvroFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvroFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schemaDefinition != null && Object.hasOwnProperty.call(message, "schemaDefinition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schemaDefinition); + return writer; + }; + + /** + * Encodes the specified AvroFormat message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.IAvroFormat} message AvroFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AvroFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AvroFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat} AvroFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvroFormat.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.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.schemaDefinition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AvroFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat} AvroFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AvroFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AvroFormat message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AvroFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schemaDefinition != null && message.hasOwnProperty("schemaDefinition")) + if (!$util.isString(message.schemaDefinition)) + return "schemaDefinition: string expected"; + return null; + }; + + /** + * Creates an AvroFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat} AvroFormat + */ + AvroFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat(); + if (object.schemaDefinition != null) + message.schemaDefinition = String(object.schemaDefinition); + return message; + }; + + /** + * Creates a plain object from an AvroFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @static + * @param {google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat} message AvroFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AvroFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.schemaDefinition = ""; + if (message.schemaDefinition != null && message.hasOwnProperty("schemaDefinition")) + object.schemaDefinition = message.schemaDefinition; + return object; + }; + + /** + * Converts this AvroFormat to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @instance + * @returns {Object.} JSON object + */ + AvroFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AvroFormat + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AvroFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormat"; + }; + + return AvroFormat; + })(); + + return MessagePayloadFormat; + })(); + + Pipeline.Destination = (function() { + + /** + * Properties of a Destination. + * @memberof google.cloud.eventarc.v1.Pipeline + * @interface IDestination + * @property {google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig|null} [networkConfig] Destination networkConfig + * @property {google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint|null} [httpEndpoint] Destination httpEndpoint + * @property {string|null} [workflow] Destination workflow + * @property {string|null} [messageBus] Destination messageBus + * @property {string|null} [topic] Destination topic + * @property {google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig|null} [authenticationConfig] Destination authenticationConfig + * @property {google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat|null} [outputPayloadFormat] Destination outputPayloadFormat + */ + + /** + * Constructs a new Destination. + * @memberof google.cloud.eventarc.v1.Pipeline + * @classdesc Represents a Destination. + * @implements IDestination + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.IDestination=} [properties] Properties to set + */ + function Destination(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]]; + } + + /** + * Destination networkConfig. + * @member {google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig|null|undefined} networkConfig + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @instance + */ + Destination.prototype.networkConfig = null; + + /** + * Destination httpEndpoint. + * @member {google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint|null|undefined} httpEndpoint + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @instance + */ + Destination.prototype.httpEndpoint = null; + + /** + * Destination workflow. + * @member {string|null|undefined} workflow + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @instance + */ + Destination.prototype.workflow = null; + + /** + * Destination messageBus. + * @member {string|null|undefined} messageBus + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @instance + */ + Destination.prototype.messageBus = null; + + /** + * Destination topic. + * @member {string|null|undefined} topic + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @instance + */ + Destination.prototype.topic = null; + + /** + * Destination authenticationConfig. + * @member {google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig|null|undefined} authenticationConfig + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @instance + */ + Destination.prototype.authenticationConfig = null; + + /** + * Destination outputPayloadFormat. + * @member {google.cloud.eventarc.v1.Pipeline.IMessagePayloadFormat|null|undefined} outputPayloadFormat + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @instance + */ + Destination.prototype.outputPayloadFormat = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Destination destinationDescriptor. + * @member {"httpEndpoint"|"workflow"|"messageBus"|"topic"|undefined} destinationDescriptor + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @instance + */ + Object.defineProperty(Destination.prototype, "destinationDescriptor", { + get: $util.oneOfGetter($oneOfFields = ["httpEndpoint", "workflow", "messageBus", "topic"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Destination instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IDestination=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.Destination} Destination instance + */ + Destination.create = function create(properties) { + return new Destination(properties); + }; + + /** + * Encodes the specified Destination message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IDestination} message Destination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Destination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.httpEndpoint != null && Object.hasOwnProperty.call(message, "httpEndpoint")) + $root.google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint.encode(message.httpEndpoint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workflow); + if (message.messageBus != null && Object.hasOwnProperty.call(message, "messageBus")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.messageBus); + if (message.authenticationConfig != null && Object.hasOwnProperty.call(message, "authenticationConfig")) + $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.encode(message.authenticationConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.outputPayloadFormat != null && Object.hasOwnProperty.call(message, "outputPayloadFormat")) + $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.encode(message.outputPayloadFormat, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.topic); + return writer; + }; + + /** + * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IDestination} message Destination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Destination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Destination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.Destination} Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Destination.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.eventarc.v1.Pipeline.Destination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.networkConfig = $root.google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.httpEndpoint = $root.google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint.decode(reader, reader.uint32()); + break; + } + case 3: { + message.workflow = reader.string(); + break; + } + case 4: { + message.messageBus = reader.string(); + break; + } + case 8: { + message.topic = reader.string(); + break; + } + case 5: { + message.authenticationConfig = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.outputPayloadFormat = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Destination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.Destination} Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Destination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Destination message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Destination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + if (message.httpEndpoint != null && message.hasOwnProperty("httpEndpoint")) { + properties.destinationDescriptor = 1; + { + var error = $root.google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint.verify(message.httpEndpoint); + if (error) + return "httpEndpoint." + error; + } + } + if (message.workflow != null && message.hasOwnProperty("workflow")) { + if (properties.destinationDescriptor === 1) + return "destinationDescriptor: multiple values"; + properties.destinationDescriptor = 1; + if (!$util.isString(message.workflow)) + return "workflow: string expected"; + } + if (message.messageBus != null && message.hasOwnProperty("messageBus")) { + if (properties.destinationDescriptor === 1) + return "destinationDescriptor: multiple values"; + properties.destinationDescriptor = 1; + if (!$util.isString(message.messageBus)) + return "messageBus: string expected"; + } + if (message.topic != null && message.hasOwnProperty("topic")) { + if (properties.destinationDescriptor === 1) + return "destinationDescriptor: multiple values"; + properties.destinationDescriptor = 1; + if (!$util.isString(message.topic)) + return "topic: string expected"; + } + if (message.authenticationConfig != null && message.hasOwnProperty("authenticationConfig")) { + var error = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.verify(message.authenticationConfig); + if (error) + return "authenticationConfig." + error; + } + if (message.outputPayloadFormat != null && message.hasOwnProperty("outputPayloadFormat")) { + var error = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.verify(message.outputPayloadFormat); + if (error) + return "outputPayloadFormat." + error; + } + return null; + }; + + /** + * Creates a Destination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.Destination} Destination + */ + Destination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.Destination) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.Destination(); + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.Destination.networkConfig: object expected"); + message.networkConfig = $root.google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig.fromObject(object.networkConfig); + } + if (object.httpEndpoint != null) { + if (typeof object.httpEndpoint !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.Destination.httpEndpoint: object expected"); + message.httpEndpoint = $root.google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint.fromObject(object.httpEndpoint); + } + if (object.workflow != null) + message.workflow = String(object.workflow); + if (object.messageBus != null) + message.messageBus = String(object.messageBus); + if (object.topic != null) + message.topic = String(object.topic); + if (object.authenticationConfig != null) { + if (typeof object.authenticationConfig !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.Destination.authenticationConfig: object expected"); + message.authenticationConfig = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.fromObject(object.authenticationConfig); + } + if (object.outputPayloadFormat != null) { + if (typeof object.outputPayloadFormat !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.Destination.outputPayloadFormat: object expected"); + message.outputPayloadFormat = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.fromObject(object.outputPayloadFormat); + } + return message; + }; + + /** + * Creates a plain object from a Destination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination} message Destination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Destination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.networkConfig = null; + object.authenticationConfig = null; + object.outputPayloadFormat = null; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig.toObject(message.networkConfig, options); + if (message.httpEndpoint != null && message.hasOwnProperty("httpEndpoint")) { + object.httpEndpoint = $root.google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint.toObject(message.httpEndpoint, options); + if (options.oneofs) + object.destinationDescriptor = "httpEndpoint"; + } + if (message.workflow != null && message.hasOwnProperty("workflow")) { + object.workflow = message.workflow; + if (options.oneofs) + object.destinationDescriptor = "workflow"; + } + if (message.messageBus != null && message.hasOwnProperty("messageBus")) { + object.messageBus = message.messageBus; + if (options.oneofs) + object.destinationDescriptor = "messageBus"; + } + if (message.authenticationConfig != null && message.hasOwnProperty("authenticationConfig")) + object.authenticationConfig = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.toObject(message.authenticationConfig, options); + if (message.outputPayloadFormat != null && message.hasOwnProperty("outputPayloadFormat")) + object.outputPayloadFormat = $root.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.toObject(message.outputPayloadFormat, options); + if (message.topic != null && message.hasOwnProperty("topic")) { + object.topic = message.topic; + if (options.oneofs) + object.destinationDescriptor = "topic"; + } + return object; + }; + + /** + * Converts this Destination to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @instance + * @returns {Object.} JSON object + */ + Destination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Destination + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Destination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.Destination"; + }; + + Destination.NetworkConfig = (function() { + + /** + * Properties of a NetworkConfig. + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @interface INetworkConfig + * @property {string|null} [networkAttachment] NetworkConfig networkAttachment + */ + + /** + * Constructs a new NetworkConfig. + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig=} [properties] Properties to set + */ + function NetworkConfig(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]]; + } + + /** + * NetworkConfig networkAttachment. + * @member {string} networkAttachment + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @instance + */ + NetworkConfig.prototype.networkAttachment = ""; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig} NetworkConfig instance + */ + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); + }; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.networkAttachment); + return writer; + }; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.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.eventarc.v1.Pipeline.Destination.NetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.networkAttachment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkConfig message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) + if (!$util.isString(message.networkAttachment)) + return "networkAttachment: string expected"; + return null; + }; + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig(); + if (object.networkAttachment != null) + message.networkAttachment = String(object.networkAttachment); + return message; + }; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig} message NetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.networkAttachment = ""; + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) + object.networkAttachment = message.networkAttachment; + return object; + }; + + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkConfig + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfig"; + }; + + return NetworkConfig; + })(); + + Destination.HttpEndpoint = (function() { + + /** + * Properties of a HttpEndpoint. + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @interface IHttpEndpoint + * @property {string|null} [uri] HttpEndpoint uri + * @property {string|null} [messageBindingTemplate] HttpEndpoint messageBindingTemplate + */ + + /** + * Constructs a new HttpEndpoint. + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @classdesc Represents a HttpEndpoint. + * @implements IHttpEndpoint + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint=} [properties] Properties to set + */ + function HttpEndpoint(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]]; + } + + /** + * HttpEndpoint uri. + * @member {string} uri + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @instance + */ + HttpEndpoint.prototype.uri = ""; + + /** + * HttpEndpoint messageBindingTemplate. + * @member {string} messageBindingTemplate + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @instance + */ + HttpEndpoint.prototype.messageBindingTemplate = ""; + + /** + * Creates a new HttpEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint} HttpEndpoint instance + */ + HttpEndpoint.create = function create(properties) { + return new HttpEndpoint(properties); + }; + + /** + * Encodes the specified HttpEndpoint message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint} message HttpEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.messageBindingTemplate != null && Object.hasOwnProperty.call(message, "messageBindingTemplate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.messageBindingTemplate); + return writer; + }; + + /** + * Encodes the specified HttpEndpoint message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.IHttpEndpoint} message HttpEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint} HttpEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpEndpoint.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.eventarc.v1.Pipeline.Destination.HttpEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 3: { + message.messageBindingTemplate = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint} HttpEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpEndpoint message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.messageBindingTemplate != null && message.hasOwnProperty("messageBindingTemplate")) + if (!$util.isString(message.messageBindingTemplate)) + return "messageBindingTemplate: string expected"; + return null; + }; + + /** + * Creates a HttpEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint} HttpEndpoint + */ + HttpEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.messageBindingTemplate != null) + message.messageBindingTemplate = String(object.messageBindingTemplate); + return message; + }; + + /** + * Creates a plain object from a HttpEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint} message HttpEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.messageBindingTemplate = ""; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.messageBindingTemplate != null && message.hasOwnProperty("messageBindingTemplate")) + object.messageBindingTemplate = message.messageBindingTemplate; + return object; + }; + + /** + * Converts this HttpEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @instance + * @returns {Object.} JSON object + */ + HttpEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpEndpoint + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpoint"; + }; + + return HttpEndpoint; + })(); + + Destination.AuthenticationConfig = (function() { + + /** + * Properties of an AuthenticationConfig. + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @interface IAuthenticationConfig + * @property {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken|null} [googleOidc] AuthenticationConfig googleOidc + * @property {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken|null} [oauthToken] AuthenticationConfig oauthToken + */ + + /** + * Constructs a new AuthenticationConfig. + * @memberof google.cloud.eventarc.v1.Pipeline.Destination + * @classdesc Represents an AuthenticationConfig. + * @implements IAuthenticationConfig + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig=} [properties] Properties to set + */ + function AuthenticationConfig(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]]; + } + + /** + * AuthenticationConfig googleOidc. + * @member {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken|null|undefined} googleOidc + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @instance + */ + AuthenticationConfig.prototype.googleOidc = null; + + /** + * AuthenticationConfig oauthToken. + * @member {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken|null|undefined} oauthToken + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @instance + */ + AuthenticationConfig.prototype.oauthToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AuthenticationConfig authenticationMethodDescriptor. + * @member {"googleOidc"|"oauthToken"|undefined} authenticationMethodDescriptor + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @instance + */ + Object.defineProperty(AuthenticationConfig.prototype, "authenticationMethodDescriptor", { + get: $util.oneOfGetter($oneOfFields = ["googleOidc", "oauthToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AuthenticationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig} AuthenticationConfig instance + */ + AuthenticationConfig.create = function create(properties) { + return new AuthenticationConfig(properties); + }; + + /** + * Encodes the specified AuthenticationConfig message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig} message AuthenticationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthenticationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.googleOidc != null && Object.hasOwnProperty.call(message, "googleOidc")) + $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken.encode(message.googleOidc, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.oauthToken != null && Object.hasOwnProperty.call(message, "oauthToken")) + $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken.encode(message.oauthToken, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuthenticationConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.IAuthenticationConfig} message AuthenticationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthenticationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthenticationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig} AuthenticationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthenticationConfig.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.eventarc.v1.Pipeline.Destination.AuthenticationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.googleOidc = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken.decode(reader, reader.uint32()); + break; + } + case 2: { + message.oauthToken = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthenticationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig} AuthenticationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthenticationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthenticationConfig message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthenticationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.googleOidc != null && message.hasOwnProperty("googleOidc")) { + properties.authenticationMethodDescriptor = 1; + { + var error = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken.verify(message.googleOidc); + if (error) + return "googleOidc." + error; + } + } + if (message.oauthToken != null && message.hasOwnProperty("oauthToken")) { + if (properties.authenticationMethodDescriptor === 1) + return "authenticationMethodDescriptor: multiple values"; + properties.authenticationMethodDescriptor = 1; + { + var error = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken.verify(message.oauthToken); + if (error) + return "oauthToken." + error; + } + } + return null; + }; + + /** + * Creates an AuthenticationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig} AuthenticationConfig + */ + AuthenticationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig(); + if (object.googleOidc != null) { + if (typeof object.googleOidc !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.googleOidc: object expected"); + message.googleOidc = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken.fromObject(object.googleOidc); + } + if (object.oauthToken != null) { + if (typeof object.oauthToken !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.oauthToken: object expected"); + message.oauthToken = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken.fromObject(object.oauthToken); + } + return message; + }; + + /** + * Creates a plain object from an AuthenticationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig} message AuthenticationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthenticationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.googleOidc != null && message.hasOwnProperty("googleOidc")) { + object.googleOidc = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken.toObject(message.googleOidc, options); + if (options.oneofs) + object.authenticationMethodDescriptor = "googleOidc"; + } + if (message.oauthToken != null && message.hasOwnProperty("oauthToken")) { + object.oauthToken = $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken.toObject(message.oauthToken, options); + if (options.oneofs) + object.authenticationMethodDescriptor = "oauthToken"; + } + return object; + }; + + /** + * Converts this AuthenticationConfig to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @instance + * @returns {Object.} JSON object + */ + AuthenticationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuthenticationConfig + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuthenticationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig"; + }; + + AuthenticationConfig.OidcToken = (function() { + + /** + * Properties of an OidcToken. + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @interface IOidcToken + * @property {string|null} [serviceAccount] OidcToken serviceAccount + * @property {string|null} [audience] OidcToken audience + */ + + /** + * Constructs a new OidcToken. + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @classdesc Represents an OidcToken. + * @implements IOidcToken + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken=} [properties] Properties to set + */ + function OidcToken(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]]; + } + + /** + * OidcToken serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @instance + */ + OidcToken.prototype.serviceAccount = ""; + + /** + * OidcToken audience. + * @member {string} audience + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @instance + */ + OidcToken.prototype.audience = ""; + + /** + * Creates a new OidcToken instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken} OidcToken instance + */ + OidcToken.create = function create(properties) { + return new OidcToken(properties); + }; + + /** + * Encodes the specified OidcToken message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken} message OidcToken message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OidcToken.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAccount); + if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); + return writer; + }; + + /** + * Encodes the specified OidcToken message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOidcToken} message OidcToken message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OidcToken.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OidcToken message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken} OidcToken + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OidcToken.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.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.serviceAccount = reader.string(); + break; + } + case 2: { + message.audience = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OidcToken message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken} OidcToken + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OidcToken.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OidcToken message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OidcToken.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.audience != null && message.hasOwnProperty("audience")) + if (!$util.isString(message.audience)) + return "audience: string expected"; + return null; + }; + + /** + * Creates an OidcToken message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken} OidcToken + */ + OidcToken.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.audience != null) + message.audience = String(object.audience); + return message; + }; + + /** + * Creates a plain object from an OidcToken message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken} message OidcToken + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OidcToken.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceAccount = ""; + object.audience = ""; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = message.audience; + return object; + }; + + /** + * Converts this OidcToken to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @instance + * @returns {Object.} JSON object + */ + OidcToken.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OidcToken + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OidcToken.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcToken"; + }; + + return OidcToken; + })(); + + AuthenticationConfig.OAuthToken = (function() { + + /** + * Properties of a OAuthToken. + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @interface IOAuthToken + * @property {string|null} [serviceAccount] OAuthToken serviceAccount + * @property {string|null} [scope] OAuthToken scope + */ + + /** + * Constructs a new OAuthToken. + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig + * @classdesc Represents a OAuthToken. + * @implements IOAuthToken + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken=} [properties] Properties to set + */ + function OAuthToken(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]]; + } + + /** + * OAuthToken serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @instance + */ + OAuthToken.prototype.serviceAccount = ""; + + /** + * OAuthToken scope. + * @member {string} scope + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @instance + */ + OAuthToken.prototype.scope = ""; + + /** + * Creates a new OAuthToken instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken} OAuthToken instance + */ + OAuthToken.create = function create(properties) { + return new OAuthToken(properties); + }; + + /** + * Encodes the specified OAuthToken message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken} message OAuthToken message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthToken.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAccount); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scope); + return writer; + }; + + /** + * Encodes the specified OAuthToken message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.IOAuthToken} message OAuthToken message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OAuthToken.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a OAuthToken message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken} OAuthToken + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthToken.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.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.serviceAccount = reader.string(); + break; + } + case 2: { + message.scope = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a OAuthToken message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken} OAuthToken + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OAuthToken.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a OAuthToken message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OAuthToken.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + if (!$util.isString(message.scope)) + return "scope: string expected"; + return null; + }; + + /** + * Creates a OAuthToken message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken} OAuthToken + */ + OAuthToken.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.scope != null) + message.scope = String(object.scope); + return message; + }; + + /** + * Creates a plain object from a OAuthToken message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken} message OAuthToken + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OAuthToken.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serviceAccount = ""; + object.scope = ""; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = message.scope; + return object; + }; + + /** + * Converts this OAuthToken to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @instance + * @returns {Object.} JSON object + */ + OAuthToken.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OAuthToken + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OAuthToken.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthToken"; + }; + + return OAuthToken; + })(); + + return AuthenticationConfig; + })(); + + return Destination; + })(); + + Pipeline.Mediation = (function() { + + /** + * Properties of a Mediation. + * @memberof google.cloud.eventarc.v1.Pipeline + * @interface IMediation + * @property {google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation|null} [transformation] Mediation transformation + */ + + /** + * Constructs a new Mediation. + * @memberof google.cloud.eventarc.v1.Pipeline + * @classdesc Represents a Mediation. + * @implements IMediation + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.IMediation=} [properties] Properties to set + */ + function Mediation(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]]; + } + + /** + * Mediation transformation. + * @member {google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation|null|undefined} transformation + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @instance + */ + Mediation.prototype.transformation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Mediation mediationDescriptor. + * @member {"transformation"|undefined} mediationDescriptor + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @instance + */ + Object.defineProperty(Mediation.prototype, "mediationDescriptor", { + get: $util.oneOfGetter($oneOfFields = ["transformation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Mediation instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IMediation=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.Mediation} Mediation instance + */ + Mediation.create = function create(properties) { + return new Mediation(properties); + }; + + /** + * Encodes the specified Mediation message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Mediation.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IMediation} message Mediation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Mediation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transformation != null && Object.hasOwnProperty.call(message, "transformation")) + $root.google.cloud.eventarc.v1.Pipeline.Mediation.Transformation.encode(message.transformation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Mediation message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Mediation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IMediation} message Mediation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Mediation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Mediation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.Mediation} Mediation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Mediation.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.eventarc.v1.Pipeline.Mediation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.transformation = $root.google.cloud.eventarc.v1.Pipeline.Mediation.Transformation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Mediation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.Mediation} Mediation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Mediation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Mediation message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Mediation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.transformation != null && message.hasOwnProperty("transformation")) { + properties.mediationDescriptor = 1; + { + var error = $root.google.cloud.eventarc.v1.Pipeline.Mediation.Transformation.verify(message.transformation); + if (error) + return "transformation." + error; + } + } + return null; + }; + + /** + * Creates a Mediation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.Mediation} Mediation + */ + Mediation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.Mediation) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.Mediation(); + if (object.transformation != null) { + if (typeof object.transformation !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.Mediation.transformation: object expected"); + message.transformation = $root.google.cloud.eventarc.v1.Pipeline.Mediation.Transformation.fromObject(object.transformation); + } + return message; + }; + + /** + * Creates a plain object from a Mediation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Mediation} message Mediation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Mediation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.transformation != null && message.hasOwnProperty("transformation")) { + object.transformation = $root.google.cloud.eventarc.v1.Pipeline.Mediation.Transformation.toObject(message.transformation, options); + if (options.oneofs) + object.mediationDescriptor = "transformation"; + } + return object; + }; + + /** + * Converts this Mediation to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @instance + * @returns {Object.} JSON object + */ + Mediation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Mediation + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Mediation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.Mediation"; + }; + + Mediation.Transformation = (function() { + + /** + * Properties of a Transformation. + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @interface ITransformation + * @property {string|null} [transformationTemplate] Transformation transformationTemplate + */ + + /** + * Constructs a new Transformation. + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation + * @classdesc Represents a Transformation. + * @implements ITransformation + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation=} [properties] Properties to set + */ + function Transformation(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]]; + } + + /** + * Transformation transformationTemplate. + * @member {string} transformationTemplate + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @instance + */ + Transformation.prototype.transformationTemplate = ""; + + /** + * Creates a new Transformation instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.Mediation.Transformation} Transformation instance + */ + Transformation.create = function create(properties) { + return new Transformation(properties); + }; + + /** + * Encodes the specified Transformation message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Mediation.Transformation.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation} message Transformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transformation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transformationTemplate != null && Object.hasOwnProperty.call(message, "transformationTemplate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.transformationTemplate); + return writer; + }; + + /** + * Encodes the specified Transformation message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.Mediation.Transformation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Mediation.ITransformation} message Transformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transformation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Transformation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.Mediation.Transformation} Transformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transformation.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.eventarc.v1.Pipeline.Mediation.Transformation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.transformationTemplate = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Transformation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.Mediation.Transformation} Transformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transformation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Transformation message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Transformation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transformationTemplate != null && message.hasOwnProperty("transformationTemplate")) + if (!$util.isString(message.transformationTemplate)) + return "transformationTemplate: string expected"; + return null; + }; + + /** + * Creates a Transformation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.Mediation.Transformation} Transformation + */ + Transformation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.Mediation.Transformation) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.Mediation.Transformation(); + if (object.transformationTemplate != null) + message.transformationTemplate = String(object.transformationTemplate); + return message; + }; + + /** + * Creates a plain object from a Transformation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @static + * @param {google.cloud.eventarc.v1.Pipeline.Mediation.Transformation} message Transformation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Transformation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.transformationTemplate = ""; + if (message.transformationTemplate != null && message.hasOwnProperty("transformationTemplate")) + object.transformationTemplate = message.transformationTemplate; + return object; + }; + + /** + * Converts this Transformation to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @instance + * @returns {Object.} JSON object + */ + Transformation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Transformation + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.Mediation.Transformation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Transformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.Mediation.Transformation"; + }; + + return Transformation; + })(); + + return Mediation; + })(); + + Pipeline.RetryPolicy = (function() { + + /** + * Properties of a RetryPolicy. + * @memberof google.cloud.eventarc.v1.Pipeline + * @interface IRetryPolicy + * @property {number|null} [maxAttempts] RetryPolicy maxAttempts + * @property {google.protobuf.IDuration|null} [minRetryDelay] RetryPolicy minRetryDelay + * @property {google.protobuf.IDuration|null} [maxRetryDelay] RetryPolicy maxRetryDelay + */ + + /** + * Constructs a new RetryPolicy. + * @memberof google.cloud.eventarc.v1.Pipeline + * @classdesc Represents a RetryPolicy. + * @implements IRetryPolicy + * @constructor + * @param {google.cloud.eventarc.v1.Pipeline.IRetryPolicy=} [properties] Properties to set + */ + function RetryPolicy(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]]; + } + + /** + * RetryPolicy maxAttempts. + * @member {number} maxAttempts + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @instance + */ + RetryPolicy.prototype.maxAttempts = 0; + + /** + * RetryPolicy minRetryDelay. + * @member {google.protobuf.IDuration|null|undefined} minRetryDelay + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @instance + */ + RetryPolicy.prototype.minRetryDelay = null; + + /** + * RetryPolicy maxRetryDelay. + * @member {google.protobuf.IDuration|null|undefined} maxRetryDelay + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @instance + */ + RetryPolicy.prototype.maxRetryDelay = null; + + /** + * Creates a new RetryPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IRetryPolicy=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pipeline.RetryPolicy} RetryPolicy instance + */ + RetryPolicy.create = function create(properties) { + return new RetryPolicy(properties); + }; + + /** + * Encodes the specified RetryPolicy message. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.RetryPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IRetryPolicy} message RetryPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxAttempts != null && Object.hasOwnProperty.call(message, "maxAttempts")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxAttempts); + if (message.minRetryDelay != null && Object.hasOwnProperty.call(message, "minRetryDelay")) + $root.google.protobuf.Duration.encode(message.minRetryDelay, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maxRetryDelay != null && Object.hasOwnProperty.call(message, "maxRetryDelay")) + $root.google.protobuf.Duration.encode(message.maxRetryDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RetryPolicy message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pipeline.RetryPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @static + * @param {google.cloud.eventarc.v1.Pipeline.IRetryPolicy} message RetryPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetryPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.v1.Pipeline.RetryPolicy} RetryPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryPolicy.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.eventarc.v1.Pipeline.RetryPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxAttempts = reader.int32(); + break; + } + case 2: { + message.minRetryDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.maxRetryDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetryPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.v1.Pipeline.RetryPolicy} RetryPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetryPolicy message. + * @function verify + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetryPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxAttempts != null && message.hasOwnProperty("maxAttempts")) + if (!$util.isInteger(message.maxAttempts)) + return "maxAttempts: integer expected"; + if (message.minRetryDelay != null && message.hasOwnProperty("minRetryDelay")) { + var error = $root.google.protobuf.Duration.verify(message.minRetryDelay); + if (error) + return "minRetryDelay." + error; + } + if (message.maxRetryDelay != null && message.hasOwnProperty("maxRetryDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxRetryDelay); + if (error) + return "maxRetryDelay." + error; + } + return null; + }; + + /** + * Creates a RetryPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.v1.Pipeline.RetryPolicy} RetryPolicy + */ + RetryPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pipeline.RetryPolicy) + return object; + var message = new $root.google.cloud.eventarc.v1.Pipeline.RetryPolicy(); + if (object.maxAttempts != null) + message.maxAttempts = object.maxAttempts | 0; + if (object.minRetryDelay != null) { + if (typeof object.minRetryDelay !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.RetryPolicy.minRetryDelay: object expected"); + message.minRetryDelay = $root.google.protobuf.Duration.fromObject(object.minRetryDelay); + } + if (object.maxRetryDelay != null) { + if (typeof object.maxRetryDelay !== "object") + throw TypeError(".google.cloud.eventarc.v1.Pipeline.RetryPolicy.maxRetryDelay: object expected"); + message.maxRetryDelay = $root.google.protobuf.Duration.fromObject(object.maxRetryDelay); + } + return message; + }; + + /** + * Creates a plain object from a RetryPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @static + * @param {google.cloud.eventarc.v1.Pipeline.RetryPolicy} message RetryPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetryPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.maxAttempts = 0; + object.minRetryDelay = null; + object.maxRetryDelay = null; + } + if (message.maxAttempts != null && message.hasOwnProperty("maxAttempts")) + object.maxAttempts = message.maxAttempts; + if (message.minRetryDelay != null && message.hasOwnProperty("minRetryDelay")) + object.minRetryDelay = $root.google.protobuf.Duration.toObject(message.minRetryDelay, options); + if (message.maxRetryDelay != null && message.hasOwnProperty("maxRetryDelay")) + object.maxRetryDelay = $root.google.protobuf.Duration.toObject(message.maxRetryDelay, options); + return object; + }; + + /** + * Converts this RetryPolicy to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @instance + * @returns {Object.} JSON object + */ + RetryPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetryPolicy + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.Pipeline.RetryPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetryPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pipeline.RetryPolicy"; + }; - return UpdateGoogleChannelConfigRequest; + return RetryPolicy; + })(); + + return Pipeline; })(); - v1.GetGoogleChannelConfigRequest = (function() { + v1.Trigger = (function() { /** - * Properties of a GetGoogleChannelConfigRequest. + * Properties of a Trigger. * @memberof google.cloud.eventarc.v1 - * @interface IGetGoogleChannelConfigRequest - * @property {string|null} [name] GetGoogleChannelConfigRequest name + * @interface ITrigger + * @property {string|null} [name] Trigger name + * @property {string|null} [uid] Trigger uid + * @property {google.protobuf.ITimestamp|null} [createTime] Trigger createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Trigger updateTime + * @property {Array.|null} [eventFilters] Trigger eventFilters + * @property {string|null} [serviceAccount] Trigger serviceAccount + * @property {google.cloud.eventarc.v1.IDestination|null} [destination] Trigger destination + * @property {google.cloud.eventarc.v1.ITransport|null} [transport] Trigger transport + * @property {Object.|null} [labels] Trigger labels + * @property {string|null} [channel] Trigger channel + * @property {Object.|null} [conditions] Trigger conditions + * @property {string|null} [eventDataContentType] Trigger eventDataContentType + * @property {boolean|null} [satisfiesPzs] Trigger satisfiesPzs + * @property {string|null} [etag] Trigger etag */ /** - * Constructs a new GetGoogleChannelConfigRequest. + * Constructs a new Trigger. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a GetGoogleChannelConfigRequest. - * @implements IGetGoogleChannelConfigRequest + * @classdesc Represents a Trigger. + * @implements ITrigger * @constructor - * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.ITrigger=} [properties] Properties to set */ - function GetGoogleChannelConfigRequest(properties) { + function Trigger(properties) { + this.eventFilters = []; + this.labels = {}; + this.conditions = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7726,368 +21866,302 @@ } /** - * GetGoogleChannelConfigRequest name. + * Trigger name. * @member {string} name - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * @memberof google.cloud.eventarc.v1.Trigger * @instance */ - GetGoogleChannelConfigRequest.prototype.name = ""; - - /** - * Creates a new GetGoogleChannelConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest - * @static - * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.GetGoogleChannelConfigRequest} GetGoogleChannelConfigRequest instance - */ - GetGoogleChannelConfigRequest.create = function create(properties) { - return new GetGoogleChannelConfigRequest(properties); - }; - - /** - * Encodes the specified GetGoogleChannelConfigRequest message. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleChannelConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest - * @static - * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest} message GetGoogleChannelConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetGoogleChannelConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetGoogleChannelConfigRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GetGoogleChannelConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest - * @static - * @param {google.cloud.eventarc.v1.IGetGoogleChannelConfigRequest} message GetGoogleChannelConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetGoogleChannelConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetGoogleChannelConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.GetGoogleChannelConfigRequest} GetGoogleChannelConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetGoogleChannelConfigRequest.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.eventarc.v1.GetGoogleChannelConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetGoogleChannelConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.GetGoogleChannelConfigRequest} GetGoogleChannelConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetGoogleChannelConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetGoogleChannelConfigRequest message. - * @function verify - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetGoogleChannelConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; + Trigger.prototype.name = ""; /** - * Creates a GetGoogleChannelConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.GetGoogleChannelConfigRequest} GetGoogleChannelConfigRequest + * Trigger uid. + * @member {string} uid + * @memberof google.cloud.eventarc.v1.Trigger + * @instance */ - GetGoogleChannelConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest) - return object; - var message = new $root.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + Trigger.prototype.uid = ""; /** - * Creates a plain object from a GetGoogleChannelConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest - * @static - * @param {google.cloud.eventarc.v1.GetGoogleChannelConfigRequest} message GetGoogleChannelConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Trigger createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.eventarc.v1.Trigger + * @instance */ - GetGoogleChannelConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + Trigger.prototype.createTime = null; /** - * Converts this GetGoogleChannelConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + * Trigger updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.eventarc.v1.Trigger * @instance - * @returns {Object.} JSON object */ - GetGoogleChannelConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Trigger.prototype.updateTime = null; /** - * Gets the default type url for GetGoogleChannelConfigRequest - * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.GetGoogleChannelConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Trigger eventFilters. + * @member {Array.} eventFilters + * @memberof google.cloud.eventarc.v1.Trigger + * @instance */ - GetGoogleChannelConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.v1.GetGoogleChannelConfigRequest"; - }; - - return GetGoogleChannelConfigRequest; - })(); - - v1.OperationMetadata = (function() { + Trigger.prototype.eventFilters = $util.emptyArray; /** - * Properties of an OperationMetadata. - * @memberof google.cloud.eventarc.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * Trigger serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.eventarc.v1.Trigger + * @instance */ + Trigger.prototype.serviceAccount = ""; /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.eventarc.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.eventarc.v1.IOperationMetadata=} [properties] Properties to set + * Trigger destination. + * @member {google.cloud.eventarc.v1.IDestination|null|undefined} destination + * @memberof google.cloud.eventarc.v1.Trigger + * @instance */ - function OperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Trigger.prototype.destination = null; - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.eventarc.v1.OperationMetadata + /** + * Trigger transport. + * @member {google.cloud.eventarc.v1.ITransport|null|undefined} transport + * @memberof google.cloud.eventarc.v1.Trigger * @instance */ - OperationMetadata.prototype.createTime = null; + Trigger.prototype.transport = null; /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.eventarc.v1.OperationMetadata + * Trigger labels. + * @member {Object.} labels + * @memberof google.cloud.eventarc.v1.Trigger * @instance */ - OperationMetadata.prototype.endTime = null; + Trigger.prototype.labels = $util.emptyObject; /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.eventarc.v1.OperationMetadata + * Trigger channel. + * @member {string} channel + * @memberof google.cloud.eventarc.v1.Trigger * @instance */ - OperationMetadata.prototype.target = ""; + Trigger.prototype.channel = ""; /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.eventarc.v1.OperationMetadata + * Trigger conditions. + * @member {Object.} conditions + * @memberof google.cloud.eventarc.v1.Trigger * @instance */ - OperationMetadata.prototype.verb = ""; + Trigger.prototype.conditions = $util.emptyObject; /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.eventarc.v1.OperationMetadata + * Trigger eventDataContentType. + * @member {string} eventDataContentType + * @memberof google.cloud.eventarc.v1.Trigger * @instance */ - OperationMetadata.prototype.statusMessage = ""; + Trigger.prototype.eventDataContentType = ""; /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.eventarc.v1.OperationMetadata + * Trigger satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.eventarc.v1.Trigger * @instance */ - OperationMetadata.prototype.requestedCancellation = false; + Trigger.prototype.satisfiesPzs = false; /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.eventarc.v1.OperationMetadata + * Trigger etag. + * @member {string} etag + * @memberof google.cloud.eventarc.v1.Trigger * @instance */ - OperationMetadata.prototype.apiVersion = ""; + Trigger.prototype.etag = ""; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new Trigger instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.OperationMetadata + * @memberof google.cloud.eventarc.v1.Trigger * @static - * @param {google.cloud.eventarc.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.eventarc.v1.ITrigger=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Trigger} Trigger instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + Trigger.create = function create(properties) { + return new Trigger(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.eventarc.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified Trigger message. Does not implicitly {@link google.cloud.eventarc.v1.Trigger.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.OperationMetadata + * @memberof google.cloud.eventarc.v1.Trigger * @static - * @param {google.cloud.eventarc.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.eventarc.v1.ITrigger} message Trigger message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + Trigger.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.eventFilters != null && message.eventFilters.length) + for (var i = 0; i < message.eventFilters.length; ++i) + $root.google.cloud.eventarc.v1.EventFilter.encode(message.eventFilters[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + $root.google.cloud.eventarc.v1.Destination.encode(message.destination, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.transport != null && Object.hasOwnProperty.call(message, "transport")) + $root.google.cloud.eventarc.v1.Transport.encode(message.transport, writer.uint32(/* id 11, wireType 2 =*/90).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 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.channel); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + for (var keys = Object.keys(message.conditions), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.eventarc.v1.StateCondition.encode(message.conditions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.eventDataContentType != null && Object.hasOwnProperty.call(message, "eventDataContentType")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.eventDataContentType); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.satisfiesPzs); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 99, wireType 2 =*/794).string(message.etag); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Trigger.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.OperationMetadata + * @memberof google.cloud.eventarc.v1.Trigger * @static - * @param {google.cloud.eventarc.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.eventarc.v1.ITrigger} message Trigger message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + Trigger.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a Trigger message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.OperationMetadata + * @memberof google.cloud.eventarc.v1.Trigger * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.eventarc.v1.Trigger} Trigger * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + Trigger.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.Trigger(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.uid = reader.string(); break; } - case 3: { - message.target = reader.string(); + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 4: { - message.verb = reader.string(); + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 5: { - message.statusMessage = reader.string(); + case 8: { + if (!(message.eventFilters && message.eventFilters.length)) + message.eventFilters = []; + message.eventFilters.push($root.google.cloud.eventarc.v1.EventFilter.decode(reader, reader.uint32())); break; } - case 6: { - message.requestedCancellation = reader.bool(); + case 9: { + message.serviceAccount = reader.string(); break; } - case 7: { - message.apiVersion = reader.string(); + case 10: { + message.destination = $root.google.cloud.eventarc.v1.Destination.decode(reader, reader.uint32()); + break; + } + case 11: { + message.transport = $root.google.cloud.eventarc.v1.Transport.decode(reader, reader.uint32()); + break; + } + case 12: { + 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 13: { + message.channel = reader.string(); + break; + } + case 15: { + if (message.conditions === $util.emptyObject) + message.conditions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.eventarc.v1.StateCondition.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.conditions[key] = value; + break; + } + case 16: { + message.eventDataContentType = reader.string(); + break; + } + case 19: { + message.satisfiesPzs = reader.bool(); + break; + } + case 99: { + message.etag = reader.string(); break; } default: @@ -8099,183 +22173,301 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a Trigger message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.OperationMetadata + * @memberof google.cloud.eventarc.v1.Trigger * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.eventarc.v1.Trigger} Trigger * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + Trigger.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a Trigger message. * @function verify - * @memberof google.cloud.eventarc.v1.OperationMetadata + * @memberof google.cloud.eventarc.v1.Trigger * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + Trigger.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "createTime." + 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.eventFilters != null && message.hasOwnProperty("eventFilters")) { + if (!Array.isArray(message.eventFilters)) + return "eventFilters: array expected"; + for (var i = 0; i < message.eventFilters.length; ++i) { + var error = $root.google.cloud.eventarc.v1.EventFilter.verify(message.eventFilters[i]); + if (error) + return "eventFilters." + error; + } + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) { + var error = $root.google.cloud.eventarc.v1.Destination.verify(message.destination); + if (error) + return "destination." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.transport != null && message.hasOwnProperty("transport")) { + var error = $root.google.cloud.eventarc.v1.Transport.verify(message.transport); if (error) - return "endTime." + error; + return "transport." + error; } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.channel != null && message.hasOwnProperty("channel")) + if (!$util.isString(message.channel)) + return "channel: string expected"; + if (message.conditions != null && message.hasOwnProperty("conditions")) { + if (!$util.isObject(message.conditions)) + return "conditions: object expected"; + var key = Object.keys(message.conditions); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.eventarc.v1.StateCondition.verify(message.conditions[key[i]]); + if (error) + return "conditions." + error; + } + } + if (message.eventDataContentType != null && message.hasOwnProperty("eventDataContentType")) + if (!$util.isString(message.eventDataContentType)) + return "eventDataContentType: string expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Trigger message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.OperationMetadata + * @memberof google.cloud.eventarc.v1.Trigger * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.eventarc.v1.Trigger} Trigger */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.OperationMetadata) + Trigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Trigger) return object; - var message = new $root.google.cloud.eventarc.v1.OperationMetadata(); + var message = new $root.google.cloud.eventarc.v1.Trigger(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.eventarc.v1.OperationMetadata.createTime: object expected"); + throw TypeError(".google.cloud.eventarc.v1.Trigger.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.eventarc.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.eventarc.v1.Trigger.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); + if (object.eventFilters) { + if (!Array.isArray(object.eventFilters)) + throw TypeError(".google.cloud.eventarc.v1.Trigger.eventFilters: array expected"); + message.eventFilters = []; + for (var i = 0; i < object.eventFilters.length; ++i) { + if (typeof object.eventFilters[i] !== "object") + throw TypeError(".google.cloud.eventarc.v1.Trigger.eventFilters: object expected"); + message.eventFilters[i] = $root.google.cloud.eventarc.v1.EventFilter.fromObject(object.eventFilters[i]); + } + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.destination != null) { + if (typeof object.destination !== "object") + throw TypeError(".google.cloud.eventarc.v1.Trigger.destination: object expected"); + message.destination = $root.google.cloud.eventarc.v1.Destination.fromObject(object.destination); + } + if (object.transport != null) { + if (typeof object.transport !== "object") + throw TypeError(".google.cloud.eventarc.v1.Trigger.transport: object expected"); + message.transport = $root.google.cloud.eventarc.v1.Transport.fromObject(object.transport); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.eventarc.v1.Trigger.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.channel != null) + message.channel = String(object.channel); + if (object.conditions) { + if (typeof object.conditions !== "object") + throw TypeError(".google.cloud.eventarc.v1.Trigger.conditions: object expected"); + message.conditions = {}; + for (var keys = Object.keys(object.conditions), i = 0; i < keys.length; ++i) { + if (typeof object.conditions[keys[i]] !== "object") + throw TypeError(".google.cloud.eventarc.v1.Trigger.conditions: object expected"); + message.conditions[keys[i]] = $root.google.cloud.eventarc.v1.StateCondition.fromObject(object.conditions[keys[i]]); + } + } + if (object.eventDataContentType != null) + message.eventDataContentType = String(object.eventDataContentType); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a Trigger message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.OperationMetadata + * @memberof google.cloud.eventarc.v1.Trigger * @static - * @param {google.cloud.eventarc.v1.OperationMetadata} message OperationMetadata + * @param {google.cloud.eventarc.v1.Trigger} message Trigger * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + Trigger.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.eventFilters = []; + if (options.objects || options.defaults) { + object.labels = {}; + object.conditions = {}; + } if (options.defaults) { + object.name = ""; + object.uid = ""; object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + object.updateTime = null; + object.serviceAccount = ""; + object.destination = null; + object.transport = null; + object.channel = ""; + object.eventDataContentType = ""; + object.satisfiesPzs = false; + object.etag = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.eventFilters && message.eventFilters.length) { + object.eventFilters = []; + for (var j = 0; j < message.eventFilters.length; ++j) + object.eventFilters[j] = $root.google.cloud.eventarc.v1.EventFilter.toObject(message.eventFilters[j], options); + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = $root.google.cloud.eventarc.v1.Destination.toObject(message.destination, options); + if (message.transport != null && message.hasOwnProperty("transport")) + object.transport = $root.google.cloud.eventarc.v1.Transport.toObject(message.transport, 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.channel != null && message.hasOwnProperty("channel")) + object.channel = message.channel; + if (message.conditions && (keys2 = Object.keys(message.conditions)).length) { + object.conditions = {}; + for (var j = 0; j < keys2.length; ++j) + object.conditions[keys2[j]] = $root.google.cloud.eventarc.v1.StateCondition.toObject(message.conditions[keys2[j]], options); + } + if (message.eventDataContentType != null && message.hasOwnProperty("eventDataContentType")) + object.eventDataContentType = message.eventDataContentType; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this Trigger to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.OperationMetadata + * @memberof google.cloud.eventarc.v1.Trigger * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + Trigger.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for Trigger * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.OperationMetadata + * @memberof google.cloud.eventarc.v1.Trigger * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Trigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.Trigger"; }; - return OperationMetadata; + return Trigger; })(); - v1.GoogleChannelConfig = (function() { + v1.EventFilter = (function() { /** - * Properties of a GoogleChannelConfig. + * Properties of an EventFilter. * @memberof google.cloud.eventarc.v1 - * @interface IGoogleChannelConfig - * @property {string|null} [name] GoogleChannelConfig name - * @property {google.protobuf.ITimestamp|null} [updateTime] GoogleChannelConfig updateTime - * @property {string|null} [cryptoKeyName] GoogleChannelConfig cryptoKeyName + * @interface IEventFilter + * @property {string|null} [attribute] EventFilter attribute + * @property {string|null} [value] EventFilter value + * @property {string|null} [operator] EventFilter operator */ /** - * Constructs a new GoogleChannelConfig. + * Constructs a new EventFilter. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a GoogleChannelConfig. - * @implements IGoogleChannelConfig + * @classdesc Represents an EventFilter. + * @implements IEventFilter * @constructor - * @param {google.cloud.eventarc.v1.IGoogleChannelConfig=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IEventFilter=} [properties] Properties to set */ - function GoogleChannelConfig(properties) { + function EventFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8283,103 +22475,103 @@ } /** - * GoogleChannelConfig name. - * @member {string} name - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * EventFilter attribute. + * @member {string} attribute + * @memberof google.cloud.eventarc.v1.EventFilter * @instance */ - GoogleChannelConfig.prototype.name = ""; + EventFilter.prototype.attribute = ""; /** - * GoogleChannelConfig updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * EventFilter value. + * @member {string} value + * @memberof google.cloud.eventarc.v1.EventFilter * @instance */ - GoogleChannelConfig.prototype.updateTime = null; + EventFilter.prototype.value = ""; /** - * GoogleChannelConfig cryptoKeyName. - * @member {string} cryptoKeyName - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * EventFilter operator. + * @member {string} operator + * @memberof google.cloud.eventarc.v1.EventFilter * @instance */ - GoogleChannelConfig.prototype.cryptoKeyName = ""; + EventFilter.prototype.operator = ""; /** - * Creates a new GoogleChannelConfig instance using the specified properties. + * Creates a new EventFilter instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * @memberof google.cloud.eventarc.v1.EventFilter * @static - * @param {google.cloud.eventarc.v1.IGoogleChannelConfig=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.GoogleChannelConfig} GoogleChannelConfig instance + * @param {google.cloud.eventarc.v1.IEventFilter=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.EventFilter} EventFilter instance */ - GoogleChannelConfig.create = function create(properties) { - return new GoogleChannelConfig(properties); + EventFilter.create = function create(properties) { + return new EventFilter(properties); }; /** - * Encodes the specified GoogleChannelConfig message. Does not implicitly {@link google.cloud.eventarc.v1.GoogleChannelConfig.verify|verify} messages. + * Encodes the specified EventFilter message. Does not implicitly {@link google.cloud.eventarc.v1.EventFilter.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * @memberof google.cloud.eventarc.v1.EventFilter * @static - * @param {google.cloud.eventarc.v1.IGoogleChannelConfig} message GoogleChannelConfig message or plain object to encode + * @param {google.cloud.eventarc.v1.IEventFilter} message EventFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoogleChannelConfig.encode = function encode(message, writer) { + EventFilter.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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.cryptoKeyName != null && Object.hasOwnProperty.call(message, "cryptoKeyName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.cryptoKeyName); + if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.attribute); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.operator); return writer; }; /** - * Encodes the specified GoogleChannelConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GoogleChannelConfig.verify|verify} messages. + * Encodes the specified EventFilter message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.EventFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * @memberof google.cloud.eventarc.v1.EventFilter * @static - * @param {google.cloud.eventarc.v1.IGoogleChannelConfig} message GoogleChannelConfig message or plain object to encode + * @param {google.cloud.eventarc.v1.IEventFilter} message EventFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoogleChannelConfig.encodeDelimited = function encodeDelimited(message, writer) { + EventFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GoogleChannelConfig message from the specified reader or buffer. + * Decodes an EventFilter message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * @memberof google.cloud.eventarc.v1.EventFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.GoogleChannelConfig} GoogleChannelConfig + * @returns {google.cloud.eventarc.v1.EventFilter} EventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GoogleChannelConfig.decode = function decode(reader, length) { + EventFilter.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.eventarc.v1.GoogleChannelConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.EventFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.attribute = reader.string(); break; } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 2: { + message.value = reader.string(); break; } - case 7: { - message.cryptoKeyName = reader.string(); + case 3: { + message.operator = reader.string(); break; } default: @@ -8391,433 +22583,230 @@ }; /** - * Decodes a GoogleChannelConfig message from the specified reader or buffer, length delimited. + * Decodes an EventFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * @memberof google.cloud.eventarc.v1.EventFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.GoogleChannelConfig} GoogleChannelConfig + * @returns {google.cloud.eventarc.v1.EventFilter} EventFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GoogleChannelConfig.decodeDelimited = function decodeDelimited(reader) { + EventFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GoogleChannelConfig message. + * Verifies an EventFilter message. * @function verify - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * @memberof google.cloud.eventarc.v1.EventFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GoogleChannelConfig.verify = function verify(message) { + EventFilter.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.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) - if (!$util.isString(message.cryptoKeyName)) - return "cryptoKeyName: string expected"; + if (message.attribute != null && message.hasOwnProperty("attribute")) + if (!$util.isString(message.attribute)) + return "attribute: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.operator != null && message.hasOwnProperty("operator")) + if (!$util.isString(message.operator)) + return "operator: string expected"; return null; }; /** - * Creates a GoogleChannelConfig message from a plain object. Also converts values to their respective internal types. + * Creates an EventFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * @memberof google.cloud.eventarc.v1.EventFilter * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.GoogleChannelConfig} GoogleChannelConfig + * @returns {google.cloud.eventarc.v1.EventFilter} EventFilter */ - GoogleChannelConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.GoogleChannelConfig) + EventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.EventFilter) return object; - var message = new $root.google.cloud.eventarc.v1.GoogleChannelConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.eventarc.v1.GoogleChannelConfig.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.cryptoKeyName != null) - message.cryptoKeyName = String(object.cryptoKeyName); + var message = new $root.google.cloud.eventarc.v1.EventFilter(); + if (object.attribute != null) + message.attribute = String(object.attribute); + if (object.value != null) + message.value = String(object.value); + if (object.operator != null) + message.operator = String(object.operator); return message; }; /** - * Creates a plain object from a GoogleChannelConfig message. Also converts values to other types if specified. + * Creates a plain object from an EventFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig - * @static - * @param {google.cloud.eventarc.v1.GoogleChannelConfig} message GoogleChannelConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoogleChannelConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.updateTime = null; - object.cryptoKeyName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) - object.cryptoKeyName = message.cryptoKeyName; - return object; - }; - - /** - * Converts this GoogleChannelConfig to JSON. - * @function toJSON - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig - * @instance - * @returns {Object.} JSON object - */ - GoogleChannelConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoogleChannelConfig - * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.GoogleChannelConfig + * @memberof google.cloud.eventarc.v1.EventFilter * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoogleChannelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.v1.GoogleChannelConfig"; - }; - - return GoogleChannelConfig; - })(); - - v1.Trigger = (function() { - - /** - * Properties of a Trigger. - * @memberof google.cloud.eventarc.v1 - * @interface ITrigger - * @property {string|null} [name] Trigger name - * @property {string|null} [uid] Trigger uid - * @property {google.protobuf.ITimestamp|null} [createTime] Trigger createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Trigger updateTime - * @property {Array.|null} [eventFilters] Trigger eventFilters - * @property {string|null} [serviceAccount] Trigger serviceAccount - * @property {google.cloud.eventarc.v1.IDestination|null} [destination] Trigger destination - * @property {google.cloud.eventarc.v1.ITransport|null} [transport] Trigger transport - * @property {Object.|null} [labels] Trigger labels - * @property {string|null} [channel] Trigger channel - * @property {Object.|null} [conditions] Trigger conditions - * @property {string|null} [etag] Trigger etag - */ - - /** - * Constructs a new Trigger. - * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a Trigger. - * @implements ITrigger - * @constructor - * @param {google.cloud.eventarc.v1.ITrigger=} [properties] Properties to set - */ - function Trigger(properties) { - this.eventFilters = []; - this.labels = {}; - this.conditions = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Trigger name. - * @member {string} name - * @memberof google.cloud.eventarc.v1.Trigger - * @instance - */ - Trigger.prototype.name = ""; - - /** - * Trigger uid. - * @member {string} uid - * @memberof google.cloud.eventarc.v1.Trigger - * @instance - */ - Trigger.prototype.uid = ""; - - /** - * Trigger createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.eventarc.v1.Trigger - * @instance - */ - Trigger.prototype.createTime = null; - - /** - * Trigger updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.eventarc.v1.Trigger - * @instance - */ - Trigger.prototype.updateTime = null; - - /** - * Trigger eventFilters. - * @member {Array.} eventFilters - * @memberof google.cloud.eventarc.v1.Trigger - * @instance + * @param {google.cloud.eventarc.v1.EventFilter} message EventFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Trigger.prototype.eventFilters = $util.emptyArray; + EventFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.attribute = ""; + object.value = ""; + object.operator = ""; + } + if (message.attribute != null && message.hasOwnProperty("attribute")) + object.attribute = message.attribute; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.operator != null && message.hasOwnProperty("operator")) + object.operator = message.operator; + return object; + }; /** - * Trigger serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.eventarc.v1.Trigger + * Converts this EventFilter to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.v1.EventFilter * @instance + * @returns {Object.} JSON object */ - Trigger.prototype.serviceAccount = ""; + EventFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Trigger destination. - * @member {google.cloud.eventarc.v1.IDestination|null|undefined} destination - * @memberof google.cloud.eventarc.v1.Trigger - * @instance + * Gets the default type url for EventFilter + * @function getTypeUrl + * @memberof google.cloud.eventarc.v1.EventFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Trigger.prototype.destination = null; + EventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.v1.EventFilter"; + }; - /** - * Trigger transport. - * @member {google.cloud.eventarc.v1.ITransport|null|undefined} transport - * @memberof google.cloud.eventarc.v1.Trigger - * @instance - */ - Trigger.prototype.transport = null; + return EventFilter; + })(); + + v1.StateCondition = (function() { /** - * Trigger labels. - * @member {Object.} labels - * @memberof google.cloud.eventarc.v1.Trigger - * @instance + * Properties of a StateCondition. + * @memberof google.cloud.eventarc.v1 + * @interface IStateCondition + * @property {google.rpc.Code|null} [code] StateCondition code + * @property {string|null} [message] StateCondition message */ - Trigger.prototype.labels = $util.emptyObject; /** - * Trigger channel. - * @member {string} channel - * @memberof google.cloud.eventarc.v1.Trigger - * @instance + * Constructs a new StateCondition. + * @memberof google.cloud.eventarc.v1 + * @classdesc Represents a StateCondition. + * @implements IStateCondition + * @constructor + * @param {google.cloud.eventarc.v1.IStateCondition=} [properties] Properties to set */ - Trigger.prototype.channel = ""; + function StateCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Trigger conditions. - * @member {Object.} conditions - * @memberof google.cloud.eventarc.v1.Trigger + * StateCondition code. + * @member {google.rpc.Code} code + * @memberof google.cloud.eventarc.v1.StateCondition * @instance */ - Trigger.prototype.conditions = $util.emptyObject; + StateCondition.prototype.code = 0; /** - * Trigger etag. - * @member {string} etag - * @memberof google.cloud.eventarc.v1.Trigger + * StateCondition message. + * @member {string} message + * @memberof google.cloud.eventarc.v1.StateCondition * @instance */ - Trigger.prototype.etag = ""; + StateCondition.prototype.message = ""; /** - * Creates a new Trigger instance using the specified properties. + * Creates a new StateCondition instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.Trigger + * @memberof google.cloud.eventarc.v1.StateCondition * @static - * @param {google.cloud.eventarc.v1.ITrigger=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.Trigger} Trigger instance + * @param {google.cloud.eventarc.v1.IStateCondition=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.StateCondition} StateCondition instance */ - Trigger.create = function create(properties) { - return new Trigger(properties); + StateCondition.create = function create(properties) { + return new StateCondition(properties); }; /** - * Encodes the specified Trigger message. Does not implicitly {@link google.cloud.eventarc.v1.Trigger.verify|verify} messages. + * Encodes the specified StateCondition message. Does not implicitly {@link google.cloud.eventarc.v1.StateCondition.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.Trigger + * @memberof google.cloud.eventarc.v1.StateCondition * @static - * @param {google.cloud.eventarc.v1.ITrigger} message Trigger message or plain object to encode + * @param {google.cloud.eventarc.v1.IStateCondition} message StateCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Trigger.encode = function encode(message, writer) { + StateCondition.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.eventFilters != null && message.eventFilters.length) - for (var i = 0; i < message.eventFilters.length; ++i) - $root.google.cloud.eventarc.v1.EventFilter.encode(message.eventFilters[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceAccount); - if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) - $root.google.cloud.eventarc.v1.Destination.encode(message.destination, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.transport != null && Object.hasOwnProperty.call(message, "transport")) - $root.google.cloud.eventarc.v1.Transport.encode(message.transport, writer.uint32(/* id 11, wireType 2 =*/90).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 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.channel); - if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) - for (var keys = Object.keys(message.conditions), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.eventarc.v1.StateCondition.encode(message.conditions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 99, wireType 2 =*/794).string(message.etag); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); return writer; }; /** - * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Trigger.verify|verify} messages. + * Encodes the specified StateCondition message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.StateCondition.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.Trigger + * @memberof google.cloud.eventarc.v1.StateCondition * @static - * @param {google.cloud.eventarc.v1.ITrigger} message Trigger message or plain object to encode + * @param {google.cloud.eventarc.v1.IStateCondition} message StateCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Trigger.encodeDelimited = function encodeDelimited(message, writer) { + StateCondition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Trigger message from the specified reader or buffer. + * Decodes a StateCondition message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.Trigger + * @memberof google.cloud.eventarc.v1.StateCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.Trigger} Trigger + * @returns {google.cloud.eventarc.v1.StateCondition} StateCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Trigger.decode = function decode(reader, length) { + StateCondition.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.eventarc.v1.Trigger(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.StateCondition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - if (!(message.eventFilters && message.eventFilters.length)) - message.eventFilters = []; - message.eventFilters.push($root.google.cloud.eventarc.v1.EventFilter.decode(reader, reader.uint32())); - break; - } - case 9: { - message.serviceAccount = reader.string(); - break; - } - case 10: { - message.destination = $root.google.cloud.eventarc.v1.Destination.decode(reader, reader.uint32()); - break; - } - case 11: { - message.transport = $root.google.cloud.eventarc.v1.Transport.decode(reader, reader.uint32()); - break; - } - case 12: { - 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 13: { - message.channel = reader.string(); - break; - } - case 15: { - if (message.conditions === $util.emptyObject) - message.conditions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.eventarc.v1.StateCondition.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.conditions[key] = value; + case 1: { + message.code = reader.int32(); break; } - case 99: { - message.etag = reader.string(); + case 2: { + message.message = reader.string(); break; } default: @@ -8829,285 +22818,230 @@ }; /** - * Decodes a Trigger message from the specified reader or buffer, length delimited. + * Decodes a StateCondition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.Trigger + * @memberof google.cloud.eventarc.v1.StateCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.Trigger} Trigger + * @returns {google.cloud.eventarc.v1.StateCondition} StateCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Trigger.decodeDelimited = function decodeDelimited(reader) { + StateCondition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Trigger message. + * Verifies a StateCondition message. * @function verify - * @memberof google.cloud.eventarc.v1.Trigger + * @memberof google.cloud.eventarc.v1.StateCondition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Trigger.verify = function verify(message) { + StateCondition.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: 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.eventFilters != null && message.hasOwnProperty("eventFilters")) { - if (!Array.isArray(message.eventFilters)) - return "eventFilters: array expected"; - for (var i = 0; i < message.eventFilters.length; ++i) { - var error = $root.google.cloud.eventarc.v1.EventFilter.verify(message.eventFilters[i]); - if (error) - return "eventFilters." + error; - } - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.destination != null && message.hasOwnProperty("destination")) { - var error = $root.google.cloud.eventarc.v1.Destination.verify(message.destination); - if (error) - return "destination." + error; - } - if (message.transport != null && message.hasOwnProperty("transport")) { - var error = $root.google.cloud.eventarc.v1.Transport.verify(message.transport); - if (error) - return "transport." + 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.channel != null && message.hasOwnProperty("channel")) - if (!$util.isString(message.channel)) - return "channel: string expected"; - if (message.conditions != null && message.hasOwnProperty("conditions")) { - if (!$util.isObject(message.conditions)) - return "conditions: object expected"; - var key = Object.keys(message.conditions); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.eventarc.v1.StateCondition.verify(message.conditions[key[i]]); - if (error) - return "conditions." + error; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 16: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; return null; }; /** - * Creates a Trigger message from a plain object. Also converts values to their respective internal types. + * Creates a StateCondition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.Trigger + * @memberof google.cloud.eventarc.v1.StateCondition * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.Trigger} Trigger + * @returns {google.cloud.eventarc.v1.StateCondition} StateCondition */ - Trigger.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.Trigger) + StateCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.StateCondition) return object; - var message = new $root.google.cloud.eventarc.v1.Trigger(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.eventarc.v1.Trigger.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.eventarc.v1.Trigger.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.eventFilters) { - if (!Array.isArray(object.eventFilters)) - throw TypeError(".google.cloud.eventarc.v1.Trigger.eventFilters: array expected"); - message.eventFilters = []; - for (var i = 0; i < object.eventFilters.length; ++i) { - if (typeof object.eventFilters[i] !== "object") - throw TypeError(".google.cloud.eventarc.v1.Trigger.eventFilters: object expected"); - message.eventFilters[i] = $root.google.cloud.eventarc.v1.EventFilter.fromObject(object.eventFilters[i]); - } - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.destination != null) { - if (typeof object.destination !== "object") - throw TypeError(".google.cloud.eventarc.v1.Trigger.destination: object expected"); - message.destination = $root.google.cloud.eventarc.v1.Destination.fromObject(object.destination); - } - if (object.transport != null) { - if (typeof object.transport !== "object") - throw TypeError(".google.cloud.eventarc.v1.Trigger.transport: object expected"); - message.transport = $root.google.cloud.eventarc.v1.Transport.fromObject(object.transport); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.eventarc.v1.Trigger.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.channel != null) - message.channel = String(object.channel); - if (object.conditions) { - if (typeof object.conditions !== "object") - throw TypeError(".google.cloud.eventarc.v1.Trigger.conditions: object expected"); - message.conditions = {}; - for (var keys = Object.keys(object.conditions), i = 0; i < keys.length; ++i) { - if (typeof object.conditions[keys[i]] !== "object") - throw TypeError(".google.cloud.eventarc.v1.Trigger.conditions: object expected"); - message.conditions[keys[i]] = $root.google.cloud.eventarc.v1.StateCondition.fromObject(object.conditions[keys[i]]); + var message = new $root.google.cloud.eventarc.v1.StateCondition(); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; } + break; + case "OK": + case 0: + message.code = 0; + break; + case "CANCELLED": + case 1: + message.code = 1; + break; + case "UNKNOWN": + case 2: + message.code = 2; + break; + case "INVALID_ARGUMENT": + case 3: + message.code = 3; + break; + case "DEADLINE_EXCEEDED": + case 4: + message.code = 4; + break; + case "NOT_FOUND": + case 5: + message.code = 5; + break; + case "ALREADY_EXISTS": + case 6: + message.code = 6; + break; + case "PERMISSION_DENIED": + case 7: + message.code = 7; + break; + case "UNAUTHENTICATED": + case 16: + message.code = 16; + break; + case "RESOURCE_EXHAUSTED": + case 8: + message.code = 8; + break; + case "FAILED_PRECONDITION": + case 9: + message.code = 9; + break; + case "ABORTED": + case 10: + message.code = 10; + break; + case "OUT_OF_RANGE": + case 11: + message.code = 11; + break; + case "UNIMPLEMENTED": + case 12: + message.code = 12; + break; + case "INTERNAL": + case 13: + message.code = 13; + break; + case "UNAVAILABLE": + case 14: + message.code = 14; + break; + case "DATA_LOSS": + case 15: + message.code = 15; + break; } - if (object.etag != null) - message.etag = String(object.etag); + if (object.message != null) + message.message = String(object.message); return message; }; /** - * Creates a plain object from a Trigger message. Also converts values to other types if specified. + * Creates a plain object from a StateCondition message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.Trigger + * @memberof google.cloud.eventarc.v1.StateCondition * @static - * @param {google.cloud.eventarc.v1.Trigger} message Trigger + * @param {google.cloud.eventarc.v1.StateCondition} message StateCondition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Trigger.toObject = function toObject(message, options) { + StateCondition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.eventFilters = []; - if (options.objects || options.defaults) { - object.labels = {}; - object.conditions = {}; - } if (options.defaults) { - object.name = ""; - object.uid = ""; - object.createTime = null; - object.updateTime = null; - object.serviceAccount = ""; - object.destination = null; - object.transport = null; - object.channel = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - 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.eventFilters && message.eventFilters.length) { - object.eventFilters = []; - for (var j = 0; j < message.eventFilters.length; ++j) - object.eventFilters[j] = $root.google.cloud.eventarc.v1.EventFilter.toObject(message.eventFilters[j], options); - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = $root.google.cloud.eventarc.v1.Destination.toObject(message.destination, options); - if (message.transport != null && message.hasOwnProperty("transport")) - object.transport = $root.google.cloud.eventarc.v1.Transport.toObject(message.transport, 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.channel != null && message.hasOwnProperty("channel")) - object.channel = message.channel; - if (message.conditions && (keys2 = Object.keys(message.conditions)).length) { - object.conditions = {}; - for (var j = 0; j < keys2.length; ++j) - object.conditions[keys2[j]] = $root.google.cloud.eventarc.v1.StateCondition.toObject(message.conditions[keys2[j]], options); + object.code = options.enums === String ? "OK" : 0; + object.message = ""; } - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.rpc.Code[message.code] === undefined ? message.code : $root.google.rpc.Code[message.code] : message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; return object; }; /** - * Converts this Trigger to JSON. + * Converts this StateCondition to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.Trigger + * @memberof google.cloud.eventarc.v1.StateCondition * @instance * @returns {Object.} JSON object */ - Trigger.prototype.toJSON = function toJSON() { + StateCondition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Trigger + * Gets the default type url for StateCondition * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.Trigger + * @memberof google.cloud.eventarc.v1.StateCondition * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Trigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StateCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.Trigger"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.StateCondition"; }; - return Trigger; + return StateCondition; })(); - v1.EventFilter = (function() { + v1.Destination = (function() { /** - * Properties of an EventFilter. + * Properties of a Destination. * @memberof google.cloud.eventarc.v1 - * @interface IEventFilter - * @property {string|null} [attribute] EventFilter attribute - * @property {string|null} [value] EventFilter value - * @property {string|null} [operator] EventFilter operator + * @interface IDestination + * @property {google.cloud.eventarc.v1.ICloudRun|null} [cloudRun] Destination cloudRun + * @property {string|null} [cloudFunction] Destination cloudFunction + * @property {google.cloud.eventarc.v1.IGKE|null} [gke] Destination gke + * @property {string|null} [workflow] Destination workflow + * @property {google.cloud.eventarc.v1.IHttpEndpoint|null} [httpEndpoint] Destination httpEndpoint + * @property {google.cloud.eventarc.v1.INetworkConfig|null} [networkConfig] Destination networkConfig */ /** - * Constructs a new EventFilter. + * Constructs a new Destination. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents an EventFilter. - * @implements IEventFilter + * @classdesc Represents a Destination. + * @implements IDestination * @constructor - * @param {google.cloud.eventarc.v1.IEventFilter=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IDestination=} [properties] Properties to set */ - function EventFilter(properties) { + function Destination(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9115,103 +23049,159 @@ } /** - * EventFilter attribute. - * @member {string} attribute - * @memberof google.cloud.eventarc.v1.EventFilter + * Destination cloudRun. + * @member {google.cloud.eventarc.v1.ICloudRun|null|undefined} cloudRun + * @memberof google.cloud.eventarc.v1.Destination * @instance */ - EventFilter.prototype.attribute = ""; + Destination.prototype.cloudRun = null; /** - * EventFilter value. - * @member {string} value - * @memberof google.cloud.eventarc.v1.EventFilter + * Destination cloudFunction. + * @member {string|null|undefined} cloudFunction + * @memberof google.cloud.eventarc.v1.Destination * @instance */ - EventFilter.prototype.value = ""; + Destination.prototype.cloudFunction = null; /** - * EventFilter operator. - * @member {string} operator - * @memberof google.cloud.eventarc.v1.EventFilter + * Destination gke. + * @member {google.cloud.eventarc.v1.IGKE|null|undefined} gke + * @memberof google.cloud.eventarc.v1.Destination * @instance */ - EventFilter.prototype.operator = ""; + Destination.prototype.gke = null; /** - * Creates a new EventFilter instance using the specified properties. + * Destination workflow. + * @member {string|null|undefined} workflow + * @memberof google.cloud.eventarc.v1.Destination + * @instance + */ + Destination.prototype.workflow = null; + + /** + * Destination httpEndpoint. + * @member {google.cloud.eventarc.v1.IHttpEndpoint|null|undefined} httpEndpoint + * @memberof google.cloud.eventarc.v1.Destination + * @instance + */ + Destination.prototype.httpEndpoint = null; + + /** + * Destination networkConfig. + * @member {google.cloud.eventarc.v1.INetworkConfig|null|undefined} networkConfig + * @memberof google.cloud.eventarc.v1.Destination + * @instance + */ + Destination.prototype.networkConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Destination descriptor. + * @member {"cloudRun"|"cloudFunction"|"gke"|"workflow"|"httpEndpoint"|undefined} descriptor + * @memberof google.cloud.eventarc.v1.Destination + * @instance + */ + Object.defineProperty(Destination.prototype, "descriptor", { + get: $util.oneOfGetter($oneOfFields = ["cloudRun", "cloudFunction", "gke", "workflow", "httpEndpoint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Destination instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.EventFilter + * @memberof google.cloud.eventarc.v1.Destination * @static - * @param {google.cloud.eventarc.v1.IEventFilter=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.EventFilter} EventFilter instance + * @param {google.cloud.eventarc.v1.IDestination=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Destination} Destination instance */ - EventFilter.create = function create(properties) { - return new EventFilter(properties); + Destination.create = function create(properties) { + return new Destination(properties); }; /** - * Encodes the specified EventFilter message. Does not implicitly {@link google.cloud.eventarc.v1.EventFilter.verify|verify} messages. + * Encodes the specified Destination message. Does not implicitly {@link google.cloud.eventarc.v1.Destination.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.EventFilter + * @memberof google.cloud.eventarc.v1.Destination * @static - * @param {google.cloud.eventarc.v1.IEventFilter} message EventFilter message or plain object to encode + * @param {google.cloud.eventarc.v1.IDestination} message Destination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventFilter.encode = function encode(message, writer) { + Destination.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.attribute); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.operator); + if (message.cloudRun != null && Object.hasOwnProperty.call(message, "cloudRun")) + $root.google.cloud.eventarc.v1.CloudRun.encode(message.cloudRun, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cloudFunction); + if (message.gke != null && Object.hasOwnProperty.call(message, "gke")) + $root.google.cloud.eventarc.v1.GKE.encode(message.gke, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.workflow); + if (message.httpEndpoint != null && Object.hasOwnProperty.call(message, "httpEndpoint")) + $root.google.cloud.eventarc.v1.HttpEndpoint.encode(message.httpEndpoint, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.cloud.eventarc.v1.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified EventFilter message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.EventFilter.verify|verify} messages. + * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Destination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.EventFilter + * @memberof google.cloud.eventarc.v1.Destination * @static - * @param {google.cloud.eventarc.v1.IEventFilter} message EventFilter message or plain object to encode + * @param {google.cloud.eventarc.v1.IDestination} message Destination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EventFilter.encodeDelimited = function encodeDelimited(message, writer) { + Destination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EventFilter message from the specified reader or buffer. + * Decodes a Destination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.EventFilter + * @memberof google.cloud.eventarc.v1.Destination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.EventFilter} EventFilter + * @returns {google.cloud.eventarc.v1.Destination} Destination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventFilter.decode = function decode(reader, length) { + Destination.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.eventarc.v1.EventFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.Destination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.attribute = reader.string(); + message.cloudRun = $root.google.cloud.eventarc.v1.CloudRun.decode(reader, reader.uint32()); break; } case 2: { - message.value = reader.string(); + message.cloudFunction = reader.string(); break; } case 3: { - message.operator = reader.string(); + message.gke = $root.google.cloud.eventarc.v1.GKE.decode(reader, reader.uint32()); + break; + } + case 4: { + message.workflow = reader.string(); + break; + } + case 5: { + message.httpEndpoint = $root.google.cloud.eventarc.v1.HttpEndpoint.decode(reader, reader.uint32()); + break; + } + case 6: { + message.networkConfig = $root.google.cloud.eventarc.v1.NetworkConfig.decode(reader, reader.uint32()); break; } default: @@ -9223,140 +23213,214 @@ }; /** - * Decodes an EventFilter message from the specified reader or buffer, length delimited. + * Decodes a Destination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.EventFilter + * @memberof google.cloud.eventarc.v1.Destination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.EventFilter} EventFilter + * @returns {google.cloud.eventarc.v1.Destination} Destination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EventFilter.decodeDelimited = function decodeDelimited(reader) { + Destination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EventFilter message. + * Verifies a Destination message. * @function verify - * @memberof google.cloud.eventarc.v1.EventFilter + * @memberof google.cloud.eventarc.v1.Destination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EventFilter.verify = function verify(message) { + Destination.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.attribute != null && message.hasOwnProperty("attribute")) - if (!$util.isString(message.attribute)) - return "attribute: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.operator != null && message.hasOwnProperty("operator")) - if (!$util.isString(message.operator)) - return "operator: string expected"; + var properties = {}; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { + properties.descriptor = 1; + { + var error = $root.google.cloud.eventarc.v1.CloudRun.verify(message.cloudRun); + if (error) + return "cloudRun." + error; + } + } + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + if (properties.descriptor === 1) + return "descriptor: multiple values"; + properties.descriptor = 1; + if (!$util.isString(message.cloudFunction)) + return "cloudFunction: string expected"; + } + if (message.gke != null && message.hasOwnProperty("gke")) { + if (properties.descriptor === 1) + return "descriptor: multiple values"; + properties.descriptor = 1; + { + var error = $root.google.cloud.eventarc.v1.GKE.verify(message.gke); + if (error) + return "gke." + error; + } + } + if (message.workflow != null && message.hasOwnProperty("workflow")) { + if (properties.descriptor === 1) + return "descriptor: multiple values"; + properties.descriptor = 1; + if (!$util.isString(message.workflow)) + return "workflow: string expected"; + } + if (message.httpEndpoint != null && message.hasOwnProperty("httpEndpoint")) { + if (properties.descriptor === 1) + return "descriptor: multiple values"; + properties.descriptor = 1; + { + var error = $root.google.cloud.eventarc.v1.HttpEndpoint.verify(message.httpEndpoint); + if (error) + return "httpEndpoint." + error; + } + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.cloud.eventarc.v1.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } return null; }; /** - * Creates an EventFilter message from a plain object. Also converts values to their respective internal types. + * Creates a Destination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.EventFilter + * @memberof google.cloud.eventarc.v1.Destination * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.EventFilter} EventFilter + * @returns {google.cloud.eventarc.v1.Destination} Destination */ - EventFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.EventFilter) + Destination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Destination) return object; - var message = new $root.google.cloud.eventarc.v1.EventFilter(); - if (object.attribute != null) - message.attribute = String(object.attribute); - if (object.value != null) - message.value = String(object.value); - if (object.operator != null) - message.operator = String(object.operator); + var message = new $root.google.cloud.eventarc.v1.Destination(); + if (object.cloudRun != null) { + if (typeof object.cloudRun !== "object") + throw TypeError(".google.cloud.eventarc.v1.Destination.cloudRun: object expected"); + message.cloudRun = $root.google.cloud.eventarc.v1.CloudRun.fromObject(object.cloudRun); + } + if (object.cloudFunction != null) + message.cloudFunction = String(object.cloudFunction); + if (object.gke != null) { + if (typeof object.gke !== "object") + throw TypeError(".google.cloud.eventarc.v1.Destination.gke: object expected"); + message.gke = $root.google.cloud.eventarc.v1.GKE.fromObject(object.gke); + } + if (object.workflow != null) + message.workflow = String(object.workflow); + if (object.httpEndpoint != null) { + if (typeof object.httpEndpoint !== "object") + throw TypeError(".google.cloud.eventarc.v1.Destination.httpEndpoint: object expected"); + message.httpEndpoint = $root.google.cloud.eventarc.v1.HttpEndpoint.fromObject(object.httpEndpoint); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.cloud.eventarc.v1.Destination.networkConfig: object expected"); + message.networkConfig = $root.google.cloud.eventarc.v1.NetworkConfig.fromObject(object.networkConfig); + } return message; }; /** - * Creates a plain object from an EventFilter message. Also converts values to other types if specified. + * Creates a plain object from a Destination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.EventFilter + * @memberof google.cloud.eventarc.v1.Destination * @static - * @param {google.cloud.eventarc.v1.EventFilter} message EventFilter + * @param {google.cloud.eventarc.v1.Destination} message Destination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EventFilter.toObject = function toObject(message, options) { + Destination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.attribute = ""; - object.value = ""; - object.operator = ""; + if (options.defaults) + object.networkConfig = null; + if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { + object.cloudRun = $root.google.cloud.eventarc.v1.CloudRun.toObject(message.cloudRun, options); + if (options.oneofs) + object.descriptor = "cloudRun"; } - if (message.attribute != null && message.hasOwnProperty("attribute")) - object.attribute = message.attribute; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.operator != null && message.hasOwnProperty("operator")) - object.operator = message.operator; + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + object.cloudFunction = message.cloudFunction; + if (options.oneofs) + object.descriptor = "cloudFunction"; + } + if (message.gke != null && message.hasOwnProperty("gke")) { + object.gke = $root.google.cloud.eventarc.v1.GKE.toObject(message.gke, options); + if (options.oneofs) + object.descriptor = "gke"; + } + if (message.workflow != null && message.hasOwnProperty("workflow")) { + object.workflow = message.workflow; + if (options.oneofs) + object.descriptor = "workflow"; + } + if (message.httpEndpoint != null && message.hasOwnProperty("httpEndpoint")) { + object.httpEndpoint = $root.google.cloud.eventarc.v1.HttpEndpoint.toObject(message.httpEndpoint, options); + if (options.oneofs) + object.descriptor = "httpEndpoint"; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.cloud.eventarc.v1.NetworkConfig.toObject(message.networkConfig, options); return object; }; /** - * Converts this EventFilter to JSON. + * Converts this Destination to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.EventFilter + * @memberof google.cloud.eventarc.v1.Destination * @instance * @returns {Object.} JSON object */ - EventFilter.prototype.toJSON = function toJSON() { + Destination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EventFilter + * Gets the default type url for Destination * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.EventFilter + * @memberof google.cloud.eventarc.v1.Destination * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Destination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.EventFilter"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.Destination"; }; - return EventFilter; + return Destination; })(); - v1.StateCondition = (function() { + v1.Transport = (function() { /** - * Properties of a StateCondition. + * Properties of a Transport. * @memberof google.cloud.eventarc.v1 - * @interface IStateCondition - * @property {google.rpc.Code|null} [code] StateCondition code - * @property {string|null} [message] StateCondition message + * @interface ITransport + * @property {google.cloud.eventarc.v1.IPubsub|null} [pubsub] Transport pubsub */ /** - * Constructs a new StateCondition. + * Constructs a new Transport. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a StateCondition. - * @implements IStateCondition + * @classdesc Represents a Transport. + * @implements ITransport * @constructor - * @param {google.cloud.eventarc.v1.IStateCondition=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.ITransport=} [properties] Properties to set */ - function StateCondition(properties) { + function Transport(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9364,89 +23428,89 @@ } /** - * StateCondition code. - * @member {google.rpc.Code} code - * @memberof google.cloud.eventarc.v1.StateCondition + * Transport pubsub. + * @member {google.cloud.eventarc.v1.IPubsub|null|undefined} pubsub + * @memberof google.cloud.eventarc.v1.Transport * @instance */ - StateCondition.prototype.code = 0; + Transport.prototype.pubsub = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * StateCondition message. - * @member {string} message - * @memberof google.cloud.eventarc.v1.StateCondition + * Transport intermediary. + * @member {"pubsub"|undefined} intermediary + * @memberof google.cloud.eventarc.v1.Transport * @instance */ - StateCondition.prototype.message = ""; + Object.defineProperty(Transport.prototype, "intermediary", { + get: $util.oneOfGetter($oneOfFields = ["pubsub"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new StateCondition instance using the specified properties. + * Creates a new Transport instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.StateCondition + * @memberof google.cloud.eventarc.v1.Transport * @static - * @param {google.cloud.eventarc.v1.IStateCondition=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.StateCondition} StateCondition instance + * @param {google.cloud.eventarc.v1.ITransport=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Transport} Transport instance */ - StateCondition.create = function create(properties) { - return new StateCondition(properties); + Transport.create = function create(properties) { + return new Transport(properties); }; /** - * Encodes the specified StateCondition message. Does not implicitly {@link google.cloud.eventarc.v1.StateCondition.verify|verify} messages. + * Encodes the specified Transport message. Does not implicitly {@link google.cloud.eventarc.v1.Transport.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.StateCondition + * @memberof google.cloud.eventarc.v1.Transport * @static - * @param {google.cloud.eventarc.v1.IStateCondition} message StateCondition message or plain object to encode + * @param {google.cloud.eventarc.v1.ITransport} message Transport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StateCondition.encode = function encode(message, writer) { + Transport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.pubsub != null && Object.hasOwnProperty.call(message, "pubsub")) + $root.google.cloud.eventarc.v1.Pubsub.encode(message.pubsub, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified StateCondition message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.StateCondition.verify|verify} messages. + * Encodes the specified Transport message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Transport.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.StateCondition + * @memberof google.cloud.eventarc.v1.Transport * @static - * @param {google.cloud.eventarc.v1.IStateCondition} message StateCondition message or plain object to encode + * @param {google.cloud.eventarc.v1.ITransport} message Transport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StateCondition.encodeDelimited = function encodeDelimited(message, writer) { + Transport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StateCondition message from the specified reader or buffer. + * Decodes a Transport message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.StateCondition + * @memberof google.cloud.eventarc.v1.Transport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.StateCondition} StateCondition + * @returns {google.cloud.eventarc.v1.Transport} Transport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StateCondition.decode = function decode(reader, length) { + Transport.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.eventarc.v1.StateCondition(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.Transport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); + message.pubsub = $root.google.cloud.eventarc.v1.Pubsub.decode(reader, reader.uint32()); break; } default: @@ -9458,228 +23522,134 @@ }; /** - * Decodes a StateCondition message from the specified reader or buffer, length delimited. + * Decodes a Transport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.StateCondition + * @memberof google.cloud.eventarc.v1.Transport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.StateCondition} StateCondition + * @returns {google.cloud.eventarc.v1.Transport} Transport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StateCondition.decodeDelimited = function decodeDelimited(reader) { + Transport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StateCondition message. + * Verifies a Transport message. * @function verify - * @memberof google.cloud.eventarc.v1.StateCondition + * @memberof google.cloud.eventarc.v1.Transport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StateCondition.verify = function verify(message) { + Transport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - switch (message.code) { - default: - return "code: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 16: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - break; + var properties = {}; + if (message.pubsub != null && message.hasOwnProperty("pubsub")) { + properties.intermediary = 1; + { + var error = $root.google.cloud.eventarc.v1.Pubsub.verify(message.pubsub); + if (error) + return "pubsub." + error; } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; + } return null; }; /** - * Creates a StateCondition message from a plain object. Also converts values to their respective internal types. + * Creates a Transport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.StateCondition + * @memberof google.cloud.eventarc.v1.Transport * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.StateCondition} StateCondition + * @returns {google.cloud.eventarc.v1.Transport} Transport */ - StateCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.StateCondition) + Transport.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Transport) return object; - var message = new $root.google.cloud.eventarc.v1.StateCondition(); - switch (object.code) { - default: - if (typeof object.code === "number") { - message.code = object.code; - break; - } - break; - case "OK": - case 0: - message.code = 0; - break; - case "CANCELLED": - case 1: - message.code = 1; - break; - case "UNKNOWN": - case 2: - message.code = 2; - break; - case "INVALID_ARGUMENT": - case 3: - message.code = 3; - break; - case "DEADLINE_EXCEEDED": - case 4: - message.code = 4; - break; - case "NOT_FOUND": - case 5: - message.code = 5; - break; - case "ALREADY_EXISTS": - case 6: - message.code = 6; - break; - case "PERMISSION_DENIED": - case 7: - message.code = 7; - break; - case "UNAUTHENTICATED": - case 16: - message.code = 16; - break; - case "RESOURCE_EXHAUSTED": - case 8: - message.code = 8; - break; - case "FAILED_PRECONDITION": - case 9: - message.code = 9; - break; - case "ABORTED": - case 10: - message.code = 10; - break; - case "OUT_OF_RANGE": - case 11: - message.code = 11; - break; - case "UNIMPLEMENTED": - case 12: - message.code = 12; - break; - case "INTERNAL": - case 13: - message.code = 13; - break; - case "UNAVAILABLE": - case 14: - message.code = 14; - break; - case "DATA_LOSS": - case 15: - message.code = 15; - break; + var message = new $root.google.cloud.eventarc.v1.Transport(); + if (object.pubsub != null) { + if (typeof object.pubsub !== "object") + throw TypeError(".google.cloud.eventarc.v1.Transport.pubsub: object expected"); + message.pubsub = $root.google.cloud.eventarc.v1.Pubsub.fromObject(object.pubsub); } - if (object.message != null) - message.message = String(object.message); return message; }; /** - * Creates a plain object from a StateCondition message. Also converts values to other types if specified. + * Creates a plain object from a Transport message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.StateCondition + * @memberof google.cloud.eventarc.v1.Transport * @static - * @param {google.cloud.eventarc.v1.StateCondition} message StateCondition + * @param {google.cloud.eventarc.v1.Transport} message Transport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StateCondition.toObject = function toObject(message, options) { + Transport.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.code = options.enums === String ? "OK" : 0; - object.message = ""; + if (message.pubsub != null && message.hasOwnProperty("pubsub")) { + object.pubsub = $root.google.cloud.eventarc.v1.Pubsub.toObject(message.pubsub, options); + if (options.oneofs) + object.intermediary = "pubsub"; } - if (message.code != null && message.hasOwnProperty("code")) - object.code = options.enums === String ? $root.google.rpc.Code[message.code] === undefined ? message.code : $root.google.rpc.Code[message.code] : message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; return object; }; /** - * Converts this StateCondition to JSON. + * Converts this Transport to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.StateCondition + * @memberof google.cloud.eventarc.v1.Transport * @instance * @returns {Object.} JSON object */ - StateCondition.prototype.toJSON = function toJSON() { + Transport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StateCondition + * Gets the default type url for Transport * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.StateCondition + * @memberof google.cloud.eventarc.v1.Transport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StateCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Transport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.StateCondition"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.Transport"; }; - return StateCondition; + return Transport; })(); - v1.Destination = (function() { + v1.CloudRun = (function() { /** - * Properties of a Destination. + * Properties of a CloudRun. * @memberof google.cloud.eventarc.v1 - * @interface IDestination - * @property {google.cloud.eventarc.v1.ICloudRun|null} [cloudRun] Destination cloudRun - * @property {string|null} [cloudFunction] Destination cloudFunction - * @property {google.cloud.eventarc.v1.IGKE|null} [gke] Destination gke - * @property {string|null} [workflow] Destination workflow + * @interface ICloudRun + * @property {string|null} [service] CloudRun service + * @property {string|null} [path] CloudRun path + * @property {string|null} [region] CloudRun region */ /** - * Constructs a new Destination. + * Constructs a new CloudRun. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a Destination. - * @implements IDestination + * @classdesc Represents a CloudRun. + * @implements ICloudRun * @constructor - * @param {google.cloud.eventarc.v1.IDestination=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.ICloudRun=} [properties] Properties to set */ - function Destination(properties) { + function CloudRun(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9687,131 +23657,103 @@ } /** - * Destination cloudRun. - * @member {google.cloud.eventarc.v1.ICloudRun|null|undefined} cloudRun - * @memberof google.cloud.eventarc.v1.Destination - * @instance - */ - Destination.prototype.cloudRun = null; - - /** - * Destination cloudFunction. - * @member {string|null|undefined} cloudFunction - * @memberof google.cloud.eventarc.v1.Destination - * @instance - */ - Destination.prototype.cloudFunction = null; - - /** - * Destination gke. - * @member {google.cloud.eventarc.v1.IGKE|null|undefined} gke - * @memberof google.cloud.eventarc.v1.Destination + * CloudRun service. + * @member {string} service + * @memberof google.cloud.eventarc.v1.CloudRun * @instance */ - Destination.prototype.gke = null; + CloudRun.prototype.service = ""; /** - * Destination workflow. - * @member {string|null|undefined} workflow - * @memberof google.cloud.eventarc.v1.Destination + * CloudRun path. + * @member {string} path + * @memberof google.cloud.eventarc.v1.CloudRun * @instance */ - Destination.prototype.workflow = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CloudRun.prototype.path = ""; /** - * Destination descriptor. - * @member {"cloudRun"|"cloudFunction"|"gke"|"workflow"|undefined} descriptor - * @memberof google.cloud.eventarc.v1.Destination + * CloudRun region. + * @member {string} region + * @memberof google.cloud.eventarc.v1.CloudRun * @instance */ - Object.defineProperty(Destination.prototype, "descriptor", { - get: $util.oneOfGetter($oneOfFields = ["cloudRun", "cloudFunction", "gke", "workflow"]), - set: $util.oneOfSetter($oneOfFields) - }); + CloudRun.prototype.region = ""; /** - * Creates a new Destination instance using the specified properties. + * Creates a new CloudRun instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.Destination + * @memberof google.cloud.eventarc.v1.CloudRun * @static - * @param {google.cloud.eventarc.v1.IDestination=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.Destination} Destination instance + * @param {google.cloud.eventarc.v1.ICloudRun=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.CloudRun} CloudRun instance */ - Destination.create = function create(properties) { - return new Destination(properties); + CloudRun.create = function create(properties) { + return new CloudRun(properties); }; /** - * Encodes the specified Destination message. Does not implicitly {@link google.cloud.eventarc.v1.Destination.verify|verify} messages. + * Encodes the specified CloudRun message. Does not implicitly {@link google.cloud.eventarc.v1.CloudRun.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.Destination + * @memberof google.cloud.eventarc.v1.CloudRun * @static - * @param {google.cloud.eventarc.v1.IDestination} message Destination message or plain object to encode + * @param {google.cloud.eventarc.v1.ICloudRun} message CloudRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Destination.encode = function encode(message, writer) { + CloudRun.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cloudRun != null && Object.hasOwnProperty.call(message, "cloudRun")) - $root.google.cloud.eventarc.v1.CloudRun.encode(message.cloudRun, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cloudFunction); - if (message.gke != null && Object.hasOwnProperty.call(message, "gke")) - $root.google.cloud.eventarc.v1.GKE.encode(message.gke, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.workflow != null && Object.hasOwnProperty.call(message, "workflow")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.workflow); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.region); return writer; }; /** - * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Destination.verify|verify} messages. + * Encodes the specified CloudRun message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CloudRun.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.Destination + * @memberof google.cloud.eventarc.v1.CloudRun * @static - * @param {google.cloud.eventarc.v1.IDestination} message Destination message or plain object to encode + * @param {google.cloud.eventarc.v1.ICloudRun} message CloudRun message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Destination.encodeDelimited = function encodeDelimited(message, writer) { + CloudRun.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Destination message from the specified reader or buffer. + * Decodes a CloudRun message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.Destination + * @memberof google.cloud.eventarc.v1.CloudRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.Destination} Destination + * @returns {google.cloud.eventarc.v1.CloudRun} CloudRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Destination.decode = function decode(reader, length) { + CloudRun.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.eventarc.v1.Destination(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.CloudRun(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cloudRun = $root.google.cloud.eventarc.v1.CloudRun.decode(reader, reader.uint32()); + message.service = reader.string(); break; } case 2: { - message.cloudFunction = reader.string(); - break; - } - case 3: { - message.gke = $root.google.cloud.eventarc.v1.GKE.decode(reader, reader.uint32()); + message.path = reader.string(); break; - } - case 4: { - message.workflow = reader.string(); + } + case 3: { + message.region = reader.string(); break; } default: @@ -9823,180 +23765,143 @@ }; /** - * Decodes a Destination message from the specified reader or buffer, length delimited. + * Decodes a CloudRun message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.Destination + * @memberof google.cloud.eventarc.v1.CloudRun * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.Destination} Destination + * @returns {google.cloud.eventarc.v1.CloudRun} CloudRun * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Destination.decodeDelimited = function decodeDelimited(reader) { + CloudRun.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Destination message. + * Verifies a CloudRun message. * @function verify - * @memberof google.cloud.eventarc.v1.Destination + * @memberof google.cloud.eventarc.v1.CloudRun * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Destination.verify = function verify(message) { + CloudRun.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { - properties.descriptor = 1; - { - var error = $root.google.cloud.eventarc.v1.CloudRun.verify(message.cloudRun); - if (error) - return "cloudRun." + error; - } - } - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - if (properties.descriptor === 1) - return "descriptor: multiple values"; - properties.descriptor = 1; - if (!$util.isString(message.cloudFunction)) - return "cloudFunction: string expected"; - } - if (message.gke != null && message.hasOwnProperty("gke")) { - if (properties.descriptor === 1) - return "descriptor: multiple values"; - properties.descriptor = 1; - { - var error = $root.google.cloud.eventarc.v1.GKE.verify(message.gke); - if (error) - return "gke." + error; - } - } - if (message.workflow != null && message.hasOwnProperty("workflow")) { - if (properties.descriptor === 1) - return "descriptor: multiple values"; - properties.descriptor = 1; - if (!$util.isString(message.workflow)) - return "workflow: string expected"; - } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; return null; }; /** - * Creates a Destination message from a plain object. Also converts values to their respective internal types. + * Creates a CloudRun message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.Destination + * @memberof google.cloud.eventarc.v1.CloudRun * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.Destination} Destination + * @returns {google.cloud.eventarc.v1.CloudRun} CloudRun */ - Destination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.Destination) + CloudRun.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.CloudRun) return object; - var message = new $root.google.cloud.eventarc.v1.Destination(); - if (object.cloudRun != null) { - if (typeof object.cloudRun !== "object") - throw TypeError(".google.cloud.eventarc.v1.Destination.cloudRun: object expected"); - message.cloudRun = $root.google.cloud.eventarc.v1.CloudRun.fromObject(object.cloudRun); - } - if (object.cloudFunction != null) - message.cloudFunction = String(object.cloudFunction); - if (object.gke != null) { - if (typeof object.gke !== "object") - throw TypeError(".google.cloud.eventarc.v1.Destination.gke: object expected"); - message.gke = $root.google.cloud.eventarc.v1.GKE.fromObject(object.gke); - } - if (object.workflow != null) - message.workflow = String(object.workflow); + var message = new $root.google.cloud.eventarc.v1.CloudRun(); + if (object.service != null) + message.service = String(object.service); + if (object.path != null) + message.path = String(object.path); + if (object.region != null) + message.region = String(object.region); return message; }; /** - * Creates a plain object from a Destination message. Also converts values to other types if specified. + * Creates a plain object from a CloudRun message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.Destination + * @memberof google.cloud.eventarc.v1.CloudRun * @static - * @param {google.cloud.eventarc.v1.Destination} message Destination + * @param {google.cloud.eventarc.v1.CloudRun} message CloudRun * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Destination.toObject = function toObject(message, options) { + CloudRun.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.cloudRun != null && message.hasOwnProperty("cloudRun")) { - object.cloudRun = $root.google.cloud.eventarc.v1.CloudRun.toObject(message.cloudRun, options); - if (options.oneofs) - object.descriptor = "cloudRun"; - } - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - object.cloudFunction = message.cloudFunction; - if (options.oneofs) - object.descriptor = "cloudFunction"; - } - if (message.gke != null && message.hasOwnProperty("gke")) { - object.gke = $root.google.cloud.eventarc.v1.GKE.toObject(message.gke, options); - if (options.oneofs) - object.descriptor = "gke"; - } - if (message.workflow != null && message.hasOwnProperty("workflow")) { - object.workflow = message.workflow; - if (options.oneofs) - object.descriptor = "workflow"; + if (options.defaults) { + object.service = ""; + object.path = ""; + object.region = ""; } + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; return object; }; /** - * Converts this Destination to JSON. + * Converts this CloudRun to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.Destination + * @memberof google.cloud.eventarc.v1.CloudRun * @instance * @returns {Object.} JSON object */ - Destination.prototype.toJSON = function toJSON() { + CloudRun.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Destination + * Gets the default type url for CloudRun * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.Destination + * @memberof google.cloud.eventarc.v1.CloudRun * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Destination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.Destination"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.CloudRun"; }; - return Destination; + return CloudRun; })(); - v1.Transport = (function() { + v1.GKE = (function() { /** - * Properties of a Transport. + * Properties of a GKE. * @memberof google.cloud.eventarc.v1 - * @interface ITransport - * @property {google.cloud.eventarc.v1.IPubsub|null} [pubsub] Transport pubsub + * @interface IGKE + * @property {string|null} [cluster] GKE cluster + * @property {string|null} [location] GKE location + * @property {string|null} [namespace] GKE namespace + * @property {string|null} [service] GKE service + * @property {string|null} [path] GKE path */ /** - * Constructs a new Transport. + * Constructs a new GKE. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a Transport. - * @implements ITransport + * @classdesc Represents a GKE. + * @implements IGKE * @constructor - * @param {google.cloud.eventarc.v1.ITransport=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IGKE=} [properties] Properties to set */ - function Transport(properties) { + function GKE(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10004,89 +23909,131 @@ } /** - * Transport pubsub. - * @member {google.cloud.eventarc.v1.IPubsub|null|undefined} pubsub - * @memberof google.cloud.eventarc.v1.Transport + * GKE cluster. + * @member {string} cluster + * @memberof google.cloud.eventarc.v1.GKE * @instance */ - Transport.prototype.pubsub = null; + GKE.prototype.cluster = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * GKE location. + * @member {string} location + * @memberof google.cloud.eventarc.v1.GKE + * @instance + */ + GKE.prototype.location = ""; /** - * Transport intermediary. - * @member {"pubsub"|undefined} intermediary - * @memberof google.cloud.eventarc.v1.Transport + * GKE namespace. + * @member {string} namespace + * @memberof google.cloud.eventarc.v1.GKE * @instance */ - Object.defineProperty(Transport.prototype, "intermediary", { - get: $util.oneOfGetter($oneOfFields = ["pubsub"]), - set: $util.oneOfSetter($oneOfFields) - }); + GKE.prototype.namespace = ""; /** - * Creates a new Transport instance using the specified properties. + * GKE service. + * @member {string} service + * @memberof google.cloud.eventarc.v1.GKE + * @instance + */ + GKE.prototype.service = ""; + + /** + * GKE path. + * @member {string} path + * @memberof google.cloud.eventarc.v1.GKE + * @instance + */ + GKE.prototype.path = ""; + + /** + * Creates a new GKE instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.Transport + * @memberof google.cloud.eventarc.v1.GKE * @static - * @param {google.cloud.eventarc.v1.ITransport=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.Transport} Transport instance + * @param {google.cloud.eventarc.v1.IGKE=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.GKE} GKE instance */ - Transport.create = function create(properties) { - return new Transport(properties); + GKE.create = function create(properties) { + return new GKE(properties); }; /** - * Encodes the specified Transport message. Does not implicitly {@link google.cloud.eventarc.v1.Transport.verify|verify} messages. + * Encodes the specified GKE message. Does not implicitly {@link google.cloud.eventarc.v1.GKE.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.Transport + * @memberof google.cloud.eventarc.v1.GKE * @static - * @param {google.cloud.eventarc.v1.ITransport} message Transport message or plain object to encode + * @param {google.cloud.eventarc.v1.IGKE} message GKE message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Transport.encode = function encode(message, writer) { + GKE.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pubsub != null && Object.hasOwnProperty.call(message, "pubsub")) - $root.google.cloud.eventarc.v1.Pubsub.encode(message.pubsub, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.namespace); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.service); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.path); return writer; }; /** - * Encodes the specified Transport message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Transport.verify|verify} messages. + * Encodes the specified GKE message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GKE.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.Transport + * @memberof google.cloud.eventarc.v1.GKE * @static - * @param {google.cloud.eventarc.v1.ITransport} message Transport message or plain object to encode + * @param {google.cloud.eventarc.v1.IGKE} message GKE message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Transport.encodeDelimited = function encodeDelimited(message, writer) { + GKE.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Transport message from the specified reader or buffer. + * Decodes a GKE message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.Transport + * @memberof google.cloud.eventarc.v1.GKE * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.Transport} Transport + * @returns {google.cloud.eventarc.v1.GKE} GKE * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Transport.decode = function decode(reader, length) { + GKE.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.eventarc.v1.Transport(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.GKE(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.pubsub = $root.google.cloud.eventarc.v1.Pubsub.decode(reader, reader.uint32()); + message.cluster = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.namespace = reader.string(); + break; + } + case 4: { + message.service = reader.string(); + break; + } + case 5: { + message.path = reader.string(); break; } default: @@ -10098,134 +24045,156 @@ }; /** - * Decodes a Transport message from the specified reader or buffer, length delimited. + * Decodes a GKE message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.Transport + * @memberof google.cloud.eventarc.v1.GKE * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.Transport} Transport + * @returns {google.cloud.eventarc.v1.GKE} GKE * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Transport.decodeDelimited = function decodeDelimited(reader) { + GKE.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Transport message. + * Verifies a GKE message. * @function verify - * @memberof google.cloud.eventarc.v1.Transport + * @memberof google.cloud.eventarc.v1.GKE * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Transport.verify = function verify(message) { + GKE.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.pubsub != null && message.hasOwnProperty("pubsub")) { - properties.intermediary = 1; - { - var error = $root.google.cloud.eventarc.v1.Pubsub.verify(message.pubsub); - if (error) - return "pubsub." + error; - } - } + if (message.cluster != null && message.hasOwnProperty("cluster")) + if (!$util.isString(message.cluster)) + return "cluster: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.namespace != null && message.hasOwnProperty("namespace")) + if (!$util.isString(message.namespace)) + return "namespace: string expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a Transport message from a plain object. Also converts values to their respective internal types. + * Creates a GKE message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.Transport + * @memberof google.cloud.eventarc.v1.GKE * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.Transport} Transport + * @returns {google.cloud.eventarc.v1.GKE} GKE */ - Transport.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.Transport) + GKE.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.GKE) return object; - var message = new $root.google.cloud.eventarc.v1.Transport(); - if (object.pubsub != null) { - if (typeof object.pubsub !== "object") - throw TypeError(".google.cloud.eventarc.v1.Transport.pubsub: object expected"); - message.pubsub = $root.google.cloud.eventarc.v1.Pubsub.fromObject(object.pubsub); - } + var message = new $root.google.cloud.eventarc.v1.GKE(); + if (object.cluster != null) + message.cluster = String(object.cluster); + if (object.location != null) + message.location = String(object.location); + if (object.namespace != null) + message.namespace = String(object.namespace); + if (object.service != null) + message.service = String(object.service); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a Transport message. Also converts values to other types if specified. + * Creates a plain object from a GKE message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.Transport + * @memberof google.cloud.eventarc.v1.GKE * @static - * @param {google.cloud.eventarc.v1.Transport} message Transport + * @param {google.cloud.eventarc.v1.GKE} message GKE * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Transport.toObject = function toObject(message, options) { + GKE.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.pubsub != null && message.hasOwnProperty("pubsub")) { - object.pubsub = $root.google.cloud.eventarc.v1.Pubsub.toObject(message.pubsub, options); - if (options.oneofs) - object.intermediary = "pubsub"; + if (options.defaults) { + object.cluster = ""; + object.location = ""; + object.namespace = ""; + object.service = ""; + object.path = ""; } + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = message.cluster; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.namespace != null && message.hasOwnProperty("namespace")) + object.namespace = message.namespace; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this Transport to JSON. + * Converts this GKE to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.Transport + * @memberof google.cloud.eventarc.v1.GKE * @instance * @returns {Object.} JSON object */ - Transport.prototype.toJSON = function toJSON() { + GKE.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Transport + * Gets the default type url for GKE * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.Transport + * @memberof google.cloud.eventarc.v1.GKE * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Transport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GKE.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.Transport"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.GKE"; }; - return Transport; + return GKE; })(); - v1.CloudRun = (function() { + v1.Pubsub = (function() { /** - * Properties of a CloudRun. + * Properties of a Pubsub. * @memberof google.cloud.eventarc.v1 - * @interface ICloudRun - * @property {string|null} [service] CloudRun service - * @property {string|null} [path] CloudRun path - * @property {string|null} [region] CloudRun region + * @interface IPubsub + * @property {string|null} [topic] Pubsub topic + * @property {string|null} [subscription] Pubsub subscription */ /** - * Constructs a new CloudRun. + * Constructs a new Pubsub. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a CloudRun. - * @implements ICloudRun + * @classdesc Represents a Pubsub. + * @implements IPubsub * @constructor - * @param {google.cloud.eventarc.v1.ICloudRun=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IPubsub=} [properties] Properties to set */ - function CloudRun(properties) { + function Pubsub(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10233,103 +24202,89 @@ } /** - * CloudRun service. - * @member {string} service - * @memberof google.cloud.eventarc.v1.CloudRun - * @instance - */ - CloudRun.prototype.service = ""; - - /** - * CloudRun path. - * @member {string} path - * @memberof google.cloud.eventarc.v1.CloudRun + * Pubsub topic. + * @member {string} topic + * @memberof google.cloud.eventarc.v1.Pubsub * @instance */ - CloudRun.prototype.path = ""; + Pubsub.prototype.topic = ""; /** - * CloudRun region. - * @member {string} region - * @memberof google.cloud.eventarc.v1.CloudRun + * Pubsub subscription. + * @member {string} subscription + * @memberof google.cloud.eventarc.v1.Pubsub * @instance */ - CloudRun.prototype.region = ""; + Pubsub.prototype.subscription = ""; /** - * Creates a new CloudRun instance using the specified properties. + * Creates a new Pubsub instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.CloudRun + * @memberof google.cloud.eventarc.v1.Pubsub * @static - * @param {google.cloud.eventarc.v1.ICloudRun=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.CloudRun} CloudRun instance + * @param {google.cloud.eventarc.v1.IPubsub=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.Pubsub} Pubsub instance */ - CloudRun.create = function create(properties) { - return new CloudRun(properties); + Pubsub.create = function create(properties) { + return new Pubsub(properties); }; /** - * Encodes the specified CloudRun message. Does not implicitly {@link google.cloud.eventarc.v1.CloudRun.verify|verify} messages. + * Encodes the specified Pubsub message. Does not implicitly {@link google.cloud.eventarc.v1.Pubsub.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.CloudRun + * @memberof google.cloud.eventarc.v1.Pubsub * @static - * @param {google.cloud.eventarc.v1.ICloudRun} message CloudRun message or plain object to encode + * @param {google.cloud.eventarc.v1.IPubsub} message Pubsub message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudRun.encode = function encode(message, writer) { + Pubsub.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.region); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subscription); return writer; }; /** - * Encodes the specified CloudRun message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.CloudRun.verify|verify} messages. + * Encodes the specified Pubsub message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pubsub.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.CloudRun + * @memberof google.cloud.eventarc.v1.Pubsub * @static - * @param {google.cloud.eventarc.v1.ICloudRun} message CloudRun message or plain object to encode + * @param {google.cloud.eventarc.v1.IPubsub} message Pubsub message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudRun.encodeDelimited = function encodeDelimited(message, writer) { + Pubsub.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudRun message from the specified reader or buffer. + * Decodes a Pubsub message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.CloudRun + * @memberof google.cloud.eventarc.v1.Pubsub * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.CloudRun} CloudRun + * @returns {google.cloud.eventarc.v1.Pubsub} Pubsub * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudRun.decode = function decode(reader, length) { + Pubsub.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.eventarc.v1.CloudRun(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.Pubsub(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.service = reader.string(); + message.topic = reader.string(); break; } case 2: { - message.path = reader.string(); - break; - } - case 3: { - message.region = reader.string(); + message.subscription = reader.string(); break; } default: @@ -10341,143 +24296,131 @@ }; /** - * Decodes a CloudRun message from the specified reader or buffer, length delimited. + * Decodes a Pubsub message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.CloudRun + * @memberof google.cloud.eventarc.v1.Pubsub * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.CloudRun} CloudRun + * @returns {google.cloud.eventarc.v1.Pubsub} Pubsub * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudRun.decodeDelimited = function decodeDelimited(reader) { + Pubsub.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudRun message. + * Verifies a Pubsub message. * @function verify - * @memberof google.cloud.eventarc.v1.CloudRun + * @memberof google.cloud.eventarc.v1.Pubsub * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudRun.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; + Pubsub.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.subscription != null && message.hasOwnProperty("subscription")) + if (!$util.isString(message.subscription)) + return "subscription: string expected"; return null; }; /** - * Creates a CloudRun message from a plain object. Also converts values to their respective internal types. + * Creates a Pubsub message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.CloudRun + * @memberof google.cloud.eventarc.v1.Pubsub * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.CloudRun} CloudRun + * @returns {google.cloud.eventarc.v1.Pubsub} Pubsub */ - CloudRun.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.CloudRun) + Pubsub.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.Pubsub) return object; - var message = new $root.google.cloud.eventarc.v1.CloudRun(); - if (object.service != null) - message.service = String(object.service); - if (object.path != null) - message.path = String(object.path); - if (object.region != null) - message.region = String(object.region); + var message = new $root.google.cloud.eventarc.v1.Pubsub(); + if (object.topic != null) + message.topic = String(object.topic); + if (object.subscription != null) + message.subscription = String(object.subscription); return message; }; /** - * Creates a plain object from a CloudRun message. Also converts values to other types if specified. + * Creates a plain object from a Pubsub message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.CloudRun + * @memberof google.cloud.eventarc.v1.Pubsub * @static - * @param {google.cloud.eventarc.v1.CloudRun} message CloudRun + * @param {google.cloud.eventarc.v1.Pubsub} message Pubsub * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudRun.toObject = function toObject(message, options) { + Pubsub.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.service = ""; - object.path = ""; - object.region = ""; + object.topic = ""; + object.subscription = ""; } - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.subscription != null && message.hasOwnProperty("subscription")) + object.subscription = message.subscription; return object; }; /** - * Converts this CloudRun to JSON. + * Converts this Pubsub to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.CloudRun + * @memberof google.cloud.eventarc.v1.Pubsub * @instance * @returns {Object.} JSON object */ - CloudRun.prototype.toJSON = function toJSON() { + Pubsub.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudRun + * Gets the default type url for Pubsub * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.CloudRun + * @memberof google.cloud.eventarc.v1.Pubsub * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudRun.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Pubsub.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.CloudRun"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.Pubsub"; }; - return CloudRun; + return Pubsub; })(); - v1.GKE = (function() { + v1.HttpEndpoint = (function() { /** - * Properties of a GKE. + * Properties of a HttpEndpoint. * @memberof google.cloud.eventarc.v1 - * @interface IGKE - * @property {string|null} [cluster] GKE cluster - * @property {string|null} [location] GKE location - * @property {string|null} [namespace] GKE namespace - * @property {string|null} [service] GKE service - * @property {string|null} [path] GKE path + * @interface IHttpEndpoint + * @property {string|null} [uri] HttpEndpoint uri */ /** - * Constructs a new GKE. + * Constructs a new HttpEndpoint. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a GKE. - * @implements IGKE + * @classdesc Represents a HttpEndpoint. + * @implements IHttpEndpoint * @constructor - * @param {google.cloud.eventarc.v1.IGKE=} [properties] Properties to set + * @param {google.cloud.eventarc.v1.IHttpEndpoint=} [properties] Properties to set */ - function GKE(properties) { + function HttpEndpoint(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10485,131 +24428,75 @@ } /** - * GKE cluster. - * @member {string} cluster - * @memberof google.cloud.eventarc.v1.GKE - * @instance - */ - GKE.prototype.cluster = ""; - - /** - * GKE location. - * @member {string} location - * @memberof google.cloud.eventarc.v1.GKE - * @instance - */ - GKE.prototype.location = ""; - - /** - * GKE namespace. - * @member {string} namespace - * @memberof google.cloud.eventarc.v1.GKE - * @instance - */ - GKE.prototype.namespace = ""; - - /** - * GKE service. - * @member {string} service - * @memberof google.cloud.eventarc.v1.GKE - * @instance - */ - GKE.prototype.service = ""; - - /** - * GKE path. - * @member {string} path - * @memberof google.cloud.eventarc.v1.GKE + * HttpEndpoint uri. + * @member {string} uri + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @instance */ - GKE.prototype.path = ""; + HttpEndpoint.prototype.uri = ""; /** - * Creates a new GKE instance using the specified properties. + * Creates a new HttpEndpoint instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.GKE + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @static - * @param {google.cloud.eventarc.v1.IGKE=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.GKE} GKE instance + * @param {google.cloud.eventarc.v1.IHttpEndpoint=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.HttpEndpoint} HttpEndpoint instance */ - GKE.create = function create(properties) { - return new GKE(properties); + HttpEndpoint.create = function create(properties) { + return new HttpEndpoint(properties); }; /** - * Encodes the specified GKE message. Does not implicitly {@link google.cloud.eventarc.v1.GKE.verify|verify} messages. + * Encodes the specified HttpEndpoint message. Does not implicitly {@link google.cloud.eventarc.v1.HttpEndpoint.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.GKE + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @static - * @param {google.cloud.eventarc.v1.IGKE} message GKE message or plain object to encode + * @param {google.cloud.eventarc.v1.IHttpEndpoint} message HttpEndpoint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GKE.encode = function encode(message, writer) { + HttpEndpoint.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cluster); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.namespace); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.service); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.path); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; }; /** - * Encodes the specified GKE message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.GKE.verify|verify} messages. + * Encodes the specified HttpEndpoint message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.HttpEndpoint.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.GKE + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @static - * @param {google.cloud.eventarc.v1.IGKE} message GKE message or plain object to encode + * @param {google.cloud.eventarc.v1.IHttpEndpoint} message HttpEndpoint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GKE.encodeDelimited = function encodeDelimited(message, writer) { + HttpEndpoint.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GKE message from the specified reader or buffer. + * Decodes a HttpEndpoint message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.GKE + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.GKE} GKE + * @returns {google.cloud.eventarc.v1.HttpEndpoint} HttpEndpoint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GKE.decode = function decode(reader, length) { + HttpEndpoint.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.eventarc.v1.GKE(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.HttpEndpoint(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cluster = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.namespace = reader.string(); - break; - } - case 4: { - message.service = reader.string(); - break; - } - case 5: { - message.path = reader.string(); + message.uri = reader.string(); break; } default: @@ -10621,246 +24508,198 @@ }; /** - * Decodes a GKE message from the specified reader or buffer, length delimited. + * Decodes a HttpEndpoint message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.GKE + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.GKE} GKE + * @returns {google.cloud.eventarc.v1.HttpEndpoint} HttpEndpoint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GKE.decodeDelimited = function decodeDelimited(reader) { + HttpEndpoint.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GKE message. + * Verifies a HttpEndpoint message. * @function verify - * @memberof google.cloud.eventarc.v1.GKE + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GKE.verify = function verify(message) { + HttpEndpoint.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) - if (!$util.isString(message.cluster)) - return "cluster: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.namespace != null && message.hasOwnProperty("namespace")) - if (!$util.isString(message.namespace)) - return "namespace: string expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; return null; }; /** - * Creates a GKE message from a plain object. Also converts values to their respective internal types. + * Creates a HttpEndpoint message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.GKE + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.GKE} GKE + * @returns {google.cloud.eventarc.v1.HttpEndpoint} HttpEndpoint */ - GKE.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.GKE) + HttpEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.HttpEndpoint) return object; - var message = new $root.google.cloud.eventarc.v1.GKE(); - if (object.cluster != null) - message.cluster = String(object.cluster); - if (object.location != null) - message.location = String(object.location); - if (object.namespace != null) - message.namespace = String(object.namespace); - if (object.service != null) - message.service = String(object.service); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.cloud.eventarc.v1.HttpEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); return message; }; /** - * Creates a plain object from a GKE message. Also converts values to other types if specified. + * Creates a plain object from a HttpEndpoint message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.GKE + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @static - * @param {google.cloud.eventarc.v1.GKE} message GKE + * @param {google.cloud.eventarc.v1.HttpEndpoint} message HttpEndpoint * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GKE.toObject = function toObject(message, options) { + HttpEndpoint.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.cluster = ""; - object.location = ""; - object.namespace = ""; - object.service = ""; - object.path = ""; - } - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = message.cluster; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.namespace != null && message.hasOwnProperty("namespace")) - object.namespace = message.namespace; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; return object; }; /** - * Converts this GKE to JSON. + * Converts this HttpEndpoint to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.GKE + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @instance * @returns {Object.} JSON object */ - GKE.prototype.toJSON = function toJSON() { + HttpEndpoint.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GKE + * Gets the default type url for HttpEndpoint * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.GKE + * @memberof google.cloud.eventarc.v1.HttpEndpoint * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GKE.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HttpEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.GKE"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.HttpEndpoint"; }; - return GKE; + return HttpEndpoint; })(); - v1.Pubsub = (function() { + v1.NetworkConfig = (function() { /** - * Properties of a Pubsub. + * Properties of a NetworkConfig. * @memberof google.cloud.eventarc.v1 - * @interface IPubsub - * @property {string|null} [topic] Pubsub topic - * @property {string|null} [subscription] Pubsub subscription + * @interface INetworkConfig + * @property {string|null} [networkAttachment] NetworkConfig networkAttachment */ /** - * Constructs a new Pubsub. + * Constructs a new NetworkConfig. * @memberof google.cloud.eventarc.v1 - * @classdesc Represents a Pubsub. - * @implements IPubsub + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig * @constructor - * @param {google.cloud.eventarc.v1.IPubsub=} [properties] Properties to set - */ - function Pubsub(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]]; - } - - /** - * Pubsub topic. - * @member {string} topic - * @memberof google.cloud.eventarc.v1.Pubsub - * @instance + * @param {google.cloud.eventarc.v1.INetworkConfig=} [properties] Properties to set */ - Pubsub.prototype.topic = ""; + function NetworkConfig(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]]; + } /** - * Pubsub subscription. - * @member {string} subscription - * @memberof google.cloud.eventarc.v1.Pubsub + * NetworkConfig networkAttachment. + * @member {string} networkAttachment + * @memberof google.cloud.eventarc.v1.NetworkConfig * @instance */ - Pubsub.prototype.subscription = ""; + NetworkConfig.prototype.networkAttachment = ""; /** - * Creates a new Pubsub instance using the specified properties. + * Creates a new NetworkConfig instance using the specified properties. * @function create - * @memberof google.cloud.eventarc.v1.Pubsub + * @memberof google.cloud.eventarc.v1.NetworkConfig * @static - * @param {google.cloud.eventarc.v1.IPubsub=} [properties] Properties to set - * @returns {google.cloud.eventarc.v1.Pubsub} Pubsub instance + * @param {google.cloud.eventarc.v1.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.eventarc.v1.NetworkConfig} NetworkConfig instance */ - Pubsub.create = function create(properties) { - return new Pubsub(properties); + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); }; /** - * Encodes the specified Pubsub message. Does not implicitly {@link google.cloud.eventarc.v1.Pubsub.verify|verify} messages. + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.eventarc.v1.NetworkConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.eventarc.v1.Pubsub + * @memberof google.cloud.eventarc.v1.NetworkConfig * @static - * @param {google.cloud.eventarc.v1.IPubsub} message Pubsub message or plain object to encode + * @param {google.cloud.eventarc.v1.INetworkConfig} message NetworkConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Pubsub.encode = function encode(message, writer) { + NetworkConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subscription); + if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.networkAttachment); return writer; }; /** - * Encodes the specified Pubsub message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.Pubsub.verify|verify} messages. + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.eventarc.v1.NetworkConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.eventarc.v1.Pubsub + * @memberof google.cloud.eventarc.v1.NetworkConfig * @static - * @param {google.cloud.eventarc.v1.IPubsub} message Pubsub message or plain object to encode + * @param {google.cloud.eventarc.v1.INetworkConfig} message NetworkConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Pubsub.encodeDelimited = function encodeDelimited(message, writer) { + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Pubsub message from the specified reader or buffer. + * Decodes a NetworkConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.eventarc.v1.Pubsub + * @memberof google.cloud.eventarc.v1.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.v1.Pubsub} Pubsub + * @returns {google.cloud.eventarc.v1.NetworkConfig} NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Pubsub.decode = function decode(reader, length) { + NetworkConfig.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.eventarc.v1.Pubsub(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.v1.NetworkConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.topic = reader.string(); - break; - } - case 2: { - message.subscription = reader.string(); + message.networkAttachment = reader.string(); break; } default: @@ -10872,111 +24711,102 @@ }; /** - * Decodes a Pubsub message from the specified reader or buffer, length delimited. + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.eventarc.v1.Pubsub + * @memberof google.cloud.eventarc.v1.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.v1.Pubsub} Pubsub + * @returns {google.cloud.eventarc.v1.NetworkConfig} NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Pubsub.decodeDelimited = function decodeDelimited(reader) { + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Pubsub message. + * Verifies a NetworkConfig message. * @function verify - * @memberof google.cloud.eventarc.v1.Pubsub + * @memberof google.cloud.eventarc.v1.NetworkConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Pubsub.verify = function verify(message) { + NetworkConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.topic != null && message.hasOwnProperty("topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.subscription != null && message.hasOwnProperty("subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) + if (!$util.isString(message.networkAttachment)) + return "networkAttachment: string expected"; return null; }; /** - * Creates a Pubsub message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.eventarc.v1.Pubsub + * @memberof google.cloud.eventarc.v1.NetworkConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.v1.Pubsub} Pubsub + * @returns {google.cloud.eventarc.v1.NetworkConfig} NetworkConfig */ - Pubsub.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.v1.Pubsub) + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.v1.NetworkConfig) return object; - var message = new $root.google.cloud.eventarc.v1.Pubsub(); - if (object.topic != null) - message.topic = String(object.topic); - if (object.subscription != null) - message.subscription = String(object.subscription); + var message = new $root.google.cloud.eventarc.v1.NetworkConfig(); + if (object.networkAttachment != null) + message.networkAttachment = String(object.networkAttachment); return message; }; /** - * Creates a plain object from a Pubsub message. Also converts values to other types if specified. + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.eventarc.v1.Pubsub + * @memberof google.cloud.eventarc.v1.NetworkConfig * @static - * @param {google.cloud.eventarc.v1.Pubsub} message Pubsub + * @param {google.cloud.eventarc.v1.NetworkConfig} message NetworkConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Pubsub.toObject = function toObject(message, options) { + NetworkConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.topic = ""; - object.subscription = ""; - } - if (message.topic != null && message.hasOwnProperty("topic")) - object.topic = message.topic; - if (message.subscription != null && message.hasOwnProperty("subscription")) - object.subscription = message.subscription; + if (options.defaults) + object.networkAttachment = ""; + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) + object.networkAttachment = message.networkAttachment; return object; }; /** - * Converts this Pubsub to JSON. + * Converts this NetworkConfig to JSON. * @function toJSON - * @memberof google.cloud.eventarc.v1.Pubsub + * @memberof google.cloud.eventarc.v1.NetworkConfig * @instance * @returns {Object.} JSON object */ - Pubsub.prototype.toJSON = function toJSON() { + NetworkConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Pubsub + * Gets the default type url for NetworkConfig * @function getTypeUrl - * @memberof google.cloud.eventarc.v1.Pubsub + * @memberof google.cloud.eventarc.v1.NetworkConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Pubsub.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.eventarc.v1.Pubsub"; + return typeUrlPrefix + "/google.cloud.eventarc.v1.NetworkConfig"; }; - return Pubsub; + return NetworkConfig; })(); return v1; @@ -16601,6 +30431,263 @@ return values; })(); + api.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; + + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; + })(); + return api; })(); @@ -22775,6 +36862,7 @@ * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo */ /** @@ -22916,6 +37004,14 @@ */ FieldOptions.prototype[".google.api.resourceReference"] = null; + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + /** * Creates a new FieldOptions instance using the specified properties. * @function create @@ -22977,6 +37073,8 @@ } if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); return writer; }; @@ -23089,6 +37187,10 @@ message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23236,6 +37338,11 @@ if (error) return ".google.api.resourceReference." + error; } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } return null; }; @@ -23455,6 +37562,11 @@ throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } return message; }; @@ -23489,6 +37601,7 @@ object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; object[".google.api.resourceReference"] = null; + object[".google.api.fieldInfo"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; @@ -23532,6 +37645,8 @@ } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); return object; }; diff --git a/packages/google-cloud-eventarc/protos/protos.json b/packages/google-cloud-eventarc/protos/protos.json index 19fd6557023..fef970fe243 100644 --- a/packages/google-cloud-eventarc/protos/protos.json +++ b/packages/google-cloud-eventarc/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -11,12 +14,12 @@ "csharp_namespace": "Google.Cloud.Eventarc.V1", "go_package": "cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb", "java_multiple_files": true, - "java_outer_classname": "TriggerProto", + "java_outer_classname": "NetworkConfigProto", "java_package": "com.google.cloud.eventarc.v1", "php_namespace": "Google\\Cloud\\Eventarc\\V1", "ruby_package": "Google::Cloud::Eventarc::V1", - "(google.api.resource_definition).type": "workflows.googleapis.com/Workflow", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/workflows/{workflow}" + "(google.api.resource_definition).type": "compute.googleapis.com/NetworkAttachment", + "(google.api.resource_definition).pattern": "projects/{project}/regions/{region}/networkAttachments/{networkattachment}" }, "nested": { "Channel": { @@ -91,9 +94,15 @@ "type": "string", "id": 11, "options": { - "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" } + }, + "satisfiesPzs": { + "type": "bool", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -257,6 +266,96 @@ } } }, + "Enrollment": { + "options": { + "(google.api.resource).type": "eventarc.googleapis.com/Enrollment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/enrollments/{enrollment}", + "(google.api.resource).plural": "enrollments", + "(google.api.resource).singular": "enrollment" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "celMatch": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "messageBus": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/MessageBus" + } + }, + "destination": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "Eventarc": { "options": { "(google.api.default_host)": "eventarc.googleapis.com", @@ -662,529 +761,2331 @@ "(google.api.method_signature)": "google_channel_config,update_mask" } ] - } - } - }, - "GetTriggerRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "eventarc.googleapis.com/Trigger" - } - } - } - }, - "ListTriggersRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Trigger" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "orderBy": { - "type": "string", - "id": 4 - }, - "filter": { - "type": "string", - "id": 5 - } - } - }, - "ListTriggersResponse": { - "fields": { - "triggers": { - "rule": "repeated", - "type": "Trigger", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "CreateTriggerRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + "GetMessageBus": { + "requestType": "GetMessageBusRequest", + "responseType": "MessageBus", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Trigger" - } + "(google.api.http).get": "/v1/{name=projects/*/locations/*/messageBuses/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/messageBuses/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "trigger": { - "type": "Trigger", - "id": 2, + "ListMessageBuses": { + "requestType": "ListMessageBusesRequest", + "responseType": "ListMessageBusesResponse", "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/messageBuses", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/messageBuses" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "triggerId": { - "type": "string", - "id": 3, + "ListMessageBusEnrollments": { + "requestType": "ListMessageBusEnrollmentsRequest", + "responseType": "ListMessageBusEnrollmentsResponse", "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/messageBuses/*}:listEnrollments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/messageBuses/*}:listEnrollments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "validateOnly": { - "type": "bool", - "id": 4, + "CreateMessageBus": { + "requestType": "CreateMessageBusRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateTriggerRequest": { - "fields": { - "trigger": { - "type": "Trigger", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/messageBuses", + "(google.api.http).body": "message_bus", + "(google.api.method_signature)": "parent,message_bus,message_bus_id", + "(google.longrunning.operation_info).response_type": "MessageBus", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/messageBuses", + "body": "message_bus" + } + }, + { + "(google.api.method_signature)": "parent,message_bus,message_bus_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MessageBus", + "metadata_type": "OperationMetadata" + } + } + ] }, - "allowMissing": { - "type": "bool", - "id": 3 + "UpdateMessageBus": { + "requestType": "UpdateMessageBusRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{message_bus.name=projects/*/locations/*/messageBuses/*}", + "(google.api.http).body": "message_bus", + "(google.api.method_signature)": "message_bus,update_mask", + "(google.longrunning.operation_info).response_type": "MessageBus", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{message_bus.name=projects/*/locations/*/messageBuses/*}", + "body": "message_bus" + } + }, + { + "(google.api.method_signature)": "message_bus,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MessageBus", + "metadata_type": "OperationMetadata" + } + } + ] }, - "validateOnly": { - "type": "bool", - "id": 4, + "DeleteMessageBus": { + "requestType": "DeleteMessageBusRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/messageBuses/*}", + "(google.api.method_signature)": "name,etag", + "(google.longrunning.operation_info).response_type": "MessageBus", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/messageBuses/*}" + } + }, + { + "(google.api.method_signature)": "name,etag" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MessageBus", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetEnrollment": { + "requestType": "GetEnrollmentRequest", + "responseType": "Enrollment", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/enrollments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/enrollments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEnrollments": { + "requestType": "ListEnrollmentsRequest", + "responseType": "ListEnrollmentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/enrollments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/enrollments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateEnrollment": { + "requestType": "CreateEnrollmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/enrollments", + "(google.api.http).body": "enrollment", + "(google.api.method_signature)": "parent,enrollment,enrollment_id", + "(google.longrunning.operation_info).response_type": "Enrollment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/enrollments", + "body": "enrollment" + } + }, + { + "(google.api.method_signature)": "parent,enrollment,enrollment_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Enrollment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateEnrollment": { + "requestType": "UpdateEnrollmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{enrollment.name=projects/*/locations/*/enrollments/*}", + "(google.api.http).body": "enrollment", + "(google.api.method_signature)": "enrollment,update_mask", + "(google.longrunning.operation_info).response_type": "Enrollment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{enrollment.name=projects/*/locations/*/enrollments/*}", + "body": "enrollment" + } + }, + { + "(google.api.method_signature)": "enrollment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Enrollment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteEnrollment": { + "requestType": "DeleteEnrollmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/enrollments/*}", + "(google.api.method_signature)": "name,etag", + "(google.longrunning.operation_info).response_type": "Enrollment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/enrollments/*}" + } + }, + { + "(google.api.method_signature)": "name,etag" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Enrollment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetPipeline": { + "requestType": "GetPipelineRequest", + "responseType": "Pipeline", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/pipelines/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/pipelines/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPipelines": { + "requestType": "ListPipelinesRequest", + "responseType": "ListPipelinesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/pipelines", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/pipelines" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreatePipeline": { + "requestType": "CreatePipelineRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/pipelines", + "(google.api.http).body": "pipeline", + "(google.api.method_signature)": "parent,pipeline,pipeline_id", + "(google.longrunning.operation_info).response_type": "Pipeline", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/pipelines", + "body": "pipeline" + } + }, + { + "(google.api.method_signature)": "parent,pipeline,pipeline_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Pipeline", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdatePipeline": { + "requestType": "UpdatePipelineRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{pipeline.name=projects/*/locations/*/pipelines/*}", + "(google.api.http).body": "pipeline", + "(google.api.method_signature)": "pipeline,update_mask", + "(google.longrunning.operation_info).response_type": "Pipeline", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{pipeline.name=projects/*/locations/*/pipelines/*}", + "body": "pipeline" + } + }, + { + "(google.api.method_signature)": "pipeline,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Pipeline", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeletePipeline": { + "requestType": "DeletePipelineRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/pipelines/*}", + "(google.api.method_signature)": "name,etag", + "(google.longrunning.operation_info).response_type": "Pipeline", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/pipelines/*}" + } + }, + { + "(google.api.method_signature)": "name,etag" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Pipeline", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetGoogleApiSource": { + "requestType": "GetGoogleApiSourceRequest", + "responseType": "GoogleApiSource", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/googleApiSources/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/googleApiSources/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListGoogleApiSources": { + "requestType": "ListGoogleApiSourcesRequest", + "responseType": "ListGoogleApiSourcesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/googleApiSources", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/googleApiSources" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateGoogleApiSource": { + "requestType": "CreateGoogleApiSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/googleApiSources", + "(google.api.http).body": "google_api_source", + "(google.api.method_signature)": "parent,google_api_source,google_api_source_id", + "(google.longrunning.operation_info).response_type": "GoogleApiSource", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/googleApiSources", + "body": "google_api_source" + } + }, + { + "(google.api.method_signature)": "parent,google_api_source,google_api_source_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GoogleApiSource", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateGoogleApiSource": { + "requestType": "UpdateGoogleApiSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{google_api_source.name=projects/*/locations/*/googleApiSources/*}", + "(google.api.http).body": "google_api_source", + "(google.api.method_signature)": "google_api_source,update_mask", + "(google.longrunning.operation_info).response_type": "GoogleApiSource", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{google_api_source.name=projects/*/locations/*/googleApiSources/*}", + "body": "google_api_source" + } + }, + { + "(google.api.method_signature)": "google_api_source,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GoogleApiSource", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteGoogleApiSource": { + "requestType": "DeleteGoogleApiSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/googleApiSources/*}", + "(google.api.method_signature)": "name,etag", + "(google.longrunning.operation_info).response_type": "GoogleApiSource", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/googleApiSources/*}" + } + }, + { + "(google.api.method_signature)": "name,etag" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "GoogleApiSource", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "GetTriggerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/Trigger" + } + } + } + }, + "ListTriggersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Trigger" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListTriggersResponse": { + "fields": { + "triggers": { + "rule": "repeated", + "type": "Trigger", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateTriggerRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Trigger" + } + }, + "trigger": { + "type": "Trigger", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "triggerId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateTriggerRequest": { + "fields": { + "trigger": { + "type": "Trigger", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "allowMissing": { + "type": "bool", + "id": 3 + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteTriggerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/Trigger" + } + }, + "etag": { + "type": "string", + "id": 2 + }, + "allowMissing": { + "type": "bool", + "id": 3 + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetChannelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/Channel" + } + } + } + }, + "ListChannelsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Channel" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + } + } + }, + "ListChannelsResponse": { + "fields": { + "channels": { + "rule": "repeated", + "type": "Channel", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateChannelRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Channel" + } + }, + "channel": { + "type": "Channel", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "channelId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateChannelRequest": { + "fields": { + "channel": { + "type": "Channel", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteChannelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/Channel" + } + }, + "validateOnly": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetProviderRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/Provider" + } + } + } + }, + "ListProvidersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Provider" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListProvidersResponse": { + "fields": { + "providers": { + "rule": "repeated", + "type": "Provider", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetChannelConnectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/ChannelConnection" + } + } + } + }, + "ListChannelConnectionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/ChannelConnection" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListChannelConnectionsResponse": { + "fields": { + "channelConnections": { + "rule": "repeated", + "type": "ChannelConnection", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateChannelConnectionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/ChannelConnection" + } + }, + "channelConnection": { + "type": "ChannelConnection", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "channelConnectionId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteChannelConnectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/ChannelConnection" + } + } + } + }, + "UpdateGoogleChannelConfigRequest": { + "fields": { + "googleChannelConfig": { + "type": "GoogleChannelConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "GetGoogleChannelConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/GoogleChannelConfig" + } + } + } + }, + "GetMessageBusRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/MessageBus" + } + } + } + }, + "ListMessageBusesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/MessageBus" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMessageBusesResponse": { + "fields": { + "messageBuses": { + "rule": "repeated", + "type": "MessageBus", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "ListMessageBusEnrollmentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/MessageBus" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMessageBusEnrollmentsResponse": { + "fields": { + "enrollments": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateMessageBusRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/MessageBus" + } + }, + "messageBus": { + "type": "MessageBus", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "messageBusId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateMessageBusRequest": { + "fields": { + "messageBus": { + "type": "MessageBus", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteMessageBusRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/MessageBus" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetEnrollmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/Enrollment" + } + } + } + }, + "ListEnrollmentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Enrollment" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEnrollmentsResponse": { + "fields": { + "enrollments": { + "rule": "repeated", + "type": "Enrollment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateEnrollmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Enrollment" + } + }, + "enrollment": { + "type": "Enrollment", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "enrollmentId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateEnrollmentRequest": { + "fields": { + "enrollment": { + "type": "Enrollment", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "DeleteTriggerRequest": { + "DeleteEnrollmentRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "eventarc.googleapis.com/Trigger" + "(google.api.resource_reference).type": "eventarc.googleapis.com/Enrollment" } }, "etag": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "allowMissing": { "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetPipelineRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/Pipeline" + } + } + } + }, + "ListPipelinesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Pipeline" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPipelinesResponse": { + "fields": { + "pipelines": { + "rule": "repeated", + "type": "Pipeline", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", "id": 3 + } + } + }, + "CreatePipelineRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Pipeline" + } + }, + "pipeline": { + "type": "Pipeline", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pipelineId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "validateOnly": { "type": "bool", "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdatePipelineRequest": { + "fields": { + "pipeline": { + "type": "Pipeline", + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "GetChannelRequest": { + "DeletePipelineRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "eventarc.googleapis.com/Channel" + "(google.api.resource_reference).type": "eventarc.googleapis.com/Pipeline" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListChannelsRequest": { + "GetGoogleApiSourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/GoogleApiSource" + } + } + } + }, + "ListGoogleApiSourcesRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Channel" + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/GoogleApiSource" } }, "pageSize": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "orderBy": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "ListChannelsResponse": { + "ListGoogleApiSourcesResponse": { "fields": { - "channels": { + "googleApiSources": { "rule": "repeated", - "type": "Channel", + "type": "GoogleApiSource", "id": 1 }, "nextPageToken": { "type": "string", "id": 2 }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateGoogleApiSourceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "eventarc.googleapis.com/GoogleApiSource" + } + }, + "googleApiSource": { + "type": "GoogleApiSource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "googleApiSourceId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateGoogleApiSourceRequest": { + "fields": { + "googleApiSource": { + "type": "GoogleApiSource", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "CreateChannelRequest": { + "DeleteGoogleApiSourceRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Channel" + "(google.api.resource_reference).type": "eventarc.googleapis.com/GoogleApiSource" } }, - "channel": { - "type": "Channel", + "etag": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "channelId": { - "type": "string", + "allowMissing": { + "type": "bool", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, "validateOnly": { "type": "bool", "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "UpdateChannelRequest": { + "OperationMetadata": { "fields": { - "channel": { - "type": "Channel", - "id": 1 + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "validateOnly": { - "type": "bool", + "target": { + "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } - } - } - }, - "DeleteChannelRequest": { - "fields": { - "name": { + }, + "verb": { "type": "string", - "id": 1, + "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "eventarc.googleapis.com/Channel" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "validateOnly": { + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { "type": "bool", - "id": 2, + "id": 6, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "GetProviderRequest": { + "GoogleApiSource": { + "options": { + "(google.api.resource).type": "eventarc.googleapis.com/GoogleApiSource", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/googleApiSources/{google_api_source}", + "(google.api.resource).plural": "googleApiSources", + "(google.api.resource).singular": "googleApiSource" + }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "eventarc.googleapis.com/Provider" + "(google.api.field_behavior)": "IDENTIFIER" } - } - } - }, - "ListProvidersRequest": { - "fields": { - "parent": { + }, + "uid": { "type": "string", - "id": 1, + "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "eventarc.googleapis.com/Provider" + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageSize": { - "type": "int32", - "id": 2 + "etag": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "pageToken": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", "type": "string", - "id": 3 + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "orderBy": { + "annotations": { + "keyType": "string", "type": "string", - "id": 4 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "filter": { + "displayName": { "type": "string", - "id": 5 - } - } - }, - "ListProvidersResponse": { - "fields": { - "providers": { - "rule": "repeated", - "type": "Provider", - "id": 1 + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "nextPageToken": { + "destination": { "type": "string", - "id": 2 + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "eventarc.googleapis.com/MessageBus" + } }, - "unreachable": { - "rule": "repeated", + "cryptoKeyName": { "type": "string", - "id": 3 + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } + }, + "loggingConfig": { + "type": "LoggingConfig", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "GetChannelConnectionRequest": { + "LoggingConfig": { "fields": { - "name": { - "type": "string", + "logSeverity": { + "type": "LogSeverity", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "eventarc.googleapis.com/ChannelConnection" + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "LogSeverity": { + "values": { + "LOG_SEVERITY_UNSPECIFIED": 0, + "NONE": 1, + "DEBUG": 2, + "INFO": 3, + "NOTICE": 4, + "WARNING": 5, + "ERROR": 6, + "CRITICAL": 7, + "ALERT": 8, + "EMERGENCY": 9 } } } }, - "ListChannelConnectionsRequest": { + "GoogleChannelConfig": { + "options": { + "(google.api.resource).type": "eventarc.googleapis.com/GoogleChannelConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/googleChannelConfig", + "(google.api.resource).singular": "googleChannelConfig" + }, "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "eventarc.googleapis.com/ChannelConnection" + "(google.api.field_behavior)": "REQUIRED" } }, - "pageSize": { - "type": "int32", - "id": 2 + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "pageToken": { + "cryptoKeyName": { "type": "string", - "id": 3 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } } } }, - "ListChannelConnectionsResponse": { + "MessageBus": { + "options": { + "(google.api.resource).type": "eventarc.googleapis.com/MessageBus", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/messageBuses/{message_bus}", + "(google.api.resource).plural": "messageBuses", + "(google.api.resource).singular": "messageBus" + }, "fields": { - "channelConnections": { - "rule": "repeated", - "type": "ChannelConnection", - "id": 1 - }, - "nextPageToken": { + "name": { "type": "string", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } }, - "unreachable": { - "rule": "repeated", + "uid": { "type": "string", - "id": 3 - } - } - }, - "CreateChannelConnectionRequest": { - "fields": { - "parent": { + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { "type": "string", - "id": 1, + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "eventarc.googleapis.com/ChannelConnection" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "channelConnection": { - "type": "ChannelConnection", - "id": 2, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "channelConnectionId": { + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", "type": "string", - "id": 3, + "id": 6, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "DeleteChannelConnectionRequest": { - "fields": { - "name": { + }, + "annotations": { + "keyType": "string", "type": "string", - "id": 1, + "id": 7, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "eventarc.googleapis.com/ChannelConnection" + "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "UpdateGoogleChannelConfigRequest": { - "fields": { - "googleChannelConfig": { - "type": "GoogleChannelConfig", - "id": 1, + }, + "displayName": { + "type": "string", + "id": 8, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "GetGoogleChannelConfigRequest": { - "fields": { - "name": { + "cryptoKeyName": { "type": "string", - "id": 1, + "id": 10, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "eventarc.googleapis.com/GoogleChannelConfig" + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } + }, + "loggingConfig": { + "type": "LoggingConfig", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "OperationMetadata": { + "Pipeline": { + "options": { + "(google.api.resource).type": "eventarc.googleapis.com/Pipeline", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/pipelines/{pipeline}", + "(google.api.resource).plural": "pipelines", + "(google.api.resource).singular": "pipeline" + }, "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IDENTIFIER" } }, - "endTime": { + "createTime": { "type": "google.protobuf.Timestamp", "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "target": { - "type": "string", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "verb": { + "labels": { + "keyType": "string", "type": "string", "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "statusMessage": { + "uid": { "type": "string", "id": 5, "options": { + "(google.api.field_info).format": "UUID4", "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "requestedCancellation": { - "type": "bool", + "annotations": { + "keyType": "string", + "type": "string", "id": 6, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "apiVersion": { + "displayName": { "type": "string", "id": 7, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "GoogleChannelConfig": { - "options": { - "(google.api.resource).type": "eventarc.googleapis.com/GoogleChannelConfig", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/googleChannelConfig", - "(google.api.resource).singular": "googleChannelConfig" - }, - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "destinations": { + "rule": "repeated", + "type": "Destination", + "id": 8, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, + "mediations": { + "rule": "repeated", + "type": "Mediation", + "id": 9, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, "cryptoKeyName": { "type": "string", - "id": 7, + "id": 10, "options": { "(google.api.field_behavior)": "OPTIONAL", "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" } + }, + "inputPayloadFormat": { + "type": "MessagePayloadFormat", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "loggingConfig": { + "type": "LoggingConfig", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "retryPolicy": { + "type": "RetryPolicy", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 99 + } + }, + "nested": { + "MessagePayloadFormat": { + "oneofs": { + "kind": { + "oneof": [ + "protobuf", + "avro", + "json" + ] + } + }, + "fields": { + "protobuf": { + "type": "ProtobufFormat", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "avro": { + "type": "AvroFormat", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "json": { + "type": "JsonFormat", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "JsonFormat": { + "fields": {} + }, + "ProtobufFormat": { + "fields": { + "schemaDefinition": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AvroFormat": { + "fields": { + "schemaDefinition": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "Destination": { + "oneofs": { + "destinationDescriptor": { + "oneof": [ + "httpEndpoint", + "workflow", + "messageBus", + "topic" + ] + } + }, + "fields": { + "networkConfig": { + "type": "NetworkConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "httpEndpoint": { + "type": "HttpEndpoint", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "workflow": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "workflows.googleapis.com/Workflow" + } + }, + "messageBus": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "eventarc.googleapis.com/MessageBus" + } + }, + "topic": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "pubsub.googleapis.com/Topic" + } + }, + "authenticationConfig": { + "type": "AuthenticationConfig", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "outputPayloadFormat": { + "type": "MessagePayloadFormat", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "NetworkConfig": { + "fields": { + "networkAttachment": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/NetworkAttachment" + } + } + } + }, + "HttpEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "messageBindingTemplate": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AuthenticationConfig": { + "oneofs": { + "authenticationMethodDescriptor": { + "oneof": [ + "googleOidc", + "oauthToken" + ] + } + }, + "fields": { + "googleOidc": { + "type": "OidcToken", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oauthToken": { + "type": "OAuthToken", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "OidcToken": { + "fields": { + "serviceAccount": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" + } + }, + "audience": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OAuthToken": { + "fields": { + "serviceAccount": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" + } + }, + "scope": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + }, + "Mediation": { + "oneofs": { + "mediationDescriptor": { + "oneof": [ + "transformation" + ] + } + }, + "fields": { + "transformation": { + "type": "Transformation", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Transformation": { + "fields": { + "transformationTemplate": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "RetryPolicy": { + "fields": { + "maxAttempts": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minRetryDelay": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxRetryDelay": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } } } }, @@ -1277,6 +3178,20 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "eventDataContentType": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "satisfiesPzs": { + "type": "bool", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "etag": { "type": "string", "id": 99, @@ -1330,7 +3245,8 @@ "cloudRun", "cloudFunction", "gke", - "workflow" + "workflow", + "httpEndpoint" ] } }, @@ -1356,6 +3272,17 @@ "options": { "(google.api.resource_reference).type": "workflows.googleapis.com/Workflow" } + }, + "httpEndpoint": { + "type": "HttpEndpoint", + "id": 5 + }, + "networkConfig": { + "type": "NetworkConfig", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1456,6 +3383,29 @@ } } } + }, + "HttpEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "NetworkConfig": { + "fields": { + "networkAttachment": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/NetworkAttachment" + } + } + } } } } @@ -1465,9 +3415,9 @@ }, "api": { "options": { - "go_package": "google.golang.org/genproto/googleapis/api;api", + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", + "java_outer_classname": "FieldInfoProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -1950,6 +3900,30 @@ "GA": 4, "DEPRECATED": 5 } + }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } } } }, diff --git a/packages/google-cloud-eventarc/samples/README.md b/packages/google-cloud-eventarc/samples/README.md index 5b79d01459d..60fc507ef6d 100644 --- a/packages/google-cloud-eventarc/samples/README.md +++ b/packages/google-cloud-eventarc/samples/README.md @@ -14,21 +14,42 @@ * [Samples](#samples) * [Eventarc.create_channel](#eventarc.create_channel) * [Eventarc.create_channel_connection](#eventarc.create_channel_connection) + * [Eventarc.create_enrollment](#eventarc.create_enrollment) + * [Eventarc.create_google_api_source](#eventarc.create_google_api_source) + * [Eventarc.create_message_bus](#eventarc.create_message_bus) + * [Eventarc.create_pipeline](#eventarc.create_pipeline) * [Eventarc.create_trigger](#eventarc.create_trigger) * [Eventarc.delete_channel](#eventarc.delete_channel) * [Eventarc.delete_channel_connection](#eventarc.delete_channel_connection) + * [Eventarc.delete_enrollment](#eventarc.delete_enrollment) + * [Eventarc.delete_google_api_source](#eventarc.delete_google_api_source) + * [Eventarc.delete_message_bus](#eventarc.delete_message_bus) + * [Eventarc.delete_pipeline](#eventarc.delete_pipeline) * [Eventarc.delete_trigger](#eventarc.delete_trigger) * [Eventarc.get_channel](#eventarc.get_channel) * [Eventarc.get_channel_connection](#eventarc.get_channel_connection) + * [Eventarc.get_enrollment](#eventarc.get_enrollment) + * [Eventarc.get_google_api_source](#eventarc.get_google_api_source) * [Eventarc.get_google_channel_config](#eventarc.get_google_channel_config) + * [Eventarc.get_message_bus](#eventarc.get_message_bus) + * [Eventarc.get_pipeline](#eventarc.get_pipeline) * [Eventarc.get_provider](#eventarc.get_provider) * [Eventarc.get_trigger](#eventarc.get_trigger) * [Eventarc.list_channel_connections](#eventarc.list_channel_connections) * [Eventarc.list_channels](#eventarc.list_channels) + * [Eventarc.list_enrollments](#eventarc.list_enrollments) + * [Eventarc.list_google_api_sources](#eventarc.list_google_api_sources) + * [Eventarc.list_message_bus_enrollments](#eventarc.list_message_bus_enrollments) + * [Eventarc.list_message_buses](#eventarc.list_message_buses) + * [Eventarc.list_pipelines](#eventarc.list_pipelines) * [Eventarc.list_providers](#eventarc.list_providers) * [Eventarc.list_triggers](#eventarc.list_triggers) * [Eventarc.update_channel](#eventarc.update_channel) + * [Eventarc.update_enrollment](#eventarc.update_enrollment) + * [Eventarc.update_google_api_source](#eventarc.update_google_api_source) * [Eventarc.update_google_channel_config](#eventarc.update_google_channel_config) + * [Eventarc.update_message_bus](#eventarc.update_message_bus) + * [Eventarc.update_pipeline](#eventarc.update_pipeline) * [Eventarc.update_trigger](#eventarc.update_trigger) * [Quickstart](#quickstart) @@ -81,6 +102,74 @@ __Usage:__ +### Eventarc.create_enrollment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_enrollment.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-eventarc/samples/generated/v1/eventarc.create_enrollment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_enrollment.js` + + +----- + + + + +### Eventarc.create_google_api_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_google_api_source.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-eventarc/samples/generated/v1/eventarc.create_google_api_source.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_google_api_source.js` + + +----- + + + + +### Eventarc.create_message_bus + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_message_bus.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-eventarc/samples/generated/v1/eventarc.create_message_bus.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_message_bus.js` + + +----- + + + + +### Eventarc.create_pipeline + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_pipeline.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-eventarc/samples/generated/v1/eventarc.create_pipeline.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_pipeline.js` + + +----- + + + + ### Eventarc.create_trigger View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_trigger.js). @@ -132,6 +221,74 @@ __Usage:__ +### Eventarc.delete_enrollment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_enrollment.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-eventarc/samples/generated/v1/eventarc.delete_enrollment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_enrollment.js` + + +----- + + + + +### Eventarc.delete_google_api_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_google_api_source.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-eventarc/samples/generated/v1/eventarc.delete_google_api_source.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_google_api_source.js` + + +----- + + + + +### Eventarc.delete_message_bus + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_message_bus.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-eventarc/samples/generated/v1/eventarc.delete_message_bus.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_message_bus.js` + + +----- + + + + +### Eventarc.delete_pipeline + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_pipeline.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-eventarc/samples/generated/v1/eventarc.delete_pipeline.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_pipeline.js` + + +----- + + + + ### Eventarc.delete_trigger View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_trigger.js). @@ -183,6 +340,40 @@ __Usage:__ +### Eventarc.get_enrollment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_enrollment.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-eventarc/samples/generated/v1/eventarc.get_enrollment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_enrollment.js` + + +----- + + + + +### Eventarc.get_google_api_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_google_api_source.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-eventarc/samples/generated/v1/eventarc.get_google_api_source.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_google_api_source.js` + + +----- + + + + ### Eventarc.get_google_channel_config View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_google_channel_config.js). @@ -200,6 +391,40 @@ __Usage:__ +### Eventarc.get_message_bus + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_message_bus.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-eventarc/samples/generated/v1/eventarc.get_message_bus.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_message_bus.js` + + +----- + + + + +### Eventarc.get_pipeline + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_pipeline.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-eventarc/samples/generated/v1/eventarc.get_pipeline.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_pipeline.js` + + +----- + + + + ### Eventarc.get_provider View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_provider.js). @@ -268,6 +493,91 @@ __Usage:__ +### Eventarc.list_enrollments + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_enrollments.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-eventarc/samples/generated/v1/eventarc.list_enrollments.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_enrollments.js` + + +----- + + + + +### Eventarc.list_google_api_sources + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_google_api_sources.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-eventarc/samples/generated/v1/eventarc.list_google_api_sources.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_google_api_sources.js` + + +----- + + + + +### Eventarc.list_message_bus_enrollments + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_bus_enrollments.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-eventarc/samples/generated/v1/eventarc.list_message_bus_enrollments.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_bus_enrollments.js` + + +----- + + + + +### Eventarc.list_message_buses + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_buses.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-eventarc/samples/generated/v1/eventarc.list_message_buses.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_buses.js` + + +----- + + + + +### Eventarc.list_pipelines + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_pipelines.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-eventarc/samples/generated/v1/eventarc.list_pipelines.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_pipelines.js` + + +----- + + + + ### Eventarc.list_providers View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_providers.js). @@ -319,6 +629,40 @@ __Usage:__ +### Eventarc.update_enrollment + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_enrollment.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-eventarc/samples/generated/v1/eventarc.update_enrollment.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_enrollment.js` + + +----- + + + + +### Eventarc.update_google_api_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_google_api_source.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-eventarc/samples/generated/v1/eventarc.update_google_api_source.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_google_api_source.js` + + +----- + + + + ### Eventarc.update_google_channel_config View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_google_channel_config.js). @@ -336,6 +680,40 @@ __Usage:__ +### Eventarc.update_message_bus + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_message_bus.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-eventarc/samples/generated/v1/eventarc.update_message_bus.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_message_bus.js` + + +----- + + + + +### Eventarc.update_pipeline + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_pipeline.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-eventarc/samples/generated/v1/eventarc.update_pipeline.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_pipeline.js` + + +----- + + + + ### Eventarc.update_trigger View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_trigger.js). diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_channel.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_channel.js index fe516b2ac19..a98095314ba 100644 --- a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_channel.js +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_channel.js @@ -20,7 +20,7 @@ 'use strict'; -function main(parent, channel, channelId, validateOnly) { +function main(parent, channel, channelId) { // [START eventarc_v1_generated_Eventarc_CreateChannel_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -41,7 +41,7 @@ function main(parent, channel, channelId, validateOnly) { */ // const channelId = 'abc123' /** - * Required. If set, validate the request and preview the review, but do not + * Optional. If set, validate the request and preview the review, but do not * post it. */ // const validateOnly = true @@ -58,7 +58,6 @@ function main(parent, channel, channelId, validateOnly) { parent, channel, channelId, - validateOnly, }; // Run request diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_enrollment.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_enrollment.js new file mode 100644 index 00000000000..622c92f41b2 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_enrollment.js @@ -0,0 +1,78 @@ +// 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(parent, enrollment, enrollmentId) { + // [START eventarc_v1_generated_Eventarc_CreateEnrollment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which to add this enrollment. + */ + // const parent = 'abc123' + /** + * Required. The enrollment to create. + */ + // const enrollment = {} + /** + * Required. The user-provided ID to be assigned to the Enrollment. It should + * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + */ + // const enrollmentId = 'abc123' + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callCreateEnrollment() { + // Construct request + const request = { + parent, + enrollment, + enrollmentId, + }; + + // Run request + const [operation] = await eventarcClient.createEnrollment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateEnrollment(); + // [END eventarc_v1_generated_Eventarc_CreateEnrollment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_google_api_source.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_google_api_source.js new file mode 100644 index 00000000000..dc7770d61c7 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_google_api_source.js @@ -0,0 +1,78 @@ +// 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(parent, googleApiSource, googleApiSourceId) { + // [START eventarc_v1_generated_Eventarc_CreateGoogleApiSource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which to add this google api source. + */ + // const parent = 'abc123' + /** + * Required. The google api source to create. + */ + // const googleApiSource = {} + /** + * Required. The user-provided ID to be assigned to the GoogleApiSource. It + * should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + */ + // const googleApiSourceId = 'abc123' + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callCreateGoogleApiSource() { + // Construct request + const request = { + parent, + googleApiSource, + googleApiSourceId, + }; + + // Run request + const [operation] = await eventarcClient.createGoogleApiSource(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateGoogleApiSource(); + // [END eventarc_v1_generated_Eventarc_CreateGoogleApiSource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_message_bus.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_message_bus.js new file mode 100644 index 00000000000..8315d9928bc --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_message_bus.js @@ -0,0 +1,78 @@ +// 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(parent, messageBus, messageBusId) { + // [START eventarc_v1_generated_Eventarc_CreateMessageBus_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which to add this message bus. + */ + // const parent = 'abc123' + /** + * Required. The message bus to create. + */ + // const messageBus = {} + /** + * Required. The user-provided ID to be assigned to the MessageBus. It should + * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) + */ + // const messageBusId = 'abc123' + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callCreateMessageBus() { + // Construct request + const request = { + parent, + messageBus, + messageBusId, + }; + + // Run request + const [operation] = await eventarcClient.createMessageBus(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateMessageBus(); + // [END eventarc_v1_generated_Eventarc_CreateMessageBus_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_pipeline.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_pipeline.js new file mode 100644 index 00000000000..6ff8d93fe7e --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_pipeline.js @@ -0,0 +1,77 @@ +// 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(parent, pipeline, pipelineId) { + // [START eventarc_v1_generated_Eventarc_CreatePipeline_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection in which to add this pipeline. + */ + // const parent = 'abc123' + /** + * Required. The pipeline to create. + */ + // const pipeline = {} + /** + * Required. The user-provided ID to be assigned to the Pipeline. + */ + // const pipelineId = 'abc123' + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callCreatePipeline() { + // Construct request + const request = { + parent, + pipeline, + pipelineId, + }; + + // Run request + const [operation] = await eventarcClient.createPipeline(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreatePipeline(); + // [END eventarc_v1_generated_Eventarc_CreatePipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_trigger.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_trigger.js index 16a1429d3a2..810c4cae223 100644 --- a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_trigger.js +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.create_trigger.js @@ -20,7 +20,7 @@ 'use strict'; -function main(parent, trigger, triggerId, validateOnly) { +function main(parent, trigger, triggerId) { // [START eventarc_v1_generated_Eventarc_CreateTrigger_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -41,7 +41,7 @@ function main(parent, trigger, triggerId, validateOnly) { */ // const triggerId = 'abc123' /** - * Required. If set, validate the request and preview the review, but do not + * Optional. If set, validate the request and preview the review, but do not * post it. */ // const validateOnly = true @@ -58,7 +58,6 @@ function main(parent, trigger, triggerId, validateOnly) { parent, trigger, triggerId, - validateOnly, }; // Run request diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_channel.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_channel.js index feac4a41422..01756a40b37 100644 --- a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_channel.js +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_channel.js @@ -20,7 +20,7 @@ 'use strict'; -function main(name, validateOnly) { +function main(name) { // [START eventarc_v1_generated_Eventarc_DeleteChannel_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -33,7 +33,7 @@ function main(name, validateOnly) { */ // const name = 'abc123' /** - * Required. If set, validate the request and preview the review, but do not + * Optional. If set, validate the request and preview the review, but do not * post it. */ // const validateOnly = true @@ -48,7 +48,6 @@ function main(name, validateOnly) { // Construct request const request = { name, - validateOnly, }; // Run request diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_enrollment.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_enrollment.js new file mode 100644 index 00000000000..9cd9eec6389 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_enrollment.js @@ -0,0 +1,77 @@ +// 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 eventarc_v1_generated_Eventarc_DeleteEnrollment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Enrollment to be deleted. + */ + // const name = 'abc123' + /** + * Optional. If provided, the Enrollment will only be deleted if the etag + * matches the current etag on the resource. + */ + // const etag = 'abc123' + /** + * Optional. If set to true, and the Enrollment is not found, the request will + * succeed but no action will be taken on the server. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callDeleteEnrollment() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await eventarcClient.deleteEnrollment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteEnrollment(); + // [END eventarc_v1_generated_Eventarc_DeleteEnrollment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_google_api_source.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_google_api_source.js new file mode 100644 index 00000000000..5bc6baa0cd3 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_google_api_source.js @@ -0,0 +1,77 @@ +// 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 eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the GoogleApiSource to be deleted. + */ + // const name = 'abc123' + /** + * Optional. If provided, the MessageBus will only be deleted if the etag + * matches the current etag on the resource. + */ + // const etag = 'abc123' + /** + * Optional. If set to true, and the MessageBus is not found, the request will + * succeed but no action will be taken on the server. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callDeleteGoogleApiSource() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await eventarcClient.deleteGoogleApiSource(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteGoogleApiSource(); + // [END eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_message_bus.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_message_bus.js new file mode 100644 index 00000000000..7ed7aa2f4ee --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_message_bus.js @@ -0,0 +1,77 @@ +// 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 eventarc_v1_generated_Eventarc_DeleteMessageBus_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the MessageBus to be deleted. + */ + // const name = 'abc123' + /** + * Optional. If provided, the MessageBus will only be deleted if the etag + * matches the current etag on the resource. + */ + // const etag = 'abc123' + /** + * Optional. If set to true, and the MessageBus is not found, the request will + * succeed but no action will be taken on the server. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callDeleteMessageBus() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await eventarcClient.deleteMessageBus(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteMessageBus(); + // [END eventarc_v1_generated_Eventarc_DeleteMessageBus_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_pipeline.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_pipeline.js new file mode 100644 index 00000000000..737fba64a9b --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_pipeline.js @@ -0,0 +1,77 @@ +// 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 eventarc_v1_generated_Eventarc_DeletePipeline_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Pipeline to be deleted. + */ + // const name = 'abc123' + /** + * Optional. If provided, the Pipeline will only be deleted if the etag + * matches the current etag on the resource. + */ + // const etag = 'abc123' + /** + * Optional. If set to true, and the Pipeline is not found, the request will + * succeed but no action will be taken on the server. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callDeletePipeline() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await eventarcClient.deletePipeline(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeletePipeline(); + // [END eventarc_v1_generated_Eventarc_DeletePipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_trigger.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_trigger.js index 0903b0897f6..7ae267bdd7b 100644 --- a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_trigger.js +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.delete_trigger.js @@ -20,7 +20,7 @@ 'use strict'; -function main(name, validateOnly) { +function main(name) { // [START eventarc_v1_generated_Eventarc_DeleteTrigger_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -43,7 +43,7 @@ function main(name, validateOnly) { */ // const allowMissing = true /** - * Required. If set, validate the request and preview the review, but do not + * Optional. If set, validate the request and preview the review, but do not * post it. */ // const validateOnly = true @@ -58,7 +58,6 @@ function main(name, validateOnly) { // Construct request const request = { name, - validateOnly, }; // Run request diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_enrollment.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_enrollment.js new file mode 100644 index 00000000000..5c0a0222d15 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_enrollment.js @@ -0,0 +1,61 @@ +// 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 eventarc_v1_generated_Eventarc_GetEnrollment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Enrollment to get. + */ + // const name = 'abc123' + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callGetEnrollment() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await eventarcClient.getEnrollment(request); + console.log(response); + } + + callGetEnrollment(); + // [END eventarc_v1_generated_Eventarc_GetEnrollment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_google_api_source.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_google_api_source.js new file mode 100644 index 00000000000..bf53e8d9a61 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_google_api_source.js @@ -0,0 +1,61 @@ +// 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 eventarc_v1_generated_Eventarc_GetGoogleApiSource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the google api source to get. + */ + // const name = 'abc123' + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callGetGoogleApiSource() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await eventarcClient.getGoogleApiSource(request); + console.log(response); + } + + callGetGoogleApiSource(); + // [END eventarc_v1_generated_Eventarc_GetGoogleApiSource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_message_bus.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_message_bus.js new file mode 100644 index 00000000000..33f034c7876 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_message_bus.js @@ -0,0 +1,61 @@ +// 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 eventarc_v1_generated_Eventarc_GetMessageBus_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the message bus to get. + */ + // const name = 'abc123' + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callGetMessageBus() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await eventarcClient.getMessageBus(request); + console.log(response); + } + + callGetMessageBus(); + // [END eventarc_v1_generated_Eventarc_GetMessageBus_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_pipeline.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_pipeline.js new file mode 100644 index 00000000000..d7ce20b6a3e --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.get_pipeline.js @@ -0,0 +1,61 @@ +// 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 eventarc_v1_generated_Eventarc_GetPipeline_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the pipeline to get. + */ + // const name = 'abc123' + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callGetPipeline() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await eventarcClient.getPipeline(request); + console.log(response); + } + + callGetPipeline(); + // [END eventarc_v1_generated_Eventarc_GetPipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_enrollments.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_enrollments.js new file mode 100644 index 00000000000..0655a143b65 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_enrollments.js @@ -0,0 +1,87 @@ +// 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(parent) { + // [START eventarc_v1_generated_Eventarc_ListEnrollments_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection to list triggers on. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of results to return on each page. + * Note: The service may send fewer. + */ + // const pageSize = 1234 + /** + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, update_time`. + */ + // const orderBy = 'abc123' + /** + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. + */ + // const filter = 'abc123' + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callListEnrollments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = eventarcClient.listEnrollmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEnrollments(); + // [END eventarc_v1_generated_Eventarc_ListEnrollments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_google_api_sources.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_google_api_sources.js new file mode 100644 index 00000000000..049ff8dde38 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_google_api_sources.js @@ -0,0 +1,87 @@ +// 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(parent) { + // [START eventarc_v1_generated_Eventarc_ListGoogleApiSources_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection to list GoogleApiSources on. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of results to return on each page. + * Note: The service may send fewer. + */ + // const pageSize = 1234 + /** + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, update_time`. + */ + // const orderBy = 'abc123' + /** + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. + */ + // const filter = 'abc123' + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callListGoogleApiSources() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = eventarcClient.listGoogleApiSourcesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListGoogleApiSources(); + // [END eventarc_v1_generated_Eventarc_ListGoogleApiSources_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_bus_enrollments.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_bus_enrollments.js new file mode 100644 index 00000000000..ddee77e3639 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_bus_enrollments.js @@ -0,0 +1,75 @@ +// 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(parent) { + // [START eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent message bus to list enrollments on. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of results to return on each page. + * Note: The service may send fewer. + */ + // const pageSize = 1234 + /** + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callListMessageBusEnrollments() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = eventarcClient.listMessageBusEnrollmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMessageBusEnrollments(); + // [END eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_buses.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_buses.js new file mode 100644 index 00000000000..f469837a6d0 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_message_buses.js @@ -0,0 +1,87 @@ +// 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(parent) { + // [START eventarc_v1_generated_Eventarc_ListMessageBuses_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection to list triggers on. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of results to return on each page. + * Note: The service may send fewer. + */ + // const pageSize = 1234 + /** + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, update_time`. + */ + // const orderBy = 'abc123' + /** + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. + */ + // const filter = 'abc123' + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callListMessageBuses() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = eventarcClient.listMessageBusesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMessageBuses(); + // [END eventarc_v1_generated_Eventarc_ListMessageBuses_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_pipelines.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_pipelines.js new file mode 100644 index 00000000000..42689dae745 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.list_pipelines.js @@ -0,0 +1,87 @@ +// 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(parent) { + // [START eventarc_v1_generated_Eventarc_ListPipelines_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent collection to list pipelines on. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of results to return on each page. + * Note: The service may send fewer. + */ + // const pageSize = 1234 + /** + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, update_time`. + */ + // const orderBy = 'abc123' + /** + * Optional. The filter field that the list request will filter on. + * Possible filters are described in https://google.aip.dev/160. + */ + // const filter = 'abc123' + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callListPipelines() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = eventarcClient.listPipelinesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPipelines(); + // [END eventarc_v1_generated_Eventarc_ListPipelines_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_channel.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_channel.js index c617df65873..f983b536f47 100644 --- a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_channel.js +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_channel.js @@ -20,7 +20,7 @@ 'use strict'; -function main(validateOnly) { +function main() { // [START eventarc_v1_generated_Eventarc_UpdateChannel_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -39,7 +39,7 @@ function main(validateOnly) { */ // const updateMask = {} /** - * Required. If set, validate the request and preview the review, but do not + * Optional. If set, validate the request and preview the review, but do not * post it. */ // const validateOnly = true @@ -53,7 +53,6 @@ function main(validateOnly) { async function callUpdateChannel() { // Construct request const request = { - validateOnly, }; // Run request diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_enrollment.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_enrollment.js new file mode 100644 index 00000000000..7a81f8d563d --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_enrollment.js @@ -0,0 +1,78 @@ +// 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(enrollment) { + // [START eventarc_v1_generated_Eventarc_UpdateEnrollment_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Enrollment to be updated. + */ + // const enrollment = {} + /** + * Optional. The fields to be updated; only fields explicitly provided are + * updated. If no field mask is provided, all provided fields in the request + * are updated. To update all fields, provide a field mask of "*". + */ + // const updateMask = {} + /** + * Optional. If set to true, and the Enrollment is not found, a new Enrollment + * will be created. In this situation, `update_mask` is ignored. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callUpdateEnrollment() { + // Construct request + const request = { + enrollment, + }; + + // Run request + const [operation] = await eventarcClient.updateEnrollment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateEnrollment(); + // [END eventarc_v1_generated_Eventarc_UpdateEnrollment_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_google_api_source.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_google_api_source.js new file mode 100644 index 00000000000..b983f3063ef --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_google_api_source.js @@ -0,0 +1,79 @@ +// 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(googleApiSource) { + // [START eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The GoogleApiSource to be updated. + */ + // const googleApiSource = {} + /** + * Optional. The fields to be updated; only fields explicitly provided are + * updated. If no field mask is provided, all provided fields in the request + * are updated. To update all fields, provide a field mask of "*". + */ + // const updateMask = {} + /** + * Optional. If set to true, and the GoogleApiSource is not found, a new + * GoogleApiSource will be created. In this situation, `update_mask` is + * ignored. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callUpdateGoogleApiSource() { + // Construct request + const request = { + googleApiSource, + }; + + // Run request + const [operation] = await eventarcClient.updateGoogleApiSource(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateGoogleApiSource(); + // [END eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_message_bus.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_message_bus.js new file mode 100644 index 00000000000..e91b8cb16bb --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_message_bus.js @@ -0,0 +1,78 @@ +// 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(messageBus) { + // [START eventarc_v1_generated_Eventarc_UpdateMessageBus_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The MessageBus to be updated. + */ + // const messageBus = {} + /** + * Optional. The fields to be updated; only fields explicitly provided are + * updated. If no field mask is provided, all provided fields in the request + * are updated. To update all fields, provide a field mask of "*". + */ + // const updateMask = {} + /** + * Optional. If set to true, and the MessageBus is not found, a new MessageBus + * will be created. In this situation, `update_mask` is ignored. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callUpdateMessageBus() { + // Construct request + const request = { + messageBus, + }; + + // Run request + const [operation] = await eventarcClient.updateMessageBus(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateMessageBus(); + // [END eventarc_v1_generated_Eventarc_UpdateMessageBus_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_pipeline.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_pipeline.js new file mode 100644 index 00000000000..c11765d3f4b --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_pipeline.js @@ -0,0 +1,78 @@ +// 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(pipeline) { + // [START eventarc_v1_generated_Eventarc_UpdatePipeline_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Pipeline to be updated. + */ + // const pipeline = {} + /** + * Optional. The fields to be updated; only fields explicitly provided are + * updated. If no field mask is provided, all provided fields in the request + * are updated. To update all fields, provide a field mask of "*". + */ + // const updateMask = {} + /** + * Optional. If set to true, and the Pipeline is not found, a new Pipeline + * will be created. In this situation, `update_mask` is ignored. + */ + // const allowMissing = true + /** + * Optional. If set, validate the request and preview the review, but do not + * post it. + */ + // const validateOnly = true + + // Imports the Eventarc library + const {EventarcClient} = require('@google-cloud/eventarc').v1; + + // Instantiates a client + const eventarcClient = new EventarcClient(); + + async function callUpdatePipeline() { + // Construct request + const request = { + pipeline, + }; + + // Run request + const [operation] = await eventarcClient.updatePipeline(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdatePipeline(); + // [END eventarc_v1_generated_Eventarc_UpdatePipeline_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_trigger.js b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_trigger.js index 79ad07ec92b..2b37625ff0f 100644 --- a/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_trigger.js +++ b/packages/google-cloud-eventarc/samples/generated/v1/eventarc.update_trigger.js @@ -20,7 +20,7 @@ 'use strict'; -function main(validateOnly) { +function main() { // [START eventarc_v1_generated_Eventarc_UpdateTrigger_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -44,7 +44,7 @@ function main(validateOnly) { */ // const allowMissing = true /** - * Required. If set, validate the request and preview the review, but do not + * Optional. If set, validate the request and preview the review, but do not * post it. */ // const validateOnly = true @@ -58,7 +58,6 @@ function main(validateOnly) { async function callUpdateTrigger() { // Construct request const request = { - validateOnly, }; // Run request diff --git a/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata_google.cloud.eventarc.v1.json b/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata_google.cloud.eventarc.v1.json index 0aff5fc017a..8f516ec2182 100644 --- a/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata_google.cloud.eventarc.v1.json +++ b/packages/google-cloud-eventarc/samples/generated/v1/snippet_metadata_google.cloud.eventarc.v1.json @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 69, "type": "FULL" } ], @@ -170,7 +170,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 69, "type": "FULL" } ], @@ -222,7 +222,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 69, "type": "FULL" } ], @@ -366,7 +366,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 69, "type": "FULL" } ], @@ -418,7 +418,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 64, "type": "FULL" } ], @@ -466,7 +466,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 59, "type": "FULL" } ], @@ -854,6 +854,1062 @@ } } } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_GetMessageBus_async", + "title": "Eventarc getMessageBus Sample", + "origin": "API_DEFINITION", + "description": " Get a single MessageBus.", + "canonical": true, + "file": "eventarc.get_message_bus.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMessageBus", + "fullName": "google.cloud.eventarc.v1.Eventarc.GetMessageBus", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.eventarc.v1.MessageBus", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "GetMessageBus", + "fullName": "google.cloud.eventarc.v1.Eventarc.GetMessageBus", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_ListMessageBuses_async", + "title": "Eventarc listMessageBuses Sample", + "origin": "API_DEFINITION", + "description": " List message buses.", + "canonical": true, + "file": "eventarc.list_message_buses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMessageBuses", + "fullName": "google.cloud.eventarc.v1.Eventarc.ListMessageBuses", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.eventarc.v1.ListMessageBusesResponse", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "ListMessageBuses", + "fullName": "google.cloud.eventarc.v1.Eventarc.ListMessageBuses", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_async", + "title": "Eventarc listMessageBusEnrollments Sample", + "origin": "API_DEFINITION", + "description": " List message bus enrollments.", + "canonical": true, + "file": "eventarc.list_message_bus_enrollments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMessageBusEnrollments", + "fullName": "google.cloud.eventarc.v1.Eventarc.ListMessageBusEnrollments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "ListMessageBusEnrollments", + "fullName": "google.cloud.eventarc.v1.Eventarc.ListMessageBusEnrollments", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_CreateMessageBus_async", + "title": "Eventarc createMessageBus Sample", + "origin": "API_DEFINITION", + "description": " Create a new MessageBus in a particular project and location.", + "canonical": true, + "file": "eventarc.create_message_bus.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateMessageBus", + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateMessageBus", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "message_bus", + "type": ".google.cloud.eventarc.v1.MessageBus" + }, + { + "name": "message_bus_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "CreateMessageBus", + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateMessageBus", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_UpdateMessageBus_async", + "title": "Eventarc updateMessageBus Sample", + "origin": "API_DEFINITION", + "description": " Update a single message bus.", + "canonical": true, + "file": "eventarc.update_message_bus.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateMessageBus", + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateMessageBus", + "async": true, + "parameters": [ + { + "name": "message_bus", + "type": ".google.cloud.eventarc.v1.MessageBus" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "UpdateMessageBus", + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateMessageBus", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_DeleteMessageBus_async", + "title": "Eventarc deleteMessageBus Sample", + "origin": "API_DEFINITION", + "description": " Delete a single message bus.", + "canonical": true, + "file": "eventarc.delete_message_bus.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteMessageBus", + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteMessageBus", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "DeleteMessageBus", + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteMessageBus", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_GetEnrollment_async", + "title": "Eventarc getEnrollment Sample", + "origin": "API_DEFINITION", + "description": " Get a single Enrollment.", + "canonical": true, + "file": "eventarc.get_enrollment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEnrollment", + "fullName": "google.cloud.eventarc.v1.Eventarc.GetEnrollment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.eventarc.v1.Enrollment", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "GetEnrollment", + "fullName": "google.cloud.eventarc.v1.Eventarc.GetEnrollment", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_ListEnrollments_async", + "title": "Eventarc listEnrollments Sample", + "origin": "API_DEFINITION", + "description": " List Enrollments.", + "canonical": true, + "file": "eventarc.list_enrollments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEnrollments", + "fullName": "google.cloud.eventarc.v1.Eventarc.ListEnrollments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.eventarc.v1.ListEnrollmentsResponse", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "ListEnrollments", + "fullName": "google.cloud.eventarc.v1.Eventarc.ListEnrollments", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_CreateEnrollment_async", + "title": "Eventarc createEnrollment Sample", + "origin": "API_DEFINITION", + "description": " Create a new Enrollment in a particular project and location.", + "canonical": true, + "file": "eventarc.create_enrollment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEnrollment", + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateEnrollment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "enrollment", + "type": ".google.cloud.eventarc.v1.Enrollment" + }, + { + "name": "enrollment_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "CreateEnrollment", + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateEnrollment", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_UpdateEnrollment_async", + "title": "Eventarc updateEnrollment Sample", + "origin": "API_DEFINITION", + "description": " Update a single Enrollment.", + "canonical": true, + "file": "eventarc.update_enrollment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEnrollment", + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateEnrollment", + "async": true, + "parameters": [ + { + "name": "enrollment", + "type": ".google.cloud.eventarc.v1.Enrollment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "UpdateEnrollment", + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateEnrollment", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_DeleteEnrollment_async", + "title": "Eventarc deleteEnrollment Sample", + "origin": "API_DEFINITION", + "description": " Delete a single Enrollment.", + "canonical": true, + "file": "eventarc.delete_enrollment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEnrollment", + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteEnrollment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "DeleteEnrollment", + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteEnrollment", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_GetPipeline_async", + "title": "Eventarc getPipeline Sample", + "origin": "API_DEFINITION", + "description": " Get a single Pipeline.", + "canonical": true, + "file": "eventarc.get_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPipeline", + "fullName": "google.cloud.eventarc.v1.Eventarc.GetPipeline", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.eventarc.v1.Pipeline", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "GetPipeline", + "fullName": "google.cloud.eventarc.v1.Eventarc.GetPipeline", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_ListPipelines_async", + "title": "Eventarc listPipelines Sample", + "origin": "API_DEFINITION", + "description": " List pipelines.", + "canonical": true, + "file": "eventarc.list_pipelines.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPipelines", + "fullName": "google.cloud.eventarc.v1.Eventarc.ListPipelines", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.eventarc.v1.ListPipelinesResponse", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "ListPipelines", + "fullName": "google.cloud.eventarc.v1.Eventarc.ListPipelines", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_CreatePipeline_async", + "title": "Eventarc createPipeline Sample", + "origin": "API_DEFINITION", + "description": " Create a new Pipeline in a particular project and location.", + "canonical": true, + "file": "eventarc.create_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePipeline", + "fullName": "google.cloud.eventarc.v1.Eventarc.CreatePipeline", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "pipeline", + "type": ".google.cloud.eventarc.v1.Pipeline" + }, + { + "name": "pipeline_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "CreatePipeline", + "fullName": "google.cloud.eventarc.v1.Eventarc.CreatePipeline", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_UpdatePipeline_async", + "title": "Eventarc updatePipeline Sample", + "origin": "API_DEFINITION", + "description": " Update a single pipeline.", + "canonical": true, + "file": "eventarc.update_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdatePipeline", + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdatePipeline", + "async": true, + "parameters": [ + { + "name": "pipeline", + "type": ".google.cloud.eventarc.v1.Pipeline" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "UpdatePipeline", + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdatePipeline", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_DeletePipeline_async", + "title": "Eventarc deletePipeline Sample", + "origin": "API_DEFINITION", + "description": " Delete a single pipeline.", + "canonical": true, + "file": "eventarc.delete_pipeline.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePipeline", + "fullName": "google.cloud.eventarc.v1.Eventarc.DeletePipeline", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "DeletePipeline", + "fullName": "google.cloud.eventarc.v1.Eventarc.DeletePipeline", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_GetGoogleApiSource_async", + "title": "Eventarc getGoogleApiSource Sample", + "origin": "API_DEFINITION", + "description": " Get a single GoogleApiSource.", + "canonical": true, + "file": "eventarc.get_google_api_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetGoogleApiSource", + "fullName": "google.cloud.eventarc.v1.Eventarc.GetGoogleApiSource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.eventarc.v1.GoogleApiSource", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "GetGoogleApiSource", + "fullName": "google.cloud.eventarc.v1.Eventarc.GetGoogleApiSource", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_ListGoogleApiSources_async", + "title": "Eventarc listGoogleApiSources Sample", + "origin": "API_DEFINITION", + "description": " List GoogleApiSources.", + "canonical": true, + "file": "eventarc.list_google_api_sources.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListGoogleApiSources", + "fullName": "google.cloud.eventarc.v1.Eventarc.ListGoogleApiSources", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.eventarc.v1.ListGoogleApiSourcesResponse", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "ListGoogleApiSources", + "fullName": "google.cloud.eventarc.v1.Eventarc.ListGoogleApiSources", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_CreateGoogleApiSource_async", + "title": "Eventarc createGoogleApiSource Sample", + "origin": "API_DEFINITION", + "description": " Create a new GoogleApiSource in a particular project and location.", + "canonical": true, + "file": "eventarc.create_google_api_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateGoogleApiSource", + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateGoogleApiSource", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "google_api_source", + "type": ".google.cloud.eventarc.v1.GoogleApiSource" + }, + { + "name": "google_api_source_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "CreateGoogleApiSource", + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateGoogleApiSource", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_async", + "title": "Eventarc updateGoogleApiSource Sample", + "origin": "API_DEFINITION", + "description": " Update a single GoogleApiSource.", + "canonical": true, + "file": "eventarc.update_google_api_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateGoogleApiSource", + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateGoogleApiSource", + "async": true, + "parameters": [ + { + "name": "google_api_source", + "type": ".google.cloud.eventarc.v1.GoogleApiSource" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "UpdateGoogleApiSource", + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateGoogleApiSource", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } + }, + { + "regionTag": "eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_async", + "title": "Eventarc deleteGoogleApiSource Sample", + "origin": "API_DEFINITION", + "description": " Delete a single GoogleApiSource.", + "canonical": true, + "file": "eventarc.delete_google_api_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteGoogleApiSource", + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteGoogleApiSource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EventarcClient", + "fullName": "google.cloud.eventarc.v1.EventarcClient" + }, + "method": { + "shortName": "DeleteGoogleApiSource", + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteGoogleApiSource", + "service": { + "shortName": "Eventarc", + "fullName": "google.cloud.eventarc.v1.Eventarc" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-eventarc/src/v1/eventarc_client.ts b/packages/google-cloud-eventarc/src/v1/eventarc_client.ts index 38e6d9f8f92..de0111dcc4e 100644 --- a/packages/google-cloud-eventarc/src/v1/eventarc_client.ts +++ b/packages/google-cloud-eventarc/src/v1/eventarc_client.ts @@ -221,12 +221,24 @@ export class EventarcClient { channelConnectionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/channelConnections/{channel_connection}' ), + enrollmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/enrollments/{enrollment}' + ), + googleApiSourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/googleApiSources/{google_api_source}' + ), googleChannelConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/googleChannelConfig' ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), + messageBusPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/messageBuses/{message_bus}' + ), + pipelinePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/pipelines/{pipeline}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -262,6 +274,31 @@ export class EventarcClient { 'nextPageToken', 'channelConnections' ), + listMessageBuses: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'messageBuses' + ), + listMessageBusEnrollments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'enrollments' + ), + listEnrollments: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'enrollments' + ), + listPipelines: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'pipelines' + ), + listGoogleApiSources: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'googleApiSources' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -293,6 +330,18 @@ export class EventarcClient { { get: '/v1/{resource=projects/*/locations/*/channelConnections/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/messageBuses/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/enrollments/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/pipelines/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/googleApiSources/*}:getIamPolicy', + }, ], }, { @@ -308,6 +357,22 @@ export class EventarcClient { post: '/v1/{resource=projects/*/locations/*/channelConnections/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/messageBuses/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/enrollments/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/pipelines/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/googleApiSources/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -323,6 +388,22 @@ export class EventarcClient { post: '/v1/{resource=projects/*/locations/*/channelConnections/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/messageBuses/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/enrollments/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/pipelines/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/googleApiSources/*}:testIamPermissions', + body: '*', + }, ], }, { @@ -395,6 +476,78 @@ export class EventarcClient { const deleteChannelConnectionMetadata = protoFilesRoot.lookup( '.google.cloud.eventarc.v1.OperationMetadata' ) as gax.protobuf.Type; + const createMessageBusResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.MessageBus' + ) as gax.protobuf.Type; + const createMessageBusMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateMessageBusResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.MessageBus' + ) as gax.protobuf.Type; + const updateMessageBusMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteMessageBusResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.MessageBus' + ) as gax.protobuf.Type; + const deleteMessageBusMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createEnrollmentResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.Enrollment' + ) as gax.protobuf.Type; + const createEnrollmentMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateEnrollmentResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.Enrollment' + ) as gax.protobuf.Type; + const updateEnrollmentMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteEnrollmentResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.Enrollment' + ) as gax.protobuf.Type; + const deleteEnrollmentMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createPipelineResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.Pipeline' + ) as gax.protobuf.Type; + const createPipelineMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updatePipelineResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.Pipeline' + ) as gax.protobuf.Type; + const updatePipelineMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deletePipelineResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.Pipeline' + ) as gax.protobuf.Type; + const deletePipelineMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createGoogleApiSourceResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.GoogleApiSource' + ) as gax.protobuf.Type; + const createGoogleApiSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateGoogleApiSourceResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.GoogleApiSource' + ) as gax.protobuf.Type; + const updateGoogleApiSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteGoogleApiSourceResponse = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.GoogleApiSource' + ) as gax.protobuf.Type; + const deleteGoogleApiSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.eventarc.v1.OperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createTrigger: new this._gaxModule.LongrunningDescriptor( @@ -445,6 +598,72 @@ export class EventarcClient { deleteChannelConnectionMetadata ) ), + createMessageBus: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createMessageBusResponse.decode.bind(createMessageBusResponse), + createMessageBusMetadata.decode.bind(createMessageBusMetadata) + ), + updateMessageBus: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateMessageBusResponse.decode.bind(updateMessageBusResponse), + updateMessageBusMetadata.decode.bind(updateMessageBusMetadata) + ), + deleteMessageBus: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteMessageBusResponse.decode.bind(deleteMessageBusResponse), + deleteMessageBusMetadata.decode.bind(deleteMessageBusMetadata) + ), + createEnrollment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createEnrollmentResponse.decode.bind(createEnrollmentResponse), + createEnrollmentMetadata.decode.bind(createEnrollmentMetadata) + ), + updateEnrollment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateEnrollmentResponse.decode.bind(updateEnrollmentResponse), + updateEnrollmentMetadata.decode.bind(updateEnrollmentMetadata) + ), + deleteEnrollment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteEnrollmentResponse.decode.bind(deleteEnrollmentResponse), + deleteEnrollmentMetadata.decode.bind(deleteEnrollmentMetadata) + ), + createPipeline: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createPipelineResponse.decode.bind(createPipelineResponse), + createPipelineMetadata.decode.bind(createPipelineMetadata) + ), + updatePipeline: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updatePipelineResponse.decode.bind(updatePipelineResponse), + updatePipelineMetadata.decode.bind(updatePipelineMetadata) + ), + deletePipeline: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deletePipelineResponse.decode.bind(deletePipelineResponse), + deletePipelineMetadata.decode.bind(deletePipelineMetadata) + ), + createGoogleApiSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createGoogleApiSourceResponse.decode.bind( + createGoogleApiSourceResponse + ), + createGoogleApiSourceMetadata.decode.bind(createGoogleApiSourceMetadata) + ), + updateGoogleApiSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateGoogleApiSourceResponse.decode.bind( + updateGoogleApiSourceResponse + ), + updateGoogleApiSourceMetadata.decode.bind(updateGoogleApiSourceMetadata) + ), + deleteGoogleApiSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteGoogleApiSourceResponse.decode.bind( + deleteGoogleApiSourceResponse + ), + deleteGoogleApiSourceMetadata.decode.bind(deleteGoogleApiSourceMetadata) + ), }; // Put together the default options sent with requests. @@ -515,6 +734,27 @@ export class EventarcClient { 'deleteChannelConnection', 'getGoogleChannelConfig', 'updateGoogleChannelConfig', + 'getMessageBus', + 'listMessageBuses', + 'listMessageBusEnrollments', + 'createMessageBus', + 'updateMessageBus', + 'deleteMessageBus', + 'getEnrollment', + 'listEnrollments', + 'createEnrollment', + 'updateEnrollment', + 'deleteEnrollment', + 'getPipeline', + 'listPipelines', + 'createPipeline', + 'updatePipeline', + 'deletePipeline', + 'getGoogleApiSource', + 'listGoogleApiSources', + 'createGoogleApiSource', + 'updateGoogleApiSource', + 'deleteGoogleApiSource', ]; for (const methodName of eventarcStubMethods) { const callPromise = this.eventarcStub.then( @@ -1174,95 +1414,69 @@ export class EventarcClient { callback ); } - /** - * Create a new trigger in a particular project and location. + * Get a single MessageBus. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which to add this trigger. - * @param {google.cloud.eventarc.v1.Trigger} request.trigger - * Required. The trigger to create. - * @param {string} request.triggerId - * Required. The user-provided ID to be assigned to the trigger. - * @param {boolean} request.validateOnly - * Required. If set, validate the request and preview the review, but do not - * post it. + * @param {string} request.name + * Required. The name of the message bus to get. * @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 } + * The first element of the array is an object representing {@link protos.google.cloud.eventarc.v1.MessageBus|MessageBus}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/eventarc.create_trigger.js - * region_tag:eventarc_v1_generated_Eventarc_CreateTrigger_async + * @example include:samples/generated/v1/eventarc.get_message_bus.js + * region_tag:eventarc_v1_generated_Eventarc_GetMessageBus_async */ - createTrigger( - request?: protos.google.cloud.eventarc.v1.ICreateTriggerRequest, + getMessageBus( + request?: protos.google.cloud.eventarc.v1.IGetMessageBusRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IGetMessageBusRequest | undefined, {} | undefined, ] >; - createTrigger( - request: protos.google.cloud.eventarc.v1.ICreateTriggerRequest, + getMessageBus( + request: protos.google.cloud.eventarc.v1.IGetMessageBusRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IGetMessageBusRequest | null | undefined, {} | null | undefined > ): void; - createTrigger( - request: protos.google.cloud.eventarc.v1.ICreateTriggerRequest, + getMessageBus( + request: protos.google.cloud.eventarc.v1.IGetMessageBusRequest, callback: Callback< - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IGetMessageBusRequest | null | undefined, {} | null | undefined > ): void; - createTrigger( - request?: protos.google.cloud.eventarc.v1.ICreateTriggerRequest, + getMessageBus( + request?: protos.google.cloud.eventarc.v1.IGetMessageBusRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.eventarc.v1.IMessageBus, + | protos.google.cloud.eventarc.v1.IGetMessageBusRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IGetMessageBusRequest | null | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IGetMessageBusRequest | undefined, {} | undefined, ] > | void { @@ -1279,136 +1493,74 @@ export class EventarcClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createTrigger(request, options, callback); - } - /** - * Check the status of the long running operation returned by `createTrigger()`. - * @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/eventarc.create_trigger.js - * region_tag:eventarc_v1_generated_Eventarc_CreateTrigger_async - */ - async checkCreateTriggerProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.eventarc.v1.Trigger, - protos.google.cloud.eventarc.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.createTrigger, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.eventarc.v1.Trigger, - protos.google.cloud.eventarc.v1.OperationMetadata - >; + return this.innerApiCalls.getMessageBus(request, options, callback); } /** - * Update a single trigger. + * Get a single Enrollment. * * @param {Object} request * The request object that will be sent. - * @param {google.cloud.eventarc.v1.Trigger} request.trigger - * The trigger to be updated. - * @param {google.protobuf.FieldMask} request.updateMask - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * @param {boolean} request.allowMissing - * If set to true, and the trigger is not found, a new trigger will be - * created. In this situation, `update_mask` is ignored. - * @param {boolean} request.validateOnly - * Required. If set, validate the request and preview the review, but do not - * post it. + * @param {string} request.name + * Required. The name of the Enrollment to get. * @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 } + * The first element of the array is an object representing {@link protos.google.cloud.eventarc.v1.Enrollment|Enrollment}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/eventarc.update_trigger.js - * region_tag:eventarc_v1_generated_Eventarc_UpdateTrigger_async + * @example include:samples/generated/v1/eventarc.get_enrollment.js + * region_tag:eventarc_v1_generated_Eventarc_GetEnrollment_async */ - updateTrigger( - request?: protos.google.cloud.eventarc.v1.IUpdateTriggerRequest, + getEnrollment( + request?: protos.google.cloud.eventarc.v1.IGetEnrollmentRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IGetEnrollmentRequest | undefined, {} | undefined, ] >; - updateTrigger( - request: protos.google.cloud.eventarc.v1.IUpdateTriggerRequest, + getEnrollment( + request: protos.google.cloud.eventarc.v1.IGetEnrollmentRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IGetEnrollmentRequest | null | undefined, {} | null | undefined > ): void; - updateTrigger( - request: protos.google.cloud.eventarc.v1.IUpdateTriggerRequest, + getEnrollment( + request: protos.google.cloud.eventarc.v1.IGetEnrollmentRequest, callback: Callback< - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IGetEnrollmentRequest | null | undefined, {} | null | undefined > ): void; - updateTrigger( - request?: protos.google.cloud.eventarc.v1.IUpdateTriggerRequest, + getEnrollment( + request?: protos.google.cloud.eventarc.v1.IGetEnrollmentRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined + protos.google.cloud.eventarc.v1.IEnrollment, + | protos.google.cloud.eventarc.v1.IGetEnrollmentRequest + | null + | undefined, + {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IGetEnrollmentRequest | null | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IGetEnrollmentRequest | undefined, {} | undefined, ] > | void { @@ -1425,60 +1577,199 @@ export class EventarcClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'trigger.name': request.trigger!.name ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.updateTrigger(request, options, callback); + return this.innerApiCalls.getEnrollment(request, options, callback); } /** - * Check the status of the long running operation returned by `updateTrigger()`. - * @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 } + * Get a single Pipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the pipeline to get. + * @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 {@link protos.google.cloud.eventarc.v1.Pipeline|Pipeline}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/eventarc.update_trigger.js - * region_tag:eventarc_v1_generated_Eventarc_UpdateTrigger_async + * @example include:samples/generated/v1/eventarc.get_pipeline.js + * region_tag:eventarc_v1_generated_Eventarc_GetPipeline_async */ - async checkUpdateTriggerProgress( - name: string + getPipeline( + request?: protos.google.cloud.eventarc.v1.IGetPipelineRequest, + options?: CallOptions ): Promise< - LROperation< - protos.google.cloud.eventarc.v1.Trigger, - protos.google.cloud.eventarc.v1.OperationMetadata + [ + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IGetPipelineRequest | undefined, + {} | undefined, + ] + >; + getPipeline( + request: protos.google.cloud.eventarc.v1.IGetPipelineRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IGetPipelineRequest | null | undefined, + {} | null | undefined > - > { - 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.updateTrigger, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.eventarc.v1.Trigger, - protos.google.cloud.eventarc.v1.OperationMetadata - >; + ): void; + getPipeline( + request: protos.google.cloud.eventarc.v1.IGetPipelineRequest, + callback: Callback< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IGetPipelineRequest | null | undefined, + {} | null | undefined + > + ): void; + getPipeline( + request?: protos.google.cloud.eventarc.v1.IGetPipelineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.eventarc.v1.IPipeline, + | protos.google.cloud.eventarc.v1.IGetPipelineRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IGetPipelineRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IGetPipelineRequest | 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.getPipeline(request, options, callback); } /** - * Delete a single trigger. + * Get a single GoogleApiSource. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the trigger to be deleted. - * @param {string} request.etag - * If provided, the trigger will only be deleted if the etag matches the - * current etag on the resource. - * @param {boolean} request.allowMissing - * If set to true, and the trigger is not found, the request will succeed - * but no action will be taken on the server. - * @param {boolean} request.validateOnly - * Required. If set, validate the request and preview the review, but do not + * Required. The name of the google api source to get. + * @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 {@link protos.google.cloud.eventarc.v1.GoogleApiSource|GoogleApiSource}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/eventarc.get_google_api_source.js + * region_tag:eventarc_v1_generated_Eventarc_GetGoogleApiSource_async + */ + getGoogleApiSource( + request?: protos.google.cloud.eventarc.v1.IGetGoogleApiSourceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IGetGoogleApiSourceRequest | undefined, + {} | undefined, + ] + >; + getGoogleApiSource( + request: protos.google.cloud.eventarc.v1.IGetGoogleApiSourceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + | protos.google.cloud.eventarc.v1.IGetGoogleApiSourceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getGoogleApiSource( + request: protos.google.cloud.eventarc.v1.IGetGoogleApiSourceRequest, + callback: Callback< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + | protos.google.cloud.eventarc.v1.IGetGoogleApiSourceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getGoogleApiSource( + request?: protos.google.cloud.eventarc.v1.IGetGoogleApiSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + | protos.google.cloud.eventarc.v1.IGetGoogleApiSourceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + | protos.google.cloud.eventarc.v1.IGetGoogleApiSourceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IGetGoogleApiSourceRequest | 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.getGoogleApiSource(request, options, callback); + } + + /** + * Create a new trigger in a particular project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which to add this trigger. + * @param {google.cloud.eventarc.v1.Trigger} request.trigger + * Required. The trigger to create. + * @param {string} request.triggerId + * Required. The user-provided ID to be assigned to the trigger. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not * post it. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1488,11 +1779,11 @@ export class EventarcClient { * 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/eventarc.delete_trigger.js - * region_tag:eventarc_v1_generated_Eventarc_DeleteTrigger_async + * @example include:samples/generated/v1/eventarc.create_trigger.js + * region_tag:eventarc_v1_generated_Eventarc_CreateTrigger_async */ - deleteTrigger( - request?: protos.google.cloud.eventarc.v1.IDeleteTriggerRequest, + createTrigger( + request?: protos.google.cloud.eventarc.v1.ICreateTriggerRequest, options?: CallOptions ): Promise< [ @@ -1504,8 +1795,8 @@ export class EventarcClient { {} | undefined, ] >; - deleteTrigger( - request: protos.google.cloud.eventarc.v1.IDeleteTriggerRequest, + createTrigger( + request: protos.google.cloud.eventarc.v1.ICreateTriggerRequest, options: CallOptions, callback: Callback< LROperation< @@ -1516,8 +1807,8 @@ export class EventarcClient { {} | null | undefined > ): void; - deleteTrigger( - request: protos.google.cloud.eventarc.v1.IDeleteTriggerRequest, + createTrigger( + request: protos.google.cloud.eventarc.v1.ICreateTriggerRequest, callback: Callback< LROperation< protos.google.cloud.eventarc.v1.ITrigger, @@ -1527,8 +1818,8 @@ export class EventarcClient { {} | null | undefined > ): void; - deleteTrigger( - request?: protos.google.cloud.eventarc.v1.IDeleteTriggerRequest, + createTrigger( + request?: protos.google.cloud.eventarc.v1.ICreateTriggerRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1570,23 +1861,23 @@ export class EventarcClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.deleteTrigger(request, options, callback); + return this.innerApiCalls.createTrigger(request, options, callback); } /** - * Check the status of the long running operation returned by `deleteTrigger()`. + * Check the status of the long running operation returned by `createTrigger()`. * @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/eventarc.delete_trigger.js - * region_tag:eventarc_v1_generated_Eventarc_DeleteTrigger_async + * @example include:samples/generated/v1/eventarc.create_trigger.js + * region_tag:eventarc_v1_generated_Eventarc_CreateTrigger_async */ - async checkDeleteTriggerProgress( + async checkCreateTriggerProgress( name: string ): Promise< LROperation< @@ -1601,7 +1892,7 @@ export class EventarcClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.deleteTrigger, + this.descriptors.longrunning.createTrigger, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< @@ -1610,18 +1901,21 @@ export class EventarcClient { >; } /** - * Create a new channel in a particular project and location. + * Update a single trigger. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which to add this channel. - * @param {google.cloud.eventarc.v1.Channel} request.channel - * Required. The channel to create. - * @param {string} request.channelId - * Required. The user-provided ID to be assigned to the channel. - * @param {boolean} request.validateOnly - * Required. If set, validate the request and preview the review, but do not + * @param {google.cloud.eventarc.v1.Trigger} request.trigger + * The trigger to be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * @param {boolean} request.allowMissing + * If set to true, and the trigger is not found, a new trigger will be + * created. In this situation, `update_mask` is ignored. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not * post it. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1631,52 +1925,52 @@ export class EventarcClient { * 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/eventarc.create_channel.js - * region_tag:eventarc_v1_generated_Eventarc_CreateChannel_async + * @example include:samples/generated/v1/eventarc.update_trigger.js + * region_tag:eventarc_v1_generated_Eventarc_UpdateTrigger_async */ - createChannel( - request?: protos.google.cloud.eventarc.v1.ICreateChannelRequest, + updateTrigger( + request?: protos.google.cloud.eventarc.v1.IUpdateTriggerRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - createChannel( - request: protos.google.cloud.eventarc.v1.ICreateChannelRequest, + updateTrigger( + request: protos.google.cloud.eventarc.v1.IUpdateTriggerRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createChannel( - request: protos.google.cloud.eventarc.v1.ICreateChannelRequest, + updateTrigger( + request: protos.google.cloud.eventarc.v1.IUpdateTriggerRequest, callback: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createChannel( - request?: protos.google.cloud.eventarc.v1.ICreateChannelRequest, + updateTrigger( + request?: protos.google.cloud.eventarc.v1.IUpdateTriggerRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -1684,7 +1978,7 @@ export class EventarcClient { >, callback?: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -1693,7 +1987,7 @@ export class EventarcClient { ): Promise< [ LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -1713,27 +2007,27 @@ export class EventarcClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + 'trigger.name': request.trigger!.name ?? '', }); this.initialize(); - return this.innerApiCalls.createChannel(request, options, callback); + return this.innerApiCalls.updateTrigger(request, options, callback); } /** - * Check the status of the long running operation returned by `createChannel()`. + * Check the status of the long running operation returned by `updateTrigger()`. * @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/eventarc.create_channel.js - * region_tag:eventarc_v1_generated_Eventarc_CreateChannel_async + * @example include:samples/generated/v1/eventarc.update_trigger.js + * region_tag:eventarc_v1_generated_Eventarc_UpdateTrigger_async */ - async checkCreateChannelProgress( + async checkUpdateTriggerProgress( name: string ): Promise< LROperation< - protos.google.cloud.eventarc.v1.Channel, + protos.google.cloud.eventarc.v1.Trigger, protos.google.cloud.eventarc.v1.OperationMetadata > > { @@ -1744,27 +2038,29 @@ export class EventarcClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.createChannel, + this.descriptors.longrunning.updateTrigger, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.eventarc.v1.Channel, + protos.google.cloud.eventarc.v1.Trigger, protos.google.cloud.eventarc.v1.OperationMetadata >; } /** - * Update a single channel. + * Delete a single trigger. * * @param {Object} request * The request object that will be sent. - * @param {google.cloud.eventarc.v1.Channel} request.channel - * The channel to be updated. - * @param {google.protobuf.FieldMask} request.updateMask - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * @param {boolean} request.validateOnly - * Required. If set, validate the request and preview the review, but do not + * @param {string} request.name + * Required. The name of the trigger to be deleted. + * @param {string} request.etag + * If provided, the trigger will only be deleted if the etag matches the + * current etag on the resource. + * @param {boolean} request.allowMissing + * If set to true, and the trigger is not found, the request will succeed + * but no action will be taken on the server. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not * post it. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1774,52 +2070,52 @@ export class EventarcClient { * 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/eventarc.update_channel.js - * region_tag:eventarc_v1_generated_Eventarc_UpdateChannel_async + * @example include:samples/generated/v1/eventarc.delete_trigger.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteTrigger_async */ - updateChannel( - request?: protos.google.cloud.eventarc.v1.IUpdateChannelRequest, + deleteTrigger( + request?: protos.google.cloud.eventarc.v1.IDeleteTriggerRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - updateChannel( - request: protos.google.cloud.eventarc.v1.IUpdateChannelRequest, + deleteTrigger( + request: protos.google.cloud.eventarc.v1.IDeleteTriggerRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - updateChannel( - request: protos.google.cloud.eventarc.v1.IUpdateChannelRequest, + deleteTrigger( + request: protos.google.cloud.eventarc.v1.IDeleteTriggerRequest, callback: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - updateChannel( - request?: protos.google.cloud.eventarc.v1.IUpdateChannelRequest, + deleteTrigger( + request?: protos.google.cloud.eventarc.v1.IDeleteTriggerRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -1827,7 +2123,7 @@ export class EventarcClient { >, callback?: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -1836,7 +2132,7 @@ export class EventarcClient { ): Promise< [ LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -1856,27 +2152,27 @@ export class EventarcClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'channel.name': request.channel!.name ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.updateChannel(request, options, callback); + return this.innerApiCalls.deleteTrigger(request, options, callback); } /** - * Check the status of the long running operation returned by `updateChannel()`. + * Check the status of the long running operation returned by `deleteTrigger()`. * @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/eventarc.update_channel.js - * region_tag:eventarc_v1_generated_Eventarc_UpdateChannel_async + * @example include:samples/generated/v1/eventarc.delete_trigger.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteTrigger_async */ - async checkUpdateChannelProgress( + async checkDeleteTriggerProgress( name: string ): Promise< LROperation< - protos.google.cloud.eventarc.v1.Channel, + protos.google.cloud.eventarc.v1.Trigger, protos.google.cloud.eventarc.v1.OperationMetadata > > { @@ -1887,23 +2183,27 @@ export class EventarcClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.updateChannel, + this.descriptors.longrunning.deleteTrigger, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.eventarc.v1.Channel, + protos.google.cloud.eventarc.v1.Trigger, protos.google.cloud.eventarc.v1.OperationMetadata >; } /** - * Delete a single channel. + * Create a new channel in a particular project and location. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The name of the channel to be deleted. - * @param {boolean} request.validateOnly - * Required. If set, validate the request and preview the review, but do not + * @param {string} request.parent + * Required. The parent collection in which to add this channel. + * @param {google.cloud.eventarc.v1.Channel} request.channel + * Required. The channel to create. + * @param {string} request.channelId + * Required. The user-provided ID to be assigned to the channel. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not * post it. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1913,11 +2213,11 @@ export class EventarcClient { * 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/eventarc.delete_channel.js - * region_tag:eventarc_v1_generated_Eventarc_DeleteChannel_async + * @example include:samples/generated/v1/eventarc.create_channel.js + * region_tag:eventarc_v1_generated_Eventarc_CreateChannel_async */ - deleteChannel( - request?: protos.google.cloud.eventarc.v1.IDeleteChannelRequest, + createChannel( + request?: protos.google.cloud.eventarc.v1.ICreateChannelRequest, options?: CallOptions ): Promise< [ @@ -1929,8 +2229,8 @@ export class EventarcClient { {} | undefined, ] >; - deleteChannel( - request: protos.google.cloud.eventarc.v1.IDeleteChannelRequest, + createChannel( + request: protos.google.cloud.eventarc.v1.ICreateChannelRequest, options: CallOptions, callback: Callback< LROperation< @@ -1941,8 +2241,8 @@ export class EventarcClient { {} | null | undefined > ): void; - deleteChannel( - request: protos.google.cloud.eventarc.v1.IDeleteChannelRequest, + createChannel( + request: protos.google.cloud.eventarc.v1.ICreateChannelRequest, callback: Callback< LROperation< protos.google.cloud.eventarc.v1.IChannel, @@ -1952,8 +2252,8 @@ export class EventarcClient { {} | null | undefined > ): void; - deleteChannel( - request?: protos.google.cloud.eventarc.v1.IDeleteChannelRequest, + createChannel( + request?: protos.google.cloud.eventarc.v1.ICreateChannelRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1995,23 +2295,23 @@ export class EventarcClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.deleteChannel(request, options, callback); + return this.innerApiCalls.createChannel(request, options, callback); } /** - * Check the status of the long running operation returned by `deleteChannel()`. + * Check the status of the long running operation returned by `createChannel()`. * @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/eventarc.delete_channel.js - * region_tag:eventarc_v1_generated_Eventarc_DeleteChannel_async + * @example include:samples/generated/v1/eventarc.create_channel.js + * region_tag:eventarc_v1_generated_Eventarc_CreateChannel_async */ - async checkDeleteChannelProgress( + async checkCreateChannelProgress( name: string ): Promise< LROperation< @@ -2026,7 +2326,7 @@ export class EventarcClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.deleteChannel, + this.descriptors.longrunning.createChannel, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< @@ -2035,16 +2335,19 @@ export class EventarcClient { >; } /** - * Create a new ChannelConnection in a particular project and location. + * Update a single channel. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent collection in which to add this channel connection. - * @param {google.cloud.eventarc.v1.ChannelConnection} request.channelConnection - * Required. Channel connection to create. - * @param {string} request.channelConnectionId - * Required. The user-provided ID to be assigned to the channel connection. + * @param {google.cloud.eventarc.v1.Channel} request.channel + * The channel to be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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. @@ -2053,52 +2356,52 @@ export class EventarcClient { * 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/eventarc.create_channel_connection.js - * region_tag:eventarc_v1_generated_Eventarc_CreateChannelConnection_async + * @example include:samples/generated/v1/eventarc.update_channel.js + * region_tag:eventarc_v1_generated_Eventarc_UpdateChannel_async */ - createChannelConnection( - request?: protos.google.cloud.eventarc.v1.ICreateChannelConnectionRequest, + updateChannel( + request?: protos.google.cloud.eventarc.v1.IUpdateChannelRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - createChannelConnection( - request: protos.google.cloud.eventarc.v1.ICreateChannelConnectionRequest, + updateChannel( + request: protos.google.cloud.eventarc.v1.IUpdateChannelRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createChannelConnection( - request: protos.google.cloud.eventarc.v1.ICreateChannelConnectionRequest, + updateChannel( + request: protos.google.cloud.eventarc.v1.IUpdateChannelRequest, callback: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createChannelConnection( - request?: protos.google.cloud.eventarc.v1.ICreateChannelConnectionRequest, + updateChannel( + request?: protos.google.cloud.eventarc.v1.IUpdateChannelRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2106,7 +2409,7 @@ export class EventarcClient { >, callback?: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2115,7 +2418,7 @@ export class EventarcClient { ): Promise< [ LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2135,31 +2438,27 @@ export class EventarcClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + 'channel.name': request.channel!.name ?? '', }); this.initialize(); - return this.innerApiCalls.createChannelConnection( - request, - options, - callback - ); + return this.innerApiCalls.updateChannel(request, options, callback); } /** - * Check the status of the long running operation returned by `createChannelConnection()`. + * Check the status of the long running operation returned by `updateChannel()`. * @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/eventarc.create_channel_connection.js - * region_tag:eventarc_v1_generated_Eventarc_CreateChannelConnection_async + * @example include:samples/generated/v1/eventarc.update_channel.js + * region_tag:eventarc_v1_generated_Eventarc_UpdateChannel_async */ - async checkCreateChannelConnectionProgress( + async checkUpdateChannelProgress( name: string ): Promise< LROperation< - protos.google.cloud.eventarc.v1.ChannelConnection, + protos.google.cloud.eventarc.v1.Channel, protos.google.cloud.eventarc.v1.OperationMetadata > > { @@ -2170,21 +2469,24 @@ export class EventarcClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.createChannelConnection, + this.descriptors.longrunning.updateChannel, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.eventarc.v1.ChannelConnection, + protos.google.cloud.eventarc.v1.Channel, protos.google.cloud.eventarc.v1.OperationMetadata >; } /** - * Delete a single ChannelConnection. + * Delete a single channel. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the channel connection to delete. + * Required. The name of the channel to be deleted. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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. @@ -2193,52 +2495,52 @@ export class EventarcClient { * 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/eventarc.delete_channel_connection.js - * region_tag:eventarc_v1_generated_Eventarc_DeleteChannelConnection_async + * @example include:samples/generated/v1/eventarc.delete_channel.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteChannel_async */ - deleteChannelConnection( - request?: protos.google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, + deleteChannel( + request?: protos.google.cloud.eventarc.v1.IDeleteChannelRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined, ] >; - deleteChannelConnection( - request: protos.google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, + deleteChannel( + request: protos.google.cloud.eventarc.v1.IDeleteChannelRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteChannelConnection( - request: protos.google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, + deleteChannel( + request: protos.google.cloud.eventarc.v1.IDeleteChannelRequest, callback: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteChannelConnection( - request?: protos.google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, + deleteChannel( + request?: protos.google.cloud.eventarc.v1.IDeleteChannelRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2246,7 +2548,7 @@ export class EventarcClient { >, callback?: Callback< LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2255,7 +2557,7 @@ export class EventarcClient { ): Promise< [ LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2278,28 +2580,24 @@ export class EventarcClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.deleteChannelConnection( - request, - options, - callback - ); + return this.innerApiCalls.deleteChannel(request, options, callback); } /** - * Check the status of the long running operation returned by `deleteChannelConnection()`. + * Check the status of the long running operation returned by `deleteChannel()`. * @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/eventarc.delete_channel_connection.js - * region_tag:eventarc_v1_generated_Eventarc_DeleteChannelConnection_async + * @example include:samples/generated/v1/eventarc.delete_channel.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteChannel_async */ - async checkDeleteChannelConnectionProgress( + async checkDeleteChannelProgress( name: string ): Promise< LROperation< - protos.google.cloud.eventarc.v1.ChannelConnection, + protos.google.cloud.eventarc.v1.Channel, protos.google.cloud.eventarc.v1.OperationMetadata > > { @@ -2310,11 +2608,2035 @@ export class EventarcClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.deleteChannelConnection, + this.descriptors.longrunning.deleteChannel, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.eventarc.v1.ChannelConnection, + protos.google.cloud.eventarc.v1.Channel, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Create a new ChannelConnection in a particular project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which to add this channel connection. + * @param {google.cloud.eventarc.v1.ChannelConnection} request.channelConnection + * Required. Channel connection to create. + * @param {string} request.channelConnectionId + * Required. The user-provided ID to be assigned to the channel connection. + * @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/eventarc.create_channel_connection.js + * region_tag:eventarc_v1_generated_Eventarc_CreateChannelConnection_async + */ + createChannelConnection( + request?: protos.google.cloud.eventarc.v1.ICreateChannelConnectionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createChannelConnection( + request: protos.google.cloud.eventarc.v1.ICreateChannelConnectionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createChannelConnection( + request: protos.google.cloud.eventarc.v1.ICreateChannelConnectionRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createChannelConnection( + request?: protos.google.cloud.eventarc.v1.ICreateChannelConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createChannelConnection( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createChannelConnection()`. + * @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/eventarc.create_channel_connection.js + * region_tag:eventarc_v1_generated_Eventarc_CreateChannelConnection_async + */ + async checkCreateChannelConnectionProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.ChannelConnection, + protos.google.cloud.eventarc.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.createChannelConnection, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.ChannelConnection, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Delete a single ChannelConnection. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the channel connection to delete. + * @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/eventarc.delete_channel_connection.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteChannelConnection_async + */ + deleteChannelConnection( + request?: protos.google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteChannelConnection( + request: protos.google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteChannelConnection( + request: protos.google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteChannelConnection( + request?: protos.google.cloud.eventarc.v1.IDeleteChannelConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.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.deleteChannelConnection( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteChannelConnection()`. + * @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/eventarc.delete_channel_connection.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteChannelConnection_async + */ + async checkDeleteChannelConnectionProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.ChannelConnection, + protos.google.cloud.eventarc.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.deleteChannelConnection, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.ChannelConnection, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Create a new MessageBus in a particular project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which to add this message bus. + * @param {google.cloud.eventarc.v1.MessageBus} request.messageBus + * Required. The message bus to create. + * @param {string} request.messageBusId + * Required. The user-provided ID to be assigned to the MessageBus. It should + * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.create_message_bus.js + * region_tag:eventarc_v1_generated_Eventarc_CreateMessageBus_async + */ + createMessageBus( + request?: protos.google.cloud.eventarc.v1.ICreateMessageBusRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createMessageBus( + request: protos.google.cloud.eventarc.v1.ICreateMessageBusRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createMessageBus( + request: protos.google.cloud.eventarc.v1.ICreateMessageBusRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createMessageBus( + request?: protos.google.cloud.eventarc.v1.ICreateMessageBusRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createMessageBus(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createMessageBus()`. + * @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/eventarc.create_message_bus.js + * region_tag:eventarc_v1_generated_Eventarc_CreateMessageBus_async + */ + async checkCreateMessageBusProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.MessageBus, + protos.google.cloud.eventarc.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.createMessageBus, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.MessageBus, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Update a single message bus. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.eventarc.v1.MessageBus} request.messageBus + * Required. The MessageBus to be updated. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The fields to be updated; only fields explicitly provided are + * updated. If no field mask is provided, all provided fields in the request + * are updated. To update all fields, provide a field mask of "*". + * @param {boolean} [request.allowMissing] + * Optional. If set to true, and the MessageBus is not found, a new MessageBus + * will be created. In this situation, `update_mask` is ignored. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.update_message_bus.js + * region_tag:eventarc_v1_generated_Eventarc_UpdateMessageBus_async + */ + updateMessageBus( + request?: protos.google.cloud.eventarc.v1.IUpdateMessageBusRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateMessageBus( + request: protos.google.cloud.eventarc.v1.IUpdateMessageBusRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateMessageBus( + request: protos.google.cloud.eventarc.v1.IUpdateMessageBusRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateMessageBus( + request?: protos.google.cloud.eventarc.v1.IUpdateMessageBusRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.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({ + 'message_bus.name': request.messageBus!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateMessageBus(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateMessageBus()`. + * @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/eventarc.update_message_bus.js + * region_tag:eventarc_v1_generated_Eventarc_UpdateMessageBus_async + */ + async checkUpdateMessageBusProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.MessageBus, + protos.google.cloud.eventarc.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.updateMessageBus, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.MessageBus, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Delete a single message bus. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the MessageBus to be deleted. + * @param {string} [request.etag] + * Optional. If provided, the MessageBus will only be deleted if the etag + * matches the current etag on the resource. + * @param {boolean} [request.allowMissing] + * Optional. If set to true, and the MessageBus is not found, the request will + * succeed but no action will be taken on the server. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.delete_message_bus.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteMessageBus_async + */ + deleteMessageBus( + request?: protos.google.cloud.eventarc.v1.IDeleteMessageBusRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteMessageBus( + request: protos.google.cloud.eventarc.v1.IDeleteMessageBusRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteMessageBus( + request: protos.google.cloud.eventarc.v1.IDeleteMessageBusRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteMessageBus( + request?: protos.google.cloud.eventarc.v1.IDeleteMessageBusRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.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.deleteMessageBus(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteMessageBus()`. + * @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/eventarc.delete_message_bus.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteMessageBus_async + */ + async checkDeleteMessageBusProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.MessageBus, + protos.google.cloud.eventarc.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.deleteMessageBus, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.MessageBus, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Create a new Enrollment in a particular project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which to add this enrollment. + * @param {google.cloud.eventarc.v1.Enrollment} request.enrollment + * Required. The enrollment to create. + * @param {string} request.enrollmentId + * Required. The user-provided ID to be assigned to the Enrollment. It should + * match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.create_enrollment.js + * region_tag:eventarc_v1_generated_Eventarc_CreateEnrollment_async + */ + createEnrollment( + request?: protos.google.cloud.eventarc.v1.ICreateEnrollmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createEnrollment( + request: protos.google.cloud.eventarc.v1.ICreateEnrollmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createEnrollment( + request: protos.google.cloud.eventarc.v1.ICreateEnrollmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createEnrollment( + request?: protos.google.cloud.eventarc.v1.ICreateEnrollmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createEnrollment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createEnrollment()`. + * @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/eventarc.create_enrollment.js + * region_tag:eventarc_v1_generated_Eventarc_CreateEnrollment_async + */ + async checkCreateEnrollmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.Enrollment, + protos.google.cloud.eventarc.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.createEnrollment, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.Enrollment, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Update a single Enrollment. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.eventarc.v1.Enrollment} request.enrollment + * Required. The Enrollment to be updated. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The fields to be updated; only fields explicitly provided are + * updated. If no field mask is provided, all provided fields in the request + * are updated. To update all fields, provide a field mask of "*". + * @param {boolean} [request.allowMissing] + * Optional. If set to true, and the Enrollment is not found, a new Enrollment + * will be created. In this situation, `update_mask` is ignored. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.update_enrollment.js + * region_tag:eventarc_v1_generated_Eventarc_UpdateEnrollment_async + */ + updateEnrollment( + request?: protos.google.cloud.eventarc.v1.IUpdateEnrollmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateEnrollment( + request: protos.google.cloud.eventarc.v1.IUpdateEnrollmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateEnrollment( + request: protos.google.cloud.eventarc.v1.IUpdateEnrollmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateEnrollment( + request?: protos.google.cloud.eventarc.v1.IUpdateEnrollmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.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({ + 'enrollment.name': request.enrollment!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateEnrollment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateEnrollment()`. + * @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/eventarc.update_enrollment.js + * region_tag:eventarc_v1_generated_Eventarc_UpdateEnrollment_async + */ + async checkUpdateEnrollmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.Enrollment, + protos.google.cloud.eventarc.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.updateEnrollment, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.Enrollment, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Delete a single Enrollment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Enrollment to be deleted. + * @param {string} [request.etag] + * Optional. If provided, the Enrollment will only be deleted if the etag + * matches the current etag on the resource. + * @param {boolean} [request.allowMissing] + * Optional. If set to true, and the Enrollment is not found, the request will + * succeed but no action will be taken on the server. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.delete_enrollment.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteEnrollment_async + */ + deleteEnrollment( + request?: protos.google.cloud.eventarc.v1.IDeleteEnrollmentRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteEnrollment( + request: protos.google.cloud.eventarc.v1.IDeleteEnrollmentRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteEnrollment( + request: protos.google.cloud.eventarc.v1.IDeleteEnrollmentRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteEnrollment( + request?: protos.google.cloud.eventarc.v1.IDeleteEnrollmentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.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.deleteEnrollment(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteEnrollment()`. + * @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/eventarc.delete_enrollment.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteEnrollment_async + */ + async checkDeleteEnrollmentProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.Enrollment, + protos.google.cloud.eventarc.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.deleteEnrollment, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.Enrollment, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Create a new Pipeline in a particular project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which to add this pipeline. + * @param {google.cloud.eventarc.v1.Pipeline} request.pipeline + * Required. The pipeline to create. + * @param {string} request.pipelineId + * Required. The user-provided ID to be assigned to the Pipeline. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.create_pipeline.js + * region_tag:eventarc_v1_generated_Eventarc_CreatePipeline_async + */ + createPipeline( + request?: protos.google.cloud.eventarc.v1.ICreatePipelineRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createPipeline( + request: protos.google.cloud.eventarc.v1.ICreatePipelineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createPipeline( + request: protos.google.cloud.eventarc.v1.ICreatePipelineRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createPipeline( + request?: protos.google.cloud.eventarc.v1.ICreatePipelineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createPipeline(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createPipeline()`. + * @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/eventarc.create_pipeline.js + * region_tag:eventarc_v1_generated_Eventarc_CreatePipeline_async + */ + async checkCreatePipelineProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.Pipeline, + protos.google.cloud.eventarc.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.createPipeline, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.Pipeline, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Update a single pipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.eventarc.v1.Pipeline} request.pipeline + * Required. The Pipeline to be updated. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The fields to be updated; only fields explicitly provided are + * updated. If no field mask is provided, all provided fields in the request + * are updated. To update all fields, provide a field mask of "*". + * @param {boolean} [request.allowMissing] + * Optional. If set to true, and the Pipeline is not found, a new Pipeline + * will be created. In this situation, `update_mask` is ignored. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.update_pipeline.js + * region_tag:eventarc_v1_generated_Eventarc_UpdatePipeline_async + */ + updatePipeline( + request?: protos.google.cloud.eventarc.v1.IUpdatePipelineRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updatePipeline( + request: protos.google.cloud.eventarc.v1.IUpdatePipelineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updatePipeline( + request: protos.google.cloud.eventarc.v1.IUpdatePipelineRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updatePipeline( + request?: protos.google.cloud.eventarc.v1.IUpdatePipelineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.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({ + 'pipeline.name': request.pipeline!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updatePipeline(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updatePipeline()`. + * @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/eventarc.update_pipeline.js + * region_tag:eventarc_v1_generated_Eventarc_UpdatePipeline_async + */ + async checkUpdatePipelineProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.Pipeline, + protos.google.cloud.eventarc.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.updatePipeline, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.Pipeline, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Delete a single pipeline. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Pipeline to be deleted. + * @param {string} [request.etag] + * Optional. If provided, the Pipeline will only be deleted if the etag + * matches the current etag on the resource. + * @param {boolean} [request.allowMissing] + * Optional. If set to true, and the Pipeline is not found, the request will + * succeed but no action will be taken on the server. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.delete_pipeline.js + * region_tag:eventarc_v1_generated_Eventarc_DeletePipeline_async + */ + deletePipeline( + request?: protos.google.cloud.eventarc.v1.IDeletePipelineRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deletePipeline( + request: protos.google.cloud.eventarc.v1.IDeletePipelineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deletePipeline( + request: protos.google.cloud.eventarc.v1.IDeletePipelineRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deletePipeline( + request?: protos.google.cloud.eventarc.v1.IDeletePipelineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.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.deletePipeline(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deletePipeline()`. + * @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/eventarc.delete_pipeline.js + * region_tag:eventarc_v1_generated_Eventarc_DeletePipeline_async + */ + async checkDeletePipelineProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.Pipeline, + protos.google.cloud.eventarc.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.deletePipeline, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.Pipeline, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Create a new GoogleApiSource in a particular project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection in which to add this google api source. + * @param {google.cloud.eventarc.v1.GoogleApiSource} request.googleApiSource + * Required. The google api source to create. + * @param {string} request.googleApiSourceId + * Required. The user-provided ID to be assigned to the GoogleApiSource. It + * should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.create_google_api_source.js + * region_tag:eventarc_v1_generated_Eventarc_CreateGoogleApiSource_async + */ + createGoogleApiSource( + request?: protos.google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createGoogleApiSource( + request: protos.google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createGoogleApiSource( + request: protos.google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createGoogleApiSource( + request?: protos.google.cloud.eventarc.v1.ICreateGoogleApiSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createGoogleApiSource(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createGoogleApiSource()`. + * @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/eventarc.create_google_api_source.js + * region_tag:eventarc_v1_generated_Eventarc_CreateGoogleApiSource_async + */ + async checkCreateGoogleApiSourceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.GoogleApiSource, + protos.google.cloud.eventarc.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.createGoogleApiSource, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.GoogleApiSource, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Update a single GoogleApiSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.eventarc.v1.GoogleApiSource} request.googleApiSource + * Required. The GoogleApiSource to be updated. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The fields to be updated; only fields explicitly provided are + * updated. If no field mask is provided, all provided fields in the request + * are updated. To update all fields, provide a field mask of "*". + * @param {boolean} [request.allowMissing] + * Optional. If set to true, and the GoogleApiSource is not found, a new + * GoogleApiSource will be created. In this situation, `update_mask` is + * ignored. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.update_google_api_source.js + * region_tag:eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_async + */ + updateGoogleApiSource( + request?: protos.google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateGoogleApiSource( + request: protos.google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateGoogleApiSource( + request: protos.google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateGoogleApiSource( + request?: protos.google.cloud.eventarc.v1.IUpdateGoogleApiSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.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({ + 'google_api_source.name': request.googleApiSource!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateGoogleApiSource(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateGoogleApiSource()`. + * @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/eventarc.update_google_api_source.js + * region_tag:eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_async + */ + async checkUpdateGoogleApiSourceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.GoogleApiSource, + protos.google.cloud.eventarc.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.updateGoogleApiSource, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.GoogleApiSource, + protos.google.cloud.eventarc.v1.OperationMetadata + >; + } + /** + * Delete a single GoogleApiSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the GoogleApiSource to be deleted. + * @param {string} [request.etag] + * Optional. If provided, the MessageBus will only be deleted if the etag + * matches the current etag on the resource. + * @param {boolean} [request.allowMissing] + * Optional. If set to true, and the MessageBus is not found, the request will + * succeed but no action will be taken on the server. + * @param {boolean} [request.validateOnly] + * Optional. If set, validate the request and preview the review, but do not + * post 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/eventarc.delete_google_api_source.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_async + */ + deleteGoogleApiSource( + request?: protos.google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteGoogleApiSource( + request: protos.google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteGoogleApiSource( + request: protos.google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest, + callback: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteGoogleApiSource( + request?: protos.google.cloud.eventarc.v1.IDeleteGoogleApiSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.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.deleteGoogleApiSource(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteGoogleApiSource()`. + * @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/eventarc.delete_google_api_source.js + * region_tag:eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_async + */ + async checkDeleteGoogleApiSourceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.eventarc.v1.GoogleApiSource, + protos.google.cloud.eventarc.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.deleteGoogleApiSource, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.eventarc.v1.GoogleApiSource, protos.google.cloud.eventarc.v1.OperationMetadata >; } @@ -2324,86 +4646,1170 @@ export class EventarcClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection to list triggers on. - * @param {number} request.pageSize - * The maximum number of triggers to return on each page. + * Required. The parent collection to list triggers on. + * @param {number} request.pageSize + * The maximum number of triggers to return on each page. + * + * Note: The service may send fewer. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListTriggers` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListTriggers` must match + * the call that provided the page token. + * @param {string} request.orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, trigger_id`. + * @param {string} request.filter + * Filter field. Used to filter the Triggers to be listed. Possible filters + * are described in https://google.aip.dev/160. For example, using + * "?filter=destination:gke" would list only Triggers with a gke destination. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.Trigger|Trigger}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listTriggersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTriggers( + request?: protos.google.cloud.eventarc.v1.IListTriggersRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.eventarc.v1.ITrigger[], + protos.google.cloud.eventarc.v1.IListTriggersRequest | null, + protos.google.cloud.eventarc.v1.IListTriggersResponse, + ] + >; + listTriggers( + request: protos.google.cloud.eventarc.v1.IListTriggersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.eventarc.v1.IListTriggersRequest, + protos.google.cloud.eventarc.v1.IListTriggersResponse | null | undefined, + protos.google.cloud.eventarc.v1.ITrigger + > + ): void; + listTriggers( + request: protos.google.cloud.eventarc.v1.IListTriggersRequest, + callback: PaginationCallback< + protos.google.cloud.eventarc.v1.IListTriggersRequest, + protos.google.cloud.eventarc.v1.IListTriggersResponse | null | undefined, + protos.google.cloud.eventarc.v1.ITrigger + > + ): void; + listTriggers( + request?: protos.google.cloud.eventarc.v1.IListTriggersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.eventarc.v1.IListTriggersRequest, + | protos.google.cloud.eventarc.v1.IListTriggersResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.ITrigger + >, + callback?: PaginationCallback< + protos.google.cloud.eventarc.v1.IListTriggersRequest, + protos.google.cloud.eventarc.v1.IListTriggersResponse | null | undefined, + protos.google.cloud.eventarc.v1.ITrigger + > + ): Promise< + [ + protos.google.cloud.eventarc.v1.ITrigger[], + protos.google.cloud.eventarc.v1.IListTriggersRequest | null, + protos.google.cloud.eventarc.v1.IListTriggersResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listTriggers(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection to list triggers on. + * @param {number} request.pageSize + * The maximum number of triggers to return on each page. + * + * Note: The service may send fewer. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListTriggers` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListTriggers` must match + * the call that provided the page token. + * @param {string} request.orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, trigger_id`. + * @param {string} request.filter + * Filter field. Used to filter the Triggers to be listed. Possible filters + * are described in https://google.aip.dev/160. For example, using + * "?filter=destination:gke" would list only Triggers with a gke destination. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.Trigger|Trigger} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listTriggersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTriggersStream( + request?: protos.google.cloud.eventarc.v1.IListTriggersRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTriggers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTriggers.createStream( + this.innerApiCalls.listTriggers as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listTriggers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection to list triggers on. + * @param {number} request.pageSize + * The maximum number of triggers to return on each page. + * + * Note: The service may send fewer. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListTriggers` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListTriggers` must match + * the call that provided the page token. + * @param {string} request.orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, trigger_id`. + * @param {string} request.filter + * Filter field. Used to filter the Triggers to be listed. Possible filters + * are described in https://google.aip.dev/160. For example, using + * "?filter=destination:gke" would list only Triggers with a gke destination. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.eventarc.v1.Trigger|Trigger}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/eventarc.list_triggers.js + * region_tag:eventarc_v1_generated_Eventarc_ListTriggers_async + */ + listTriggersAsync( + request?: protos.google.cloud.eventarc.v1.IListTriggersRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTriggers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTriggers.asyncIterate( + this.innerApiCalls['listTriggers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * List channels. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection to list channels on. + * @param {number} request.pageSize + * The maximum number of channels to return on each page. + * + * Note: The service may send fewer. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannels` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListChannels` must + * match the call that provided the page token. + * @param {string} request.orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, channel_id`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.Channel|Channel}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listChannelsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listChannels( + request?: protos.google.cloud.eventarc.v1.IListChannelsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.eventarc.v1.IChannel[], + protos.google.cloud.eventarc.v1.IListChannelsRequest | null, + protos.google.cloud.eventarc.v1.IListChannelsResponse, + ] + >; + listChannels( + request: protos.google.cloud.eventarc.v1.IListChannelsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.eventarc.v1.IListChannelsRequest, + protos.google.cloud.eventarc.v1.IListChannelsResponse | null | undefined, + protos.google.cloud.eventarc.v1.IChannel + > + ): void; + listChannels( + request: protos.google.cloud.eventarc.v1.IListChannelsRequest, + callback: PaginationCallback< + protos.google.cloud.eventarc.v1.IListChannelsRequest, + protos.google.cloud.eventarc.v1.IListChannelsResponse | null | undefined, + protos.google.cloud.eventarc.v1.IChannel + > + ): void; + listChannels( + request?: protos.google.cloud.eventarc.v1.IListChannelsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.eventarc.v1.IListChannelsRequest, + | protos.google.cloud.eventarc.v1.IListChannelsResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IChannel + >, + callback?: PaginationCallback< + protos.google.cloud.eventarc.v1.IListChannelsRequest, + protos.google.cloud.eventarc.v1.IListChannelsResponse | null | undefined, + protos.google.cloud.eventarc.v1.IChannel + > + ): Promise< + [ + protos.google.cloud.eventarc.v1.IChannel[], + protos.google.cloud.eventarc.v1.IListChannelsRequest | null, + protos.google.cloud.eventarc.v1.IListChannelsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listChannels(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection to list channels on. + * @param {number} request.pageSize + * The maximum number of channels to return on each page. + * + * Note: The service may send fewer. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannels` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListChannels` must + * match the call that provided the page token. + * @param {string} request.orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, channel_id`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.Channel|Channel} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listChannelsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listChannelsStream( + request?: protos.google.cloud.eventarc.v1.IListChannelsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listChannels']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listChannels.createStream( + this.innerApiCalls.listChannels as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listChannels`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection to list channels on. + * @param {number} request.pageSize + * The maximum number of channels to return on each page. + * + * Note: The service may send fewer. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannels` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListChannels` must + * match the call that provided the page token. + * @param {string} request.orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, channel_id`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.eventarc.v1.Channel|Channel}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/eventarc.list_channels.js + * region_tag:eventarc_v1_generated_Eventarc_ListChannels_async + */ + listChannelsAsync( + request?: protos.google.cloud.eventarc.v1.IListChannelsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listChannels']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listChannels.asyncIterate( + this.innerApiCalls['listChannels'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * List providers. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent of the provider to get. + * @param {number} request.pageSize + * The maximum number of providers to return on each page. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListProviders` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListProviders` must + * match the call that provided the page token. + * @param {string} request.orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting oder is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, _id`. + * @param {string} request.filter + * The filter field that the list request will filter on. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.Provider|Provider}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listProvidersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listProviders( + request?: protos.google.cloud.eventarc.v1.IListProvidersRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.eventarc.v1.IProvider[], + protos.google.cloud.eventarc.v1.IListProvidersRequest | null, + protos.google.cloud.eventarc.v1.IListProvidersResponse, + ] + >; + listProviders( + request: protos.google.cloud.eventarc.v1.IListProvidersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.eventarc.v1.IListProvidersRequest, + protos.google.cloud.eventarc.v1.IListProvidersResponse | null | undefined, + protos.google.cloud.eventarc.v1.IProvider + > + ): void; + listProviders( + request: protos.google.cloud.eventarc.v1.IListProvidersRequest, + callback: PaginationCallback< + protos.google.cloud.eventarc.v1.IListProvidersRequest, + protos.google.cloud.eventarc.v1.IListProvidersResponse | null | undefined, + protos.google.cloud.eventarc.v1.IProvider + > + ): void; + listProviders( + request?: protos.google.cloud.eventarc.v1.IListProvidersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.eventarc.v1.IListProvidersRequest, + | protos.google.cloud.eventarc.v1.IListProvidersResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IProvider + >, + callback?: PaginationCallback< + protos.google.cloud.eventarc.v1.IListProvidersRequest, + protos.google.cloud.eventarc.v1.IListProvidersResponse | null | undefined, + protos.google.cloud.eventarc.v1.IProvider + > + ): Promise< + [ + protos.google.cloud.eventarc.v1.IProvider[], + protos.google.cloud.eventarc.v1.IListProvidersRequest | null, + protos.google.cloud.eventarc.v1.IListProvidersResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listProviders(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent of the provider to get. + * @param {number} request.pageSize + * The maximum number of providers to return on each page. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListProviders` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListProviders` must + * match the call that provided the page token. + * @param {string} request.orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting oder is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, _id`. + * @param {string} request.filter + * The filter field that the list request will filter on. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.Provider|Provider} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listProvidersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listProvidersStream( + request?: protos.google.cloud.eventarc.v1.IListProvidersRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listProviders']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listProviders.createStream( + this.innerApiCalls.listProviders as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listProviders`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent of the provider to get. + * @param {number} request.pageSize + * The maximum number of providers to return on each page. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListProviders` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListProviders` must + * match the call that provided the page token. + * @param {string} request.orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting oder is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, _id`. + * @param {string} request.filter + * The filter field that the list request will filter on. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.eventarc.v1.Provider|Provider}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/eventarc.list_providers.js + * region_tag:eventarc_v1_generated_Eventarc_ListProviders_async + */ + listProvidersAsync( + request?: protos.google.cloud.eventarc.v1.IListProvidersRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listProviders']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listProviders.asyncIterate( + this.innerApiCalls['listProviders'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * List channel connections. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection from which to list channel connections. + * @param {number} request.pageSize + * The maximum number of channel connections to return on each page. + * + * Note: The service may send fewer responses. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannelConnections` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListChannelConnetions` + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.ChannelConnection|ChannelConnection}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listChannelConnectionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listChannelConnections( + request?: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.eventarc.v1.IChannelConnection[], + protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest | null, + protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse, + ] + >; + listChannelConnections( + request: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + | protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IChannelConnection + > + ): void; + listChannelConnections( + request: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + callback: PaginationCallback< + protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + | protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IChannelConnection + > + ): void; + listChannelConnections( + request?: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + | protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IChannelConnection + >, + callback?: PaginationCallback< + protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + | protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IChannelConnection + > + ): Promise< + [ + protos.google.cloud.eventarc.v1.IChannelConnection[], + protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest | null, + protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listChannelConnections( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection from which to list channel connections. + * @param {number} request.pageSize + * The maximum number of channel connections to return on each page. + * + * Note: The service may send fewer responses. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannelConnections` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListChannelConnetions` + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.ChannelConnection|ChannelConnection} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listChannelConnectionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listChannelConnectionsStream( + request?: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listChannelConnections']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listChannelConnections.createStream( + this.innerApiCalls.listChannelConnections as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listChannelConnections`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection from which to list channel connections. + * @param {number} request.pageSize + * The maximum number of channel connections to return on each page. + * + * Note: The service may send fewer responses. + * @param {string} request.pageToken + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannelConnections` call to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListChannelConnetions` + * match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.eventarc.v1.ChannelConnection|ChannelConnection}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/eventarc.list_channel_connections.js + * region_tag:eventarc_v1_generated_Eventarc_ListChannelConnections_async + */ + listChannelConnectionsAsync( + request?: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listChannelConnections']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listChannelConnections.asyncIterate( + this.innerApiCalls['listChannelConnections'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * List message buses. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection to list triggers on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. + * + * Note: The service may send fewer. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.MessageBus|MessageBus}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMessageBusesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMessageBuses( + request?: protos.google.cloud.eventarc.v1.IListMessageBusesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.eventarc.v1.IMessageBus[], + protos.google.cloud.eventarc.v1.IListMessageBusesRequest | null, + protos.google.cloud.eventarc.v1.IListMessageBusesResponse, + ] + >; + listMessageBuses( + request: protos.google.cloud.eventarc.v1.IListMessageBusesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.eventarc.v1.IListMessageBusesRequest, + | protos.google.cloud.eventarc.v1.IListMessageBusesResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IMessageBus + > + ): void; + listMessageBuses( + request: protos.google.cloud.eventarc.v1.IListMessageBusesRequest, + callback: PaginationCallback< + protos.google.cloud.eventarc.v1.IListMessageBusesRequest, + | protos.google.cloud.eventarc.v1.IListMessageBusesResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IMessageBus + > + ): void; + listMessageBuses( + request?: protos.google.cloud.eventarc.v1.IListMessageBusesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.eventarc.v1.IListMessageBusesRequest, + | protos.google.cloud.eventarc.v1.IListMessageBusesResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IMessageBus + >, + callback?: PaginationCallback< + protos.google.cloud.eventarc.v1.IListMessageBusesRequest, + | protos.google.cloud.eventarc.v1.IListMessageBusesResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IMessageBus + > + ): Promise< + [ + protos.google.cloud.eventarc.v1.IMessageBus[], + protos.google.cloud.eventarc.v1.IListMessageBusesRequest | null, + protos.google.cloud.eventarc.v1.IListMessageBusesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listMessageBuses(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection to list triggers on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. + * + * Note: The service may send fewer. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.MessageBus|MessageBus} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listMessageBusesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMessageBusesStream( + request?: protos.google.cloud.eventarc.v1.IListMessageBusesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMessageBuses']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMessageBuses.createStream( + this.innerApiCalls.listMessageBuses as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listMessageBuses`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection to list triggers on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. + * + * Note: The service may send fewer. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.eventarc.v1.MessageBus|MessageBus}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/eventarc.list_message_buses.js + * region_tag:eventarc_v1_generated_Eventarc_ListMessageBuses_async + */ + listMessageBusesAsync( + request?: protos.google.cloud.eventarc.v1.IListMessageBusesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMessageBuses']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMessageBuses.asyncIterate( + this.innerApiCalls['listMessageBuses'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * List message bus enrollments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent message bus to list enrollments on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * * Note: The service may send fewer. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListTriggers` call to retrieve the subsequent page. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListTriggers` must match - * the call that provided the page token. - * @param {string} request.orderBy - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, trigger_id`. - * @param {string} request.filter - * Filter field. Used to filter the Triggers to be listed. Possible filters - * are described in https://google.aip.dev/160. For example, using - * "?filter=destination:gke" would list only Triggers with a gke destination. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.Trigger|Trigger}. + * The first element of the array is Array of string. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listTriggersAsync()` + * We recommend using `listMessageBusEnrollmentsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listTriggers( - request?: protos.google.cloud.eventarc.v1.IListTriggersRequest, + listMessageBusEnrollments( + request?: protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.eventarc.v1.ITrigger[], - protos.google.cloud.eventarc.v1.IListTriggersRequest | null, - protos.google.cloud.eventarc.v1.IListTriggersResponse, + string[], + protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest | null, + protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse, ] >; - listTriggers( - request: protos.google.cloud.eventarc.v1.IListTriggersRequest, + listMessageBusEnrollments( + request: protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.eventarc.v1.IListTriggersRequest, - protos.google.cloud.eventarc.v1.IListTriggersResponse | null | undefined, - protos.google.cloud.eventarc.v1.ITrigger + protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, + | protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse + | null + | undefined, + string > ): void; - listTriggers( - request: protos.google.cloud.eventarc.v1.IListTriggersRequest, + listMessageBusEnrollments( + request: protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, callback: PaginationCallback< - protos.google.cloud.eventarc.v1.IListTriggersRequest, - protos.google.cloud.eventarc.v1.IListTriggersResponse | null | undefined, - protos.google.cloud.eventarc.v1.ITrigger + protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, + | protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse + | null + | undefined, + string > ): void; - listTriggers( - request?: protos.google.cloud.eventarc.v1.IListTriggersRequest, + listMessageBusEnrollments( + request?: protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.eventarc.v1.IListTriggersRequest, - | protos.google.cloud.eventarc.v1.IListTriggersResponse + protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, + | protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse | null | undefined, - protos.google.cloud.eventarc.v1.ITrigger + string >, callback?: PaginationCallback< - protos.google.cloud.eventarc.v1.IListTriggersRequest, - protos.google.cloud.eventarc.v1.IListTriggersResponse | null | undefined, - protos.google.cloud.eventarc.v1.ITrigger + protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, + | protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse + | null + | undefined, + string > ): Promise< [ - protos.google.cloud.eventarc.v1.ITrigger[], - protos.google.cloud.eventarc.v1.IListTriggersRequest | null, - protos.google.cloud.eventarc.v1.IListTriggersResponse, + string[], + protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest | null, + protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsResponse, ] > | void { request = request || {}; @@ -2422,7 +5828,11 @@ export class EventarcClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listTriggers(request, options, callback); + return this.innerApiCalls.listMessageBusEnrollments( + request, + options, + callback + ); } /** @@ -2430,39 +5840,30 @@ export class EventarcClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection to list triggers on. - * @param {number} request.pageSize - * The maximum number of triggers to return on each page. + * Required. The parent message bus to list enrollments on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * * Note: The service may send fewer. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListTriggers` call to retrieve the subsequent page. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListTriggers` must match - * the call that provided the page token. - * @param {string} request.orderBy - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, trigger_id`. - * @param {string} request.filter - * Filter field. Used to filter the Triggers to be listed. Possible filters - * are described in https://google.aip.dev/160. For example, using - * "?filter=destination:gke" would list only Triggers with a gke destination. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.Trigger|Trigger} on 'data' event. + * An object stream which emits an object representing string on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listTriggersAsync()` + * We recommend using `listMessageBusEnrollmentsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listTriggersStream( - request?: protos.google.cloud.eventarc.v1.IListTriggersRequest, + listMessageBusEnrollmentsStream( + request?: protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -2473,59 +5874,50 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listTriggers']; + const defaultCallSettings = this._defaults['listMessageBusEnrollments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listTriggers.createStream( - this.innerApiCalls.listTriggers as GaxCall, + return this.descriptors.page.listMessageBusEnrollments.createStream( + this.innerApiCalls.listMessageBusEnrollments as GaxCall, request, callSettings ); } /** - * Equivalent to `listTriggers`, but returns an iterable object. + * Equivalent to `listMessageBusEnrollments`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection to list triggers on. - * @param {number} request.pageSize - * The maximum number of triggers to return on each page. + * Required. The parent message bus to list enrollments on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * * Note: The service may send fewer. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListTriggers` call to retrieve the subsequent page. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListTriggers` must match - * the call that provided the page token. - * @param {string} request.orderBy - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, trigger_id`. - * @param {string} request.filter - * Filter field. Used to filter the Triggers to be listed. Possible filters - * are described in https://google.aip.dev/160. For example, using - * "?filter=destination:gke" would list only Triggers with a gke destination. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.eventarc.v1.Trigger|Trigger}. The API will be called under the hood as needed, once per the page, + * string. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/eventarc.list_triggers.js - * region_tag:eventarc_v1_generated_Eventarc_ListTriggers_async + * @example include:samples/generated/v1/eventarc.list_message_bus_enrollments.js + * region_tag:eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_async */ - listTriggersAsync( - request?: protos.google.cloud.eventarc.v1.IListTriggersRequest, + listMessageBusEnrollmentsAsync( + request?: protos.google.cloud.eventarc.v1.IListMessageBusEnrollmentsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2534,97 +5926,106 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listTriggers']; + const defaultCallSettings = this._defaults['listMessageBusEnrollments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listTriggers.asyncIterate( - this.innerApiCalls['listTriggers'] as GaxCall, + return this.descriptors.page.listMessageBusEnrollments.asyncIterate( + this.innerApiCalls['listMessageBusEnrollments'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * List channels. + * List Enrollments. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection to list channels on. - * @param {number} request.pageSize - * The maximum number of channels to return on each page. + * Required. The parent collection to list triggers on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * * Note: The service may send fewer. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannels` call to retrieve the subsequent page. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListChannels` must - * match the call that provided the page token. - * @param {string} request.orderBy - * The sorting order of the resources returned. Value should be a + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a * comma-separated list of fields. The default sorting order is ascending. To * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, channel_id`. + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.Channel|Channel}. + * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.Enrollment|Enrollment}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listChannelsAsync()` + * We recommend using `listEnrollmentsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listChannels( - request?: protos.google.cloud.eventarc.v1.IListChannelsRequest, + listEnrollments( + request?: protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.eventarc.v1.IChannel[], - protos.google.cloud.eventarc.v1.IListChannelsRequest | null, - protos.google.cloud.eventarc.v1.IListChannelsResponse, + protos.google.cloud.eventarc.v1.IEnrollment[], + protos.google.cloud.eventarc.v1.IListEnrollmentsRequest | null, + protos.google.cloud.eventarc.v1.IListEnrollmentsResponse, ] >; - listChannels( - request: protos.google.cloud.eventarc.v1.IListChannelsRequest, + listEnrollments( + request: protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.eventarc.v1.IListChannelsRequest, - protos.google.cloud.eventarc.v1.IListChannelsResponse | null | undefined, - protos.google.cloud.eventarc.v1.IChannel + protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, + | protos.google.cloud.eventarc.v1.IListEnrollmentsResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IEnrollment > ): void; - listChannels( - request: protos.google.cloud.eventarc.v1.IListChannelsRequest, + listEnrollments( + request: protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, callback: PaginationCallback< - protos.google.cloud.eventarc.v1.IListChannelsRequest, - protos.google.cloud.eventarc.v1.IListChannelsResponse | null | undefined, - protos.google.cloud.eventarc.v1.IChannel + protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, + | protos.google.cloud.eventarc.v1.IListEnrollmentsResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IEnrollment > ): void; - listChannels( - request?: protos.google.cloud.eventarc.v1.IListChannelsRequest, + listEnrollments( + request?: protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.eventarc.v1.IListChannelsRequest, - | protos.google.cloud.eventarc.v1.IListChannelsResponse + protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, + | protos.google.cloud.eventarc.v1.IListEnrollmentsResponse | null | undefined, - protos.google.cloud.eventarc.v1.IChannel + protos.google.cloud.eventarc.v1.IEnrollment >, callback?: PaginationCallback< - protos.google.cloud.eventarc.v1.IListChannelsRequest, - protos.google.cloud.eventarc.v1.IListChannelsResponse | null | undefined, - protos.google.cloud.eventarc.v1.IChannel + protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, + | protos.google.cloud.eventarc.v1.IListEnrollmentsResponse + | null + | undefined, + protos.google.cloud.eventarc.v1.IEnrollment > ): Promise< [ - protos.google.cloud.eventarc.v1.IChannel[], - protos.google.cloud.eventarc.v1.IListChannelsRequest | null, - protos.google.cloud.eventarc.v1.IListChannelsResponse, + protos.google.cloud.eventarc.v1.IEnrollment[], + protos.google.cloud.eventarc.v1.IListEnrollmentsRequest | null, + protos.google.cloud.eventarc.v1.IListEnrollmentsResponse, ] > | void { request = request || {}; @@ -2643,7 +6044,7 @@ export class EventarcClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listChannels(request, options, callback); + return this.innerApiCalls.listEnrollments(request, options, callback); } /** @@ -2651,35 +6052,38 @@ export class EventarcClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection to list channels on. - * @param {number} request.pageSize - * The maximum number of channels to return on each page. + * Required. The parent collection to list triggers on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * * Note: The service may send fewer. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannels` call to retrieve the subsequent page. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListChannels` must - * match the call that provided the page token. - * @param {string} request.orderBy - * The sorting order of the resources returned. Value should be a + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a * comma-separated list of fields. The default sorting order is ascending. To * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, channel_id`. + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.Channel|Channel} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.Enrollment|Enrollment} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listChannelsAsync()` + * We recommend using `listEnrollmentsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listChannelsStream( - request?: protos.google.cloud.eventarc.v1.IListChannelsRequest, + listEnrollmentsStream( + request?: protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -2690,55 +6094,58 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listChannels']; + const defaultCallSettings = this._defaults['listEnrollments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listChannels.createStream( - this.innerApiCalls.listChannels as GaxCall, + return this.descriptors.page.listEnrollments.createStream( + this.innerApiCalls.listEnrollments as GaxCall, request, callSettings ); } /** - * Equivalent to `listChannels`, but returns an iterable object. + * Equivalent to `listEnrollments`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection to list channels on. - * @param {number} request.pageSize - * The maximum number of channels to return on each page. + * Required. The parent collection to list triggers on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * * Note: The service may send fewer. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannels` call to retrieve the subsequent page. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListChannels` must - * match the call that provided the page token. - * @param {string} request.orderBy - * The sorting order of the resources returned. Value should be a + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a * comma-separated list of fields. The default sorting order is ascending. To * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, channel_id`. + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.eventarc.v1.Channel|Channel}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.eventarc.v1.Enrollment|Enrollment}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/eventarc.list_channels.js - * region_tag:eventarc_v1_generated_Eventarc_ListChannels_async + * @example include:samples/generated/v1/eventarc.list_enrollments.js + * region_tag:eventarc_v1_generated_Eventarc_ListEnrollments_async */ - listChannelsAsync( - request?: protos.google.cloud.eventarc.v1.IListChannelsRequest, + listEnrollmentsAsync( + request?: protos.google.cloud.eventarc.v1.IListEnrollmentsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2747,97 +6154,100 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listChannels']; + const defaultCallSettings = this._defaults['listEnrollments']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listChannels.asyncIterate( - this.innerApiCalls['listChannels'] as GaxCall, + return this.descriptors.page.listEnrollments.asyncIterate( + this.innerApiCalls['listEnrollments'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * List providers. + * List pipelines. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent of the provider to get. - * @param {number} request.pageSize - * The maximum number of providers to return on each page. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListProviders` call to retrieve the subsequent page. + * Required. The parent collection to list pipelines on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * - * When paginating, all other parameters provided to `ListProviders` must - * match the call that provided the page token. - * @param {string} request.orderBy - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting oder is ascending. To + * Note: The service may send fewer. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, _id`. - * @param {string} request.filter - * The filter field that the list request will filter on. + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filters are described in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.Provider|Provider}. + * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.Pipeline|Pipeline}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listProvidersAsync()` + * We recommend using `listPipelinesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listProviders( - request?: protos.google.cloud.eventarc.v1.IListProvidersRequest, + listPipelines( + request?: protos.google.cloud.eventarc.v1.IListPipelinesRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.eventarc.v1.IProvider[], - protos.google.cloud.eventarc.v1.IListProvidersRequest | null, - protos.google.cloud.eventarc.v1.IListProvidersResponse, + protos.google.cloud.eventarc.v1.IPipeline[], + protos.google.cloud.eventarc.v1.IListPipelinesRequest | null, + protos.google.cloud.eventarc.v1.IListPipelinesResponse, ] >; - listProviders( - request: protos.google.cloud.eventarc.v1.IListProvidersRequest, + listPipelines( + request: protos.google.cloud.eventarc.v1.IListPipelinesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.eventarc.v1.IListProvidersRequest, - protos.google.cloud.eventarc.v1.IListProvidersResponse | null | undefined, - protos.google.cloud.eventarc.v1.IProvider + protos.google.cloud.eventarc.v1.IListPipelinesRequest, + protos.google.cloud.eventarc.v1.IListPipelinesResponse | null | undefined, + protos.google.cloud.eventarc.v1.IPipeline > ): void; - listProviders( - request: protos.google.cloud.eventarc.v1.IListProvidersRequest, + listPipelines( + request: protos.google.cloud.eventarc.v1.IListPipelinesRequest, callback: PaginationCallback< - protos.google.cloud.eventarc.v1.IListProvidersRequest, - protos.google.cloud.eventarc.v1.IListProvidersResponse | null | undefined, - protos.google.cloud.eventarc.v1.IProvider + protos.google.cloud.eventarc.v1.IListPipelinesRequest, + protos.google.cloud.eventarc.v1.IListPipelinesResponse | null | undefined, + protos.google.cloud.eventarc.v1.IPipeline > ): void; - listProviders( - request?: protos.google.cloud.eventarc.v1.IListProvidersRequest, + listPipelines( + request?: protos.google.cloud.eventarc.v1.IListPipelinesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.eventarc.v1.IListProvidersRequest, - | protos.google.cloud.eventarc.v1.IListProvidersResponse + protos.google.cloud.eventarc.v1.IListPipelinesRequest, + | protos.google.cloud.eventarc.v1.IListPipelinesResponse | null | undefined, - protos.google.cloud.eventarc.v1.IProvider + protos.google.cloud.eventarc.v1.IPipeline >, callback?: PaginationCallback< - protos.google.cloud.eventarc.v1.IListProvidersRequest, - protos.google.cloud.eventarc.v1.IListProvidersResponse | null | undefined, - protos.google.cloud.eventarc.v1.IProvider + protos.google.cloud.eventarc.v1.IListPipelinesRequest, + protos.google.cloud.eventarc.v1.IListPipelinesResponse | null | undefined, + protos.google.cloud.eventarc.v1.IPipeline > ): Promise< [ - protos.google.cloud.eventarc.v1.IProvider[], - protos.google.cloud.eventarc.v1.IListProvidersRequest | null, - protos.google.cloud.eventarc.v1.IListProvidersResponse, + protos.google.cloud.eventarc.v1.IPipeline[], + protos.google.cloud.eventarc.v1.IListPipelinesRequest | null, + protos.google.cloud.eventarc.v1.IListPipelinesResponse, ] > | void { request = request || {}; @@ -2856,43 +6266,46 @@ export class EventarcClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listProviders(request, options, callback); + return this.innerApiCalls.listPipelines(request, options, callback); } - /** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent of the provider to get. - * @param {number} request.pageSize - * The maximum number of providers to return on each page. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListProviders` call to retrieve the subsequent page. + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent collection to list pipelines on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * - * When paginating, all other parameters provided to `ListProviders` must - * match the call that provided the page token. - * @param {string} request.orderBy - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting oder is ascending. To + * Note: The service may send fewer. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, _id`. - * @param {string} request.filter - * The filter field that the list request will filter on. + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filters are described in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.Provider|Provider} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.Pipeline|Pipeline} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listProvidersAsync()` + * We recommend using `listPipelinesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listProvidersStream( - request?: protos.google.cloud.eventarc.v1.IListProvidersRequest, + listPipelinesStream( + request?: protos.google.cloud.eventarc.v1.IListPipelinesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -2903,55 +6316,58 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listProviders']; + const defaultCallSettings = this._defaults['listPipelines']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listProviders.createStream( - this.innerApiCalls.listProviders as GaxCall, + return this.descriptors.page.listPipelines.createStream( + this.innerApiCalls.listPipelines as GaxCall, request, callSettings ); } /** - * Equivalent to `listProviders`, but returns an iterable object. + * Equivalent to `listPipelines`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent of the provider to get. - * @param {number} request.pageSize - * The maximum number of providers to return on each page. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListProviders` call to retrieve the subsequent page. + * Required. The parent collection to list pipelines on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * - * When paginating, all other parameters provided to `ListProviders` must - * match the call that provided the page token. - * @param {string} request.orderBy - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting oder is ascending. To + * Note: The service may send fewer. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. + * + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, _id`. - * @param {string} request.filter - * The filter field that the list request will filter on. + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filters are described in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.eventarc.v1.Provider|Provider}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.eventarc.v1.Pipeline|Pipeline}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/eventarc.list_providers.js - * region_tag:eventarc_v1_generated_Eventarc_ListProviders_async + * @example include:samples/generated/v1/eventarc.list_pipelines.js + * region_tag:eventarc_v1_generated_Eventarc_ListPipelines_async */ - listProvidersAsync( - request?: protos.google.cloud.eventarc.v1.IListProvidersRequest, + listPipelinesAsync( + request?: protos.google.cloud.eventarc.v1.IListPipelinesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2960,98 +6376,106 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listProviders']; + const defaultCallSettings = this._defaults['listPipelines']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listProviders.asyncIterate( - this.innerApiCalls['listProviders'] as GaxCall, + return this.descriptors.page.listPipelines.asyncIterate( + this.innerApiCalls['listPipelines'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * List channel connections. + * List GoogleApiSources. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection from which to list channel connections. - * @param {number} request.pageSize - * The maximum number of channel connections to return on each page. + * Required. The parent collection to list GoogleApiSources on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * - * Note: The service may send fewer responses. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannelConnections` call to retrieve the subsequent page. + * Note: The service may send fewer. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListChannelConnetions` - * match the call that provided the page token. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.ChannelConnection|ChannelConnection}. + * The first element of the array is Array of {@link protos.google.cloud.eventarc.v1.GoogleApiSource|GoogleApiSource}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listChannelConnectionsAsync()` + * We recommend using `listGoogleApiSourcesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listChannelConnections( - request?: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + listGoogleApiSources( + request?: protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.eventarc.v1.IChannelConnection[], - protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest | null, - protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse, + protos.google.cloud.eventarc.v1.IGoogleApiSource[], + protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest | null, + protos.google.cloud.eventarc.v1.IListGoogleApiSourcesResponse, ] >; - listChannelConnections( - request: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + listGoogleApiSources( + request: protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, - | protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse + protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, + | protos.google.cloud.eventarc.v1.IListGoogleApiSourcesResponse | null | undefined, - protos.google.cloud.eventarc.v1.IChannelConnection + protos.google.cloud.eventarc.v1.IGoogleApiSource > ): void; - listChannelConnections( - request: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + listGoogleApiSources( + request: protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, callback: PaginationCallback< - protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, - | protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse + protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, + | protos.google.cloud.eventarc.v1.IListGoogleApiSourcesResponse | null | undefined, - protos.google.cloud.eventarc.v1.IChannelConnection + protos.google.cloud.eventarc.v1.IGoogleApiSource > ): void; - listChannelConnections( - request?: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + listGoogleApiSources( + request?: protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, - | protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse + protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, + | protos.google.cloud.eventarc.v1.IListGoogleApiSourcesResponse | null | undefined, - protos.google.cloud.eventarc.v1.IChannelConnection + protos.google.cloud.eventarc.v1.IGoogleApiSource >, callback?: PaginationCallback< - protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, - | protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse + protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, + | protos.google.cloud.eventarc.v1.IListGoogleApiSourcesResponse | null | undefined, - protos.google.cloud.eventarc.v1.IChannelConnection + protos.google.cloud.eventarc.v1.IGoogleApiSource > ): Promise< [ - protos.google.cloud.eventarc.v1.IChannelConnection[], - protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest | null, - protos.google.cloud.eventarc.v1.IListChannelConnectionsResponse, + protos.google.cloud.eventarc.v1.IGoogleApiSource[], + protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest | null, + protos.google.cloud.eventarc.v1.IListGoogleApiSourcesResponse, ] > | void { request = request || {}; @@ -3070,11 +6494,7 @@ export class EventarcClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listChannelConnections( - request, - options, - callback - ); + return this.innerApiCalls.listGoogleApiSources(request, options, callback); } /** @@ -3082,30 +6502,38 @@ export class EventarcClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection from which to list channel connections. - * @param {number} request.pageSize - * The maximum number of channel connections to return on each page. + * Required. The parent collection to list GoogleApiSources on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * - * Note: The service may send fewer responses. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannelConnections` call to retrieve the subsequent page. + * Note: The service may send fewer. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListChannelConnetions` - * match the call that provided the page token. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.ChannelConnection|ChannelConnection} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.eventarc.v1.GoogleApiSource|GoogleApiSource} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listChannelConnectionsAsync()` + * We recommend using `listGoogleApiSourcesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listChannelConnectionsStream( - request?: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + listGoogleApiSourcesStream( + request?: protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3116,50 +6544,58 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listChannelConnections']; + const defaultCallSettings = this._defaults['listGoogleApiSources']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listChannelConnections.createStream( - this.innerApiCalls.listChannelConnections as GaxCall, + return this.descriptors.page.listGoogleApiSources.createStream( + this.innerApiCalls.listGoogleApiSources as GaxCall, request, callSettings ); } /** - * Equivalent to `listChannelConnections`, but returns an iterable object. + * Equivalent to `listGoogleApiSources`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent collection from which to list channel connections. - * @param {number} request.pageSize - * The maximum number of channel connections to return on each page. + * Required. The parent collection to list GoogleApiSources on. + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return on each page. * - * Note: The service may send fewer responses. - * @param {string} request.pageToken - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannelConnections` call to retrieve the subsequent page. + * Note: The service may send fewer. + * @param {string} [request.pageToken] + * Optional. The page token; provide the value from the `next_page_token` + * field in a previous call to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListChannelConnetions` - * match the call that provided the page token. + * When paginating, all other parameters provided must match + * the previous call that provided the page token. + * @param {string} [request.orderBy] + * Optional. The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, update_time`. + * @param {string} [request.filter] + * Optional. The filter field that the list request will filter on. + * Possible filtersare described in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.eventarc.v1.ChannelConnection|ChannelConnection}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.eventarc.v1.GoogleApiSource|GoogleApiSource}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/eventarc.list_channel_connections.js - * region_tag:eventarc_v1_generated_Eventarc_ListChannelConnections_async + * @example include:samples/generated/v1/eventarc.list_google_api_sources.js + * region_tag:eventarc_v1_generated_Eventarc_ListGoogleApiSources_async */ - listChannelConnectionsAsync( - request?: protos.google.cloud.eventarc.v1.IListChannelConnectionsRequest, + listGoogleApiSourcesAsync( + request?: protos.google.cloud.eventarc.v1.IListGoogleApiSourcesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3168,14 +6604,14 @@ export class EventarcClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listChannelConnections']; + const defaultCallSettings = this._defaults['listGoogleApiSources']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listChannelConnections.asyncIterate( - this.innerApiCalls['listChannelConnections'] as GaxCall, + return this.descriptors.page.listGoogleApiSources.asyncIterate( + this.innerApiCalls['listGoogleApiSources'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** * Gets the access control policy for a resource. Returns an empty policy @@ -3682,6 +7118,117 @@ export class EventarcClient { ).channel_connection; } + /** + * Return a fully-qualified enrollment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} enrollment + * @returns {string} Resource name string. + */ + enrollmentPath(project: string, location: string, enrollment: string) { + return this.pathTemplates.enrollmentPathTemplate.render({ + project: project, + location: location, + enrollment: enrollment, + }); + } + + /** + * Parse the project from Enrollment resource. + * + * @param {string} enrollmentName + * A fully-qualified path representing Enrollment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnrollmentName(enrollmentName: string) { + return this.pathTemplates.enrollmentPathTemplate.match(enrollmentName) + .project; + } + + /** + * Parse the location from Enrollment resource. + * + * @param {string} enrollmentName + * A fully-qualified path representing Enrollment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnrollmentName(enrollmentName: string) { + return this.pathTemplates.enrollmentPathTemplate.match(enrollmentName) + .location; + } + + /** + * Parse the enrollment from Enrollment resource. + * + * @param {string} enrollmentName + * A fully-qualified path representing Enrollment resource. + * @returns {string} A string representing the enrollment. + */ + matchEnrollmentFromEnrollmentName(enrollmentName: string) { + return this.pathTemplates.enrollmentPathTemplate.match(enrollmentName) + .enrollment; + } + + /** + * Return a fully-qualified googleApiSource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} google_api_source + * @returns {string} Resource name string. + */ + googleApiSourcePath( + project: string, + location: string, + googleApiSource: string + ) { + return this.pathTemplates.googleApiSourcePathTemplate.render({ + project: project, + location: location, + google_api_source: googleApiSource, + }); + } + + /** + * Parse the project from GoogleApiSource resource. + * + * @param {string} googleApiSourceName + * A fully-qualified path representing GoogleApiSource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromGoogleApiSourceName(googleApiSourceName: string) { + return this.pathTemplates.googleApiSourcePathTemplate.match( + googleApiSourceName + ).project; + } + + /** + * Parse the location from GoogleApiSource resource. + * + * @param {string} googleApiSourceName + * A fully-qualified path representing GoogleApiSource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromGoogleApiSourceName(googleApiSourceName: string) { + return this.pathTemplates.googleApiSourcePathTemplate.match( + googleApiSourceName + ).location; + } + + /** + * Parse the google_api_source from GoogleApiSource resource. + * + * @param {string} googleApiSourceName + * A fully-qualified path representing GoogleApiSource resource. + * @returns {string} A string representing the google_api_source. + */ + matchGoogleApiSourceFromGoogleApiSourceName(googleApiSourceName: string) { + return this.pathTemplates.googleApiSourcePathTemplate.match( + googleApiSourceName + ).google_api_source; + } + /** * Return a fully-qualified googleChannelConfig resource name string. * @@ -3758,6 +7305,107 @@ export class EventarcClient { return this.pathTemplates.locationPathTemplate.match(locationName).location; } + /** + * Return a fully-qualified messageBus resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} message_bus + * @returns {string} Resource name string. + */ + messageBusPath(project: string, location: string, messageBus: string) { + return this.pathTemplates.messageBusPathTemplate.render({ + project: project, + location: location, + message_bus: messageBus, + }); + } + + /** + * Parse the project from MessageBus resource. + * + * @param {string} messageBusName + * A fully-qualified path representing MessageBus resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMessageBusName(messageBusName: string) { + return this.pathTemplates.messageBusPathTemplate.match(messageBusName) + .project; + } + + /** + * Parse the location from MessageBus resource. + * + * @param {string} messageBusName + * A fully-qualified path representing MessageBus resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMessageBusName(messageBusName: string) { + return this.pathTemplates.messageBusPathTemplate.match(messageBusName) + .location; + } + + /** + * Parse the message_bus from MessageBus resource. + * + * @param {string} messageBusName + * A fully-qualified path representing MessageBus resource. + * @returns {string} A string representing the message_bus. + */ + matchMessageBusFromMessageBusName(messageBusName: string) { + return this.pathTemplates.messageBusPathTemplate.match(messageBusName) + .message_bus; + } + + /** + * Return a fully-qualified pipeline resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} pipeline + * @returns {string} Resource name string. + */ + pipelinePath(project: string, location: string, pipeline: string) { + return this.pathTemplates.pipelinePathTemplate.render({ + project: project, + location: location, + pipeline: pipeline, + }); + } + + /** + * Parse the project from Pipeline resource. + * + * @param {string} pipelineName + * A fully-qualified path representing Pipeline resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPipelineName(pipelineName: string) { + return this.pathTemplates.pipelinePathTemplate.match(pipelineName).project; + } + + /** + * Parse the location from Pipeline resource. + * + * @param {string} pipelineName + * A fully-qualified path representing Pipeline resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPipelineName(pipelineName: string) { + return this.pathTemplates.pipelinePathTemplate.match(pipelineName).location; + } + + /** + * Parse the pipeline from Pipeline resource. + * + * @param {string} pipelineName + * A fully-qualified path representing Pipeline resource. + * @returns {string} A string representing the pipeline. + */ + matchPipelineFromPipelineName(pipelineName: string) { + return this.pathTemplates.pipelinePathTemplate.match(pipelineName).pipeline; + } + /** * Return a fully-qualified project resource name string. * diff --git a/packages/google-cloud-eventarc/src/v1/eventarc_client_config.json b/packages/google-cloud-eventarc/src/v1/eventarc_client_config.json index b984a7f745d..e6da2d2fee9 100644 --- a/packages/google-cloud-eventarc/src/v1/eventarc_client_config.json +++ b/packages/google-cloud-eventarc/src/v1/eventarc_client_config.json @@ -6,6 +6,10 @@ "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" + ], + "unknown_unavailable": [ + "UNKNOWN", + "UNAVAILABLE" ] }, "retry_params": { @@ -17,78 +21,210 @@ "rpc_timeout_multiplier": 1, "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 } }, "methods": { "GetTrigger": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "ListTriggers": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "CreateTrigger": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateTrigger": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteTrigger": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetChannel": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "ListChannels": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, "CreateChannel": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateChannel": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteChannel": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetProvider": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListProviders": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetChannelConnection": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListChannelConnections": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateChannelConnection": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "ListProviders": { + "DeleteChannelConnection": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "GetChannelConnection": { + "GetGoogleChannelConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateGoogleChannelConfig": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "ListChannelConnections": { + "GetMessageBus": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListMessageBuses": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListMessageBusEnrollments": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateMessageBus": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "CreateChannelConnection": { + "UpdateMessageBus": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "DeleteChannelConnection": { + "DeleteMessageBus": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "GetGoogleChannelConfig": { + "GetEnrollment": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListEnrollments": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateEnrollment": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "UpdateGoogleChannelConfig": { + "UpdateEnrollment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEnrollment": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPipeline": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListPipelines": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreatePipeline": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdatePipeline": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeletePipeline": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetGoogleApiSource": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListGoogleApiSources": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateGoogleApiSource": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateGoogleApiSource": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteGoogleApiSource": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-eventarc/src/v1/eventarc_proto_list.json b/packages/google-cloud-eventarc/src/v1/eventarc_proto_list.json index 82b3e7f8eaa..46660e1b454 100644 --- a/packages/google-cloud-eventarc/src/v1/eventarc_proto_list.json +++ b/packages/google-cloud-eventarc/src/v1/eventarc_proto_list.json @@ -2,7 +2,13 @@ "../../protos/google/cloud/eventarc/v1/channel.proto", "../../protos/google/cloud/eventarc/v1/channel_connection.proto", "../../protos/google/cloud/eventarc/v1/discovery.proto", + "../../protos/google/cloud/eventarc/v1/enrollment.proto", "../../protos/google/cloud/eventarc/v1/eventarc.proto", + "../../protos/google/cloud/eventarc/v1/google_api_source.proto", "../../protos/google/cloud/eventarc/v1/google_channel_config.proto", + "../../protos/google/cloud/eventarc/v1/logging_config.proto", + "../../protos/google/cloud/eventarc/v1/message_bus.proto", + "../../protos/google/cloud/eventarc/v1/network_config.proto", + "../../protos/google/cloud/eventarc/v1/pipeline.proto", "../../protos/google/cloud/eventarc/v1/trigger.proto" ] diff --git a/packages/google-cloud-eventarc/src/v1/gapic_metadata.json b/packages/google-cloud-eventarc/src/v1/gapic_metadata.json index be504dad9ec..533866f6979 100644 --- a/packages/google-cloud-eventarc/src/v1/gapic_metadata.json +++ b/packages/google-cloud-eventarc/src/v1/gapic_metadata.json @@ -40,6 +40,26 @@ "updateGoogleChannelConfig" ] }, + "GetMessageBus": { + "methods": [ + "getMessageBus" + ] + }, + "GetEnrollment": { + "methods": [ + "getEnrollment" + ] + }, + "GetPipeline": { + "methods": [ + "getPipeline" + ] + }, + "GetGoogleApiSource": { + "methods": [ + "getGoogleApiSource" + ] + }, "CreateTrigger": { "methods": [ "createTrigger" @@ -80,6 +100,66 @@ "deleteChannelConnection" ] }, + "CreateMessageBus": { + "methods": [ + "createMessageBus" + ] + }, + "UpdateMessageBus": { + "methods": [ + "updateMessageBus" + ] + }, + "DeleteMessageBus": { + "methods": [ + "deleteMessageBus" + ] + }, + "CreateEnrollment": { + "methods": [ + "createEnrollment" + ] + }, + "UpdateEnrollment": { + "methods": [ + "updateEnrollment" + ] + }, + "DeleteEnrollment": { + "methods": [ + "deleteEnrollment" + ] + }, + "CreatePipeline": { + "methods": [ + "createPipeline" + ] + }, + "UpdatePipeline": { + "methods": [ + "updatePipeline" + ] + }, + "DeletePipeline": { + "methods": [ + "deletePipeline" + ] + }, + "CreateGoogleApiSource": { + "methods": [ + "createGoogleApiSource" + ] + }, + "UpdateGoogleApiSource": { + "methods": [ + "updateGoogleApiSource" + ] + }, + "DeleteGoogleApiSource": { + "methods": [ + "deleteGoogleApiSource" + ] + }, "ListTriggers": { "methods": [ "listTriggers", @@ -107,6 +187,41 @@ "listChannelConnectionsStream", "listChannelConnectionsAsync" ] + }, + "ListMessageBuses": { + "methods": [ + "listMessageBuses", + "listMessageBusesStream", + "listMessageBusesAsync" + ] + }, + "ListMessageBusEnrollments": { + "methods": [ + "listMessageBusEnrollments", + "listMessageBusEnrollmentsStream", + "listMessageBusEnrollmentsAsync" + ] + }, + "ListEnrollments": { + "methods": [ + "listEnrollments", + "listEnrollmentsStream", + "listEnrollmentsAsync" + ] + }, + "ListPipelines": { + "methods": [ + "listPipelines", + "listPipelinesStream", + "listPipelinesAsync" + ] + }, + "ListGoogleApiSources": { + "methods": [ + "listGoogleApiSources", + "listGoogleApiSourcesStream", + "listGoogleApiSourcesAsync" + ] } } }, @@ -143,6 +258,26 @@ "updateGoogleChannelConfig" ] }, + "GetMessageBus": { + "methods": [ + "getMessageBus" + ] + }, + "GetEnrollment": { + "methods": [ + "getEnrollment" + ] + }, + "GetPipeline": { + "methods": [ + "getPipeline" + ] + }, + "GetGoogleApiSource": { + "methods": [ + "getGoogleApiSource" + ] + }, "CreateTrigger": { "methods": [ "createTrigger" @@ -183,6 +318,66 @@ "deleteChannelConnection" ] }, + "CreateMessageBus": { + "methods": [ + "createMessageBus" + ] + }, + "UpdateMessageBus": { + "methods": [ + "updateMessageBus" + ] + }, + "DeleteMessageBus": { + "methods": [ + "deleteMessageBus" + ] + }, + "CreateEnrollment": { + "methods": [ + "createEnrollment" + ] + }, + "UpdateEnrollment": { + "methods": [ + "updateEnrollment" + ] + }, + "DeleteEnrollment": { + "methods": [ + "deleteEnrollment" + ] + }, + "CreatePipeline": { + "methods": [ + "createPipeline" + ] + }, + "UpdatePipeline": { + "methods": [ + "updatePipeline" + ] + }, + "DeletePipeline": { + "methods": [ + "deletePipeline" + ] + }, + "CreateGoogleApiSource": { + "methods": [ + "createGoogleApiSource" + ] + }, + "UpdateGoogleApiSource": { + "methods": [ + "updateGoogleApiSource" + ] + }, + "DeleteGoogleApiSource": { + "methods": [ + "deleteGoogleApiSource" + ] + }, "ListTriggers": { "methods": [ "listTriggers", @@ -210,6 +405,41 @@ "listChannelConnectionsStream", "listChannelConnectionsAsync" ] + }, + "ListMessageBuses": { + "methods": [ + "listMessageBuses", + "listMessageBusesStream", + "listMessageBusesAsync" + ] + }, + "ListMessageBusEnrollments": { + "methods": [ + "listMessageBusEnrollments", + "listMessageBusEnrollmentsStream", + "listMessageBusEnrollmentsAsync" + ] + }, + "ListEnrollments": { + "methods": [ + "listEnrollments", + "listEnrollmentsStream", + "listEnrollmentsAsync" + ] + }, + "ListPipelines": { + "methods": [ + "listPipelines", + "listPipelinesStream", + "listPipelinesAsync" + ] + }, + "ListGoogleApiSources": { + "methods": [ + "listGoogleApiSources", + "listGoogleApiSourcesStream", + "listGoogleApiSourcesAsync" + ] } } } diff --git a/packages/google-cloud-eventarc/test/gapic_eventarc_v1.ts b/packages/google-cloud-eventarc/test/gapic_eventarc_v1.ts index 27ef9a9f225..fd2e40de181 100644 --- a/packages/google-cloud-eventarc/test/gapic_eventarc_v1.ts +++ b/packages/google-cloud-eventarc/test/gapic_eventarc_v1.ts @@ -1140,69 +1140,64 @@ describe('v1.EventarcClient', () => { }); }); - describe('createTrigger', () => { - it('invokes createTrigger without error', async () => { + describe('getMessageBus', () => { + it('invokes getMessageBus without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateTriggerRequest() + new protos.google.cloud.eventarc.v1.GetMessageBusRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateTriggerRequest', - ['parent'] + '.google.cloud.eventarc.v1.GetMessageBusRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.eventarc.v1.MessageBus() ); - client.innerApiCalls.createTrigger = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createTrigger(request); - const [response] = await operation.promise(); + client.innerApiCalls.getMessageBus = stubSimpleCall(expectedResponse); + const [response] = await client.getMessageBus(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createTrigger as SinonStub + client.innerApiCalls.getMessageBus as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createTrigger as SinonStub + client.innerApiCalls.getMessageBus as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createTrigger without error using callback', async () => { + it('invokes getMessageBus without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateTriggerRequest() + new protos.google.cloud.eventarc.v1.GetMessageBusRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateTriggerRequest', - ['parent'] + '.google.cloud.eventarc.v1.GetMessageBusRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.eventarc.v1.MessageBus() ); - client.innerApiCalls.createTrigger = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getMessageBus = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createTrigger( + client.getMessageBus( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - > | null + result?: protos.google.cloud.eventarc.v1.IMessageBus | null ) => { if (err) { reject(err); @@ -1212,193 +1207,257 @@ describe('v1.EventarcClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createTrigger as SinonStub + client.innerApiCalls.getMessageBus as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createTrigger as SinonStub + client.innerApiCalls.getMessageBus as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createTrigger with call error', async () => { + it('invokes getMessageBus with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateTriggerRequest() + new protos.google.cloud.eventarc.v1.GetMessageBusRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateTriggerRequest', - ['parent'] + '.google.cloud.eventarc.v1.GetMessageBusRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createTrigger = stubLongRunningCall( + client.innerApiCalls.getMessageBus = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.createTrigger(request), expectedError); + await assert.rejects(client.getMessageBus(request), expectedError); const actualRequest = ( - client.innerApiCalls.createTrigger as SinonStub + client.innerApiCalls.getMessageBus as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createTrigger as SinonStub + client.innerApiCalls.getMessageBus as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createTrigger with LRO error', async () => { + it('invokes getMessageBus with closed client', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateTriggerRequest() + new protos.google.cloud.eventarc.v1.GetMessageBusRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateTriggerRequest', - ['parent'] + '.google.cloud.eventarc.v1.GetMessageBusRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createTrigger = stubLongRunningCall( - undefined, - undefined, - expectedError + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getMessageBus(request), expectedError); + }); + }); + + describe('getEnrollment', () => { + it('invokes getEnrollment without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.GetEnrollmentRequest() ); - const [operation] = await client.createTrigger(request); - await assert.rejects(operation.promise(), expectedError); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.GetEnrollmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.eventarc.v1.Enrollment() + ); + client.innerApiCalls.getEnrollment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnrollment(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createTrigger as SinonStub + client.innerApiCalls.getEnrollment as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createTrigger as SinonStub + client.innerApiCalls.getEnrollment as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateTriggerProgress without error', async () => { + it('invokes getEnrollment without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.GetEnrollmentRequest() ); - 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.checkCreateTriggerProgress( - expectedResponse.name + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.GetEnrollmentRequest', + ['name'] ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.eventarc.v1.Enrollment() + ); + client.innerApiCalls.getEnrollment = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnrollment( + request, + ( + err?: Error | null, + result?: protos.google.cloud.eventarc.v1.IEnrollment | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateTriggerProgress with error', async () => { + it('invokes getEnrollment with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.GetEnrollmentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.GetEnrollmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( + client.innerApiCalls.getEnrollment = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.checkCreateTriggerProgress(''), - expectedError + await assert.rejects(client.getEnrollment(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEnrollment with closed client', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.GetEnrollmentRequest() ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.GetEnrollmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEnrollment(request), expectedError); }); }); - describe('updateTrigger', () => { - it('invokes updateTrigger without error', async () => { + describe('getPipeline', () => { + it('invokes getPipeline without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() + new protos.google.cloud.eventarc.v1.GetPipelineRequest() ); - request.trigger ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.UpdateTriggerRequest', - ['trigger', 'name'] + '.google.cloud.eventarc.v1.GetPipelineRequest', + ['name'] ); - request.trigger.name = defaultValue1; - const expectedHeaderRequestParams = `trigger.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.eventarc.v1.Pipeline() ); - client.innerApiCalls.updateTrigger = - stubLongRunningCall(expectedResponse); - const [operation] = await client.updateTrigger(request); - const [response] = await operation.promise(); + client.innerApiCalls.getPipeline = stubSimpleCall(expectedResponse); + const [response] = await client.getPipeline(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateTrigger as SinonStub + client.innerApiCalls.getPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateTrigger as SinonStub + client.innerApiCalls.getPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateTrigger without error using callback', async () => { + it('invokes getPipeline without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() + new protos.google.cloud.eventarc.v1.GetPipelineRequest() ); - request.trigger ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.UpdateTriggerRequest', - ['trigger', 'name'] + '.google.cloud.eventarc.v1.GetPipelineRequest', + ['name'] ); - request.trigger.name = defaultValue1; - const expectedHeaderRequestParams = `trigger.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.eventarc.v1.Pipeline() ); - client.innerApiCalls.updateTrigger = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getPipeline = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateTrigger( + client.getPipeline( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - > | null + result?: protos.google.cloud.eventarc.v1.IPipeline | null ) => { if (err) { reject(err); @@ -1408,193 +1467,128 @@ describe('v1.EventarcClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateTrigger as SinonStub + client.innerApiCalls.getPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateTrigger as SinonStub + client.innerApiCalls.getPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateTrigger with call error', async () => { + it('invokes getPipeline with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() + new protos.google.cloud.eventarc.v1.GetPipelineRequest() ); - request.trigger ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.UpdateTriggerRequest', - ['trigger', 'name'] + '.google.cloud.eventarc.v1.GetPipelineRequest', + ['name'] ); - request.trigger.name = defaultValue1; - const expectedHeaderRequestParams = `trigger.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateTrigger = stubLongRunningCall( + client.innerApiCalls.getPipeline = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.updateTrigger(request), expectedError); + await assert.rejects(client.getPipeline(request), expectedError); const actualRequest = ( - client.innerApiCalls.updateTrigger as SinonStub + client.innerApiCalls.getPipeline as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateTrigger as SinonStub + client.innerApiCalls.getPipeline as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateTrigger with LRO error', async () => { + it('invokes getPipeline with closed client', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() + new protos.google.cloud.eventarc.v1.GetPipelineRequest() ); - request.trigger ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.UpdateTriggerRequest', - ['trigger', 'name'] - ); - request.trigger.name = defaultValue1; - const expectedHeaderRequestParams = `trigger.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateTrigger = stubLongRunningCall( - undefined, - undefined, - expectedError + '.google.cloud.eventarc.v1.GetPipelineRequest', + ['name'] ); - const [operation] = await client.updateTrigger(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.updateTrigger as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateTrigger as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPipeline(request), expectedError); }); + }); - it('invokes checkUpdateTriggerProgress without error', async () => { - const client = new eventarcModule.v1.EventarcClient({ - 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.checkUpdateTriggerProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateTriggerProgress with error', async () => { - const client = new eventarcModule.v1.EventarcClient({ - 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.checkUpdateTriggerProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('deleteTrigger', () => { - it('invokes deleteTrigger without error', async () => { + describe('getGoogleApiSource', () => { + it('invokes getGoogleApiSource without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() + new protos.google.cloud.eventarc.v1.GetGoogleApiSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteTriggerRequest', + '.google.cloud.eventarc.v1.GetGoogleApiSourceRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ); - client.innerApiCalls.deleteTrigger = - stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteTrigger(request); - const [response] = await operation.promise(); + client.innerApiCalls.getGoogleApiSource = + stubSimpleCall(expectedResponse); + const [response] = await client.getGoogleApiSource(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteTrigger as SinonStub + client.innerApiCalls.getGoogleApiSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTrigger as SinonStub + client.innerApiCalls.getGoogleApiSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteTrigger without error using callback', async () => { + it('invokes getGoogleApiSource without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() + new protos.google.cloud.eventarc.v1.GetGoogleApiSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteTriggerRequest', + '.google.cloud.eventarc.v1.GetGoogleApiSourceRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ); - client.innerApiCalls.deleteTrigger = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getGoogleApiSource = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteTrigger( + client.getGoogleApiSource( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - > | null + result?: protos.google.cloud.eventarc.v1.IGoogleApiSource | null ) => { if (err) { reject(err); @@ -1604,140 +1598,81 @@ describe('v1.EventarcClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.eventarc.v1.ITrigger, - protos.google.cloud.eventarc.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteTrigger as SinonStub + client.innerApiCalls.getGoogleApiSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTrigger as SinonStub + client.innerApiCalls.getGoogleApiSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteTrigger with call error', async () => { + it('invokes getGoogleApiSource with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() + new protos.google.cloud.eventarc.v1.GetGoogleApiSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteTriggerRequest', + '.google.cloud.eventarc.v1.GetGoogleApiSourceRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteTrigger = stubLongRunningCall( + client.innerApiCalls.getGoogleApiSource = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.deleteTrigger(request), expectedError); + await assert.rejects(client.getGoogleApiSource(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteTrigger as SinonStub + client.innerApiCalls.getGoogleApiSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTrigger as SinonStub + client.innerApiCalls.getGoogleApiSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteTrigger with LRO error', async () => { + it('invokes getGoogleApiSource with closed client', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() + new protos.google.cloud.eventarc.v1.GetGoogleApiSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteTriggerRequest', + '.google.cloud.eventarc.v1.GetGoogleApiSourceRequest', ['name'] ); request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteTrigger = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.deleteTrigger(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteTrigger as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteTrigger as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteTriggerProgress without error', async () => { - const client = new eventarcModule.v1.EventarcClient({ - 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.checkDeleteTriggerProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteTriggerProgress with error', async () => { - const client = new eventarcModule.v1.EventarcClient({ - 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.checkDeleteTriggerProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getGoogleApiSource(request), expectedError); }); }); - describe('createChannel', () => { - it('invokes createChannel without error', async () => { + describe('createTrigger', () => { + it('invokes createTrigger without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateChannelRequest() + new protos.google.cloud.eventarc.v1.CreateTriggerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateChannelRequest', + '.google.cloud.eventarc.v1.CreateTriggerRequest', ['parent'] ); request.parent = defaultValue1; @@ -1745,32 +1680,32 @@ describe('v1.EventarcClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createChannel = + client.innerApiCalls.createTrigger = stubLongRunningCall(expectedResponse); - const [operation] = await client.createChannel(request); + const [operation] = await client.createTrigger(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createChannel as SinonStub + client.innerApiCalls.createTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createChannel as SinonStub + client.innerApiCalls.createTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createChannel without error using callback', async () => { + it('invokes createTrigger without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateChannelRequest() + new protos.google.cloud.eventarc.v1.CreateTriggerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateChannelRequest', + '.google.cloud.eventarc.v1.CreateTriggerRequest', ['parent'] ); request.parent = defaultValue1; @@ -1778,15 +1713,15 @@ describe('v1.EventarcClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createChannel = + client.innerApiCalls.createTrigger = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createChannel( + client.createTrigger( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata > | null ) => { @@ -1799,86 +1734,86 @@ describe('v1.EventarcClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createChannel as SinonStub + client.innerApiCalls.createTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createChannel as SinonStub + client.innerApiCalls.createTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createChannel with call error', async () => { + it('invokes createTrigger with call error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateChannelRequest() + new protos.google.cloud.eventarc.v1.CreateTriggerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateChannelRequest', + '.google.cloud.eventarc.v1.CreateTriggerRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createChannel = stubLongRunningCall( + client.innerApiCalls.createTrigger = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.createChannel(request), expectedError); + await assert.rejects(client.createTrigger(request), expectedError); const actualRequest = ( - client.innerApiCalls.createChannel as SinonStub + client.innerApiCalls.createTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createChannel as SinonStub + client.innerApiCalls.createTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createChannel with LRO error', async () => { + it('invokes createTrigger with LRO error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateChannelRequest() + new protos.google.cloud.eventarc.v1.CreateTriggerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateChannelRequest', + '.google.cloud.eventarc.v1.CreateTriggerRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createChannel = stubLongRunningCall( + client.innerApiCalls.createTrigger = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.createChannel(request); + const [operation] = await client.createTrigger(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.createChannel as SinonStub + client.innerApiCalls.createTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createChannel as SinonStub + client.innerApiCalls.createTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateChannelProgress without error', async () => { + it('invokes checkCreateTriggerProgress without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -1892,7 +1827,7 @@ describe('v1.EventarcClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateChannelProgress( + const decodedOperation = await client.checkCreateTriggerProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -1900,7 +1835,7 @@ describe('v1.EventarcClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkCreateChannelProgress with error', async () => { + it('invokes checkCreateTriggerProgress with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -1913,76 +1848,76 @@ describe('v1.EventarcClient', () => { expectedError ); await assert.rejects( - client.checkCreateChannelProgress(''), + client.checkCreateTriggerProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('updateChannel', () => { - it('invokes updateChannel without error', async () => { + describe('updateTrigger', () => { + it('invokes updateTrigger without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.UpdateChannelRequest() + new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() ); - request.channel ??= {}; + request.trigger ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.UpdateChannelRequest', - ['channel', 'name'] + '.google.cloud.eventarc.v1.UpdateTriggerRequest', + ['trigger', 'name'] ); - request.channel.name = defaultValue1; - const expectedHeaderRequestParams = `channel.name=${defaultValue1}`; + request.trigger.name = defaultValue1; + const expectedHeaderRequestParams = `trigger.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateChannel = + client.innerApiCalls.updateTrigger = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateChannel(request); + const [operation] = await client.updateTrigger(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateChannel as SinonStub + client.innerApiCalls.updateTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateChannel as SinonStub + client.innerApiCalls.updateTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateChannel without error using callback', async () => { + it('invokes updateTrigger without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.UpdateChannelRequest() + new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() ); - request.channel ??= {}; + request.trigger ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.UpdateChannelRequest', - ['channel', 'name'] + '.google.cloud.eventarc.v1.UpdateTriggerRequest', + ['trigger', 'name'] ); - request.channel.name = defaultValue1; - const expectedHeaderRequestParams = `channel.name=${defaultValue1}`; + request.trigger.name = defaultValue1; + const expectedHeaderRequestParams = `trigger.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateChannel = + client.innerApiCalls.updateTrigger = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateChannel( + client.updateTrigger( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata > | null ) => { @@ -1995,88 +1930,88 @@ describe('v1.EventarcClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateChannel as SinonStub + client.innerApiCalls.updateTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateChannel as SinonStub + client.innerApiCalls.updateTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateChannel with call error', async () => { + it('invokes updateTrigger with call error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.UpdateChannelRequest() + new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() ); - request.channel ??= {}; + request.trigger ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.UpdateChannelRequest', - ['channel', 'name'] + '.google.cloud.eventarc.v1.UpdateTriggerRequest', + ['trigger', 'name'] ); - request.channel.name = defaultValue1; - const expectedHeaderRequestParams = `channel.name=${defaultValue1}`; + request.trigger.name = defaultValue1; + const expectedHeaderRequestParams = `trigger.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateChannel = stubLongRunningCall( + client.innerApiCalls.updateTrigger = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.updateChannel(request), expectedError); + await assert.rejects(client.updateTrigger(request), expectedError); const actualRequest = ( - client.innerApiCalls.updateChannel as SinonStub + client.innerApiCalls.updateTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateChannel as SinonStub + client.innerApiCalls.updateTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateChannel with LRO error', async () => { + it('invokes updateTrigger with LRO error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.UpdateChannelRequest() + new protos.google.cloud.eventarc.v1.UpdateTriggerRequest() ); - request.channel ??= {}; + request.trigger ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.UpdateChannelRequest', - ['channel', 'name'] + '.google.cloud.eventarc.v1.UpdateTriggerRequest', + ['trigger', 'name'] ); - request.channel.name = defaultValue1; - const expectedHeaderRequestParams = `channel.name=${defaultValue1}`; + request.trigger.name = defaultValue1; + const expectedHeaderRequestParams = `trigger.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateChannel = stubLongRunningCall( + client.innerApiCalls.updateTrigger = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.updateChannel(request); + const [operation] = await client.updateTrigger(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.updateChannel as SinonStub + client.innerApiCalls.updateTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateChannel as SinonStub + client.innerApiCalls.updateTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkUpdateChannelProgress without error', async () => { + it('invokes checkUpdateTriggerProgress without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2090,7 +2025,7 @@ describe('v1.EventarcClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateChannelProgress( + const decodedOperation = await client.checkUpdateTriggerProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2098,7 +2033,7 @@ describe('v1.EventarcClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkUpdateChannelProgress with error', async () => { + it('invokes checkUpdateTriggerProgress with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2111,25 +2046,25 @@ describe('v1.EventarcClient', () => { expectedError ); await assert.rejects( - client.checkUpdateChannelProgress(''), + client.checkUpdateTriggerProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('deleteChannel', () => { - it('invokes deleteChannel without error', async () => { + describe('deleteTrigger', () => { + it('invokes deleteTrigger without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteChannelRequest() + new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteChannelRequest', + '.google.cloud.eventarc.v1.DeleteTriggerRequest', ['name'] ); request.name = defaultValue1; @@ -2137,32 +2072,32 @@ describe('v1.EventarcClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteChannel = + client.innerApiCalls.deleteTrigger = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteChannel(request); + const [operation] = await client.deleteTrigger(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteChannel as SinonStub + client.innerApiCalls.deleteTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteChannel as SinonStub + client.innerApiCalls.deleteTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteChannel without error using callback', async () => { + it('invokes deleteTrigger without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteChannelRequest() + new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteChannelRequest', + '.google.cloud.eventarc.v1.DeleteTriggerRequest', ['name'] ); request.name = defaultValue1; @@ -2170,15 +2105,15 @@ describe('v1.EventarcClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteChannel = + client.innerApiCalls.deleteTrigger = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteChannel( + client.deleteTrigger( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata > | null ) => { @@ -2191,86 +2126,86 @@ describe('v1.EventarcClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.ITrigger, protos.google.cloud.eventarc.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteChannel as SinonStub + client.innerApiCalls.deleteTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteChannel as SinonStub + client.innerApiCalls.deleteTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteChannel with call error', async () => { + it('invokes deleteTrigger with call error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteChannelRequest() + new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteChannelRequest', + '.google.cloud.eventarc.v1.DeleteTriggerRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteChannel = stubLongRunningCall( + client.innerApiCalls.deleteTrigger = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.deleteChannel(request), expectedError); + await assert.rejects(client.deleteTrigger(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteChannel as SinonStub + client.innerApiCalls.deleteTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteChannel as SinonStub + client.innerApiCalls.deleteTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteChannel with LRO error', async () => { + it('invokes deleteTrigger with LRO error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteChannelRequest() + new protos.google.cloud.eventarc.v1.DeleteTriggerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteChannelRequest', + '.google.cloud.eventarc.v1.DeleteTriggerRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteChannel = stubLongRunningCall( + client.innerApiCalls.deleteTrigger = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.deleteChannel(request); + const [operation] = await client.deleteTrigger(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.deleteChannel as SinonStub + client.innerApiCalls.deleteTrigger as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteChannel as SinonStub + client.innerApiCalls.deleteTrigger as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteChannelProgress without error', async () => { + it('invokes checkDeleteTriggerProgress without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2284,7 +2219,7 @@ describe('v1.EventarcClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteChannelProgress( + const decodedOperation = await client.checkDeleteTriggerProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2292,7 +2227,7 @@ describe('v1.EventarcClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeleteChannelProgress with error', async () => { + it('invokes checkDeleteTriggerProgress with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2305,25 +2240,25 @@ describe('v1.EventarcClient', () => { expectedError ); await assert.rejects( - client.checkDeleteChannelProgress(''), + client.checkDeleteTriggerProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('createChannelConnection', () => { - it('invokes createChannelConnection without error', async () => { + describe('createChannel', () => { + it('invokes createChannel without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() + new protos.google.cloud.eventarc.v1.CreateChannelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateChannelConnectionRequest', + '.google.cloud.eventarc.v1.CreateChannelRequest', ['parent'] ); request.parent = defaultValue1; @@ -2331,32 +2266,32 @@ describe('v1.EventarcClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createChannelConnection = + client.innerApiCalls.createChannel = stubLongRunningCall(expectedResponse); - const [operation] = await client.createChannelConnection(request); + const [operation] = await client.createChannel(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createChannelConnection as SinonStub + client.innerApiCalls.createChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createChannelConnection as SinonStub + client.innerApiCalls.createChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createChannelConnection without error using callback', async () => { + it('invokes createChannel without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() + new protos.google.cloud.eventarc.v1.CreateChannelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateChannelConnectionRequest', + '.google.cloud.eventarc.v1.CreateChannelRequest', ['parent'] ); request.parent = defaultValue1; @@ -2364,15 +2299,15 @@ describe('v1.EventarcClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createChannelConnection = + client.innerApiCalls.createChannel = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createChannelConnection( + client.createChannel( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata > | null ) => { @@ -2385,89 +2320,86 @@ describe('v1.EventarcClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createChannelConnection as SinonStub + client.innerApiCalls.createChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createChannelConnection as SinonStub + client.innerApiCalls.createChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createChannelConnection with call error', async () => { + it('invokes createChannel with call error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() + new protos.google.cloud.eventarc.v1.CreateChannelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateChannelConnectionRequest', + '.google.cloud.eventarc.v1.CreateChannelRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createChannelConnection = stubLongRunningCall( + client.innerApiCalls.createChannel = stubLongRunningCall( undefined, expectedError ); - await assert.rejects( - client.createChannelConnection(request), - expectedError - ); + await assert.rejects(client.createChannel(request), expectedError); const actualRequest = ( - client.innerApiCalls.createChannelConnection as SinonStub + client.innerApiCalls.createChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createChannelConnection as SinonStub + client.innerApiCalls.createChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createChannelConnection with LRO error', async () => { + it('invokes createChannel with LRO error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() + new protos.google.cloud.eventarc.v1.CreateChannelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.CreateChannelConnectionRequest', + '.google.cloud.eventarc.v1.CreateChannelRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createChannelConnection = stubLongRunningCall( + client.innerApiCalls.createChannel = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.createChannelConnection(request); + const [operation] = await client.createChannel(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.createChannelConnection as SinonStub + client.innerApiCalls.createChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createChannelConnection as SinonStub + client.innerApiCalls.createChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateChannelConnectionProgress without error', async () => { + it('invokes checkCreateChannelProgress without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2481,16 +2413,15 @@ describe('v1.EventarcClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = - await client.checkCreateChannelConnectionProgress( - expectedResponse.name - ); + const decodedOperation = await client.checkCreateChannelProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkCreateChannelConnectionProgress with error', async () => { + it('invokes checkCreateChannelProgress with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2503,74 +2434,76 @@ describe('v1.EventarcClient', () => { expectedError ); await assert.rejects( - client.checkCreateChannelConnectionProgress(''), + client.checkCreateChannelProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('deleteChannelConnection', () => { - it('invokes deleteChannelConnection without error', async () => { + describe('updateChannel', () => { + it('invokes updateChannel without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() + new protos.google.cloud.eventarc.v1.UpdateChannelRequest() ); + request.channel ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteChannelConnectionRequest', - ['name'] + '.google.cloud.eventarc.v1.UpdateChannelRequest', + ['channel', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.channel.name = defaultValue1; + const expectedHeaderRequestParams = `channel.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteChannelConnection = + client.innerApiCalls.updateChannel = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteChannelConnection(request); + const [operation] = await client.updateChannel(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteChannelConnection as SinonStub + client.innerApiCalls.updateChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteChannelConnection as SinonStub + client.innerApiCalls.updateChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteChannelConnection without error using callback', async () => { + it('invokes updateChannel without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() + new protos.google.cloud.eventarc.v1.UpdateChannelRequest() ); + request.channel ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteChannelConnectionRequest', - ['name'] + '.google.cloud.eventarc.v1.UpdateChannelRequest', + ['channel', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.channel.name = defaultValue1; + const expectedHeaderRequestParams = `channel.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteChannelConnection = + client.innerApiCalls.updateChannel = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteChannelConnection( + client.updateChannel( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata > | null ) => { @@ -2583,89 +2516,88 @@ describe('v1.EventarcClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IChannel, protos.google.cloud.eventarc.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteChannelConnection as SinonStub + client.innerApiCalls.updateChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteChannelConnection as SinonStub + client.innerApiCalls.updateChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteChannelConnection with call error', async () => { + it('invokes updateChannel with call error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() + new protos.google.cloud.eventarc.v1.UpdateChannelRequest() ); + request.channel ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteChannelConnectionRequest', - ['name'] + '.google.cloud.eventarc.v1.UpdateChannelRequest', + ['channel', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.channel.name = defaultValue1; + const expectedHeaderRequestParams = `channel.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteChannelConnection = stubLongRunningCall( + client.innerApiCalls.updateChannel = stubLongRunningCall( undefined, expectedError ); - await assert.rejects( - client.deleteChannelConnection(request), - expectedError - ); + await assert.rejects(client.updateChannel(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteChannelConnection as SinonStub + client.innerApiCalls.updateChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteChannelConnection as SinonStub + client.innerApiCalls.updateChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteChannelConnection with LRO error', async () => { + it('invokes updateChannel with LRO error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() + new protos.google.cloud.eventarc.v1.UpdateChannelRequest() ); + request.channel ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.DeleteChannelConnectionRequest', - ['name'] + '.google.cloud.eventarc.v1.UpdateChannelRequest', + ['channel', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.channel.name = defaultValue1; + const expectedHeaderRequestParams = `channel.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteChannelConnection = stubLongRunningCall( + client.innerApiCalls.updateChannel = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.deleteChannelConnection(request); + const [operation] = await client.updateChannel(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.deleteChannelConnection as SinonStub + client.innerApiCalls.updateChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteChannelConnection as SinonStub + client.innerApiCalls.updateChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteChannelConnectionProgress without error', async () => { + it('invokes checkUpdateChannelProgress without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2679,16 +2611,15 @@ describe('v1.EventarcClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = - await client.checkDeleteChannelConnectionProgress( - expectedResponse.name - ); + const decodedOperation = await client.checkUpdateChannelProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeleteChannelConnectionProgress with error', async () => { + it('invokes checkUpdateChannelProgress with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2701,75 +2632,76 @@ describe('v1.EventarcClient', () => { expectedError ); await assert.rejects( - client.checkDeleteChannelConnectionProgress(''), + client.checkUpdateChannelProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('listTriggers', () => { - it('invokes listTriggers without error', async () => { + describe('deleteChannel', () => { + it('invokes deleteChannel without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListTriggersRequest() + new protos.google.cloud.eventarc.v1.DeleteChannelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListTriggersRequest', - ['parent'] + '.google.cloud.eventarc.v1.DeleteChannelRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - ]; - client.innerApiCalls.listTriggers = stubSimpleCall(expectedResponse); - const [response] = await client.listTriggers(request); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteChannel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteChannel(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listTriggers as SinonStub + client.innerApiCalls.deleteChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listTriggers as SinonStub + client.innerApiCalls.deleteChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listTriggers without error using callback', async () => { + it('invokes deleteChannel without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListTriggersRequest() + new protos.google.cloud.eventarc.v1.DeleteChannelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListTriggersRequest', - ['parent'] + '.google.cloud.eventarc.v1.DeleteChannelRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - ]; - client.innerApiCalls.listTriggers = - stubSimpleCallWithCallback(expectedResponse); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteChannel = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listTriggers( + client.deleteChannel( request, ( err?: Error | null, - result?: protos.google.cloud.eventarc.v1.ITrigger[] | null + result?: LROperation< + protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null ) => { if (err) { reject(err); @@ -2779,132 +2711,4622 @@ describe('v1.EventarcClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IChannel, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listTriggers as SinonStub + client.innerApiCalls.deleteChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listTriggers as SinonStub + client.innerApiCalls.deleteChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listTriggers with error', async () => { + it('invokes deleteChannel with call error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListTriggersRequest() + new protos.google.cloud.eventarc.v1.DeleteChannelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListTriggersRequest', - ['parent'] + '.google.cloud.eventarc.v1.DeleteChannelRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listTriggers = stubSimpleCall( + client.innerApiCalls.deleteChannel = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.listTriggers(request), expectedError); + await assert.rejects(client.deleteChannel(request), expectedError); const actualRequest = ( - client.innerApiCalls.listTriggers as SinonStub + client.innerApiCalls.deleteChannel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listTriggers as SinonStub + client.innerApiCalls.deleteChannel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listTriggersStream without error', async () => { + it('invokes deleteChannel with LRO error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListTriggersRequest() + new protos.google.cloud.eventarc.v1.DeleteChannelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListTriggersRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - ]; - client.descriptors.page.listTriggers.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listTriggersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.eventarc.v1.Trigger[] = []; - stream.on( - 'data', - (response: protos.google.cloud.eventarc.v1.Trigger) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - (client.descriptors.page.listTriggers.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listTriggers, request) + '.google.cloud.eventarc.v1.DeleteChannelRequest', + ['name'] ); - assert( - (client.descriptors.page.listTriggers.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteChannel = stubLongRunningCall( + undefined, + undefined, + expectedError ); + const [operation] = await client.deleteChannel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteChannel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteChannel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listTriggersStream with error', async () => { + it('invokes checkDeleteChannelProgress without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListTriggersRequest() + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListTriggersRequest', - ['parent'] + 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.checkDeleteChannelProgress( + expectedResponse.name ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteChannelProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); const expectedError = new Error('expected'); - client.descriptors.page.listTriggers.createStream = stubPageStreamingCall( + + client.operationsClient.getOperation = stubSimpleCall( undefined, expectedError ); - const stream = client.listTriggersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.eventarc.v1.Trigger[] = []; - stream.on( - 'data', - (response: protos.google.cloud.eventarc.v1.Trigger) => { - responses.push(response); - } - ); + await assert.rejects( + client.checkDeleteChannelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createChannelConnection', () => { + it('invokes createChannelConnection without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateChannelConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createChannelConnection = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createChannelConnection(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createChannelConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChannelConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createChannelConnection without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateChannelConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createChannelConnection = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createChannelConnection( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createChannelConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChannelConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createChannelConnection with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateChannelConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createChannelConnection = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createChannelConnection(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createChannelConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChannelConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createChannelConnection with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateChannelConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateChannelConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createChannelConnection = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createChannelConnection(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createChannelConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChannelConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateChannelConnectionProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkCreateChannelConnectionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateChannelConnectionProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkCreateChannelConnectionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteChannelConnection', () => { + it('invokes deleteChannelConnection without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteChannelConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteChannelConnection = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteChannelConnection(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteChannelConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteChannelConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteChannelConnection without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteChannelConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteChannelConnection = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteChannelConnection( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IChannelConnection, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteChannelConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteChannelConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteChannelConnection with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteChannelConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteChannelConnection = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteChannelConnection(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteChannelConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteChannelConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteChannelConnection with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteChannelConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteChannelConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteChannelConnection = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteChannelConnection(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteChannelConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteChannelConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteChannelConnectionProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkDeleteChannelConnectionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteChannelConnectionProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkDeleteChannelConnectionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createMessageBus', () => { + it('invokes createMessageBus without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateMessageBusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateMessageBusRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMessageBus = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createMessageBus(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMessageBus without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateMessageBusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateMessageBusRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMessageBus = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createMessageBus( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMessageBus with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateMessageBusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateMessageBusRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMessageBus = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createMessageBus(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMessageBus with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateMessageBusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateMessageBusRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMessageBus = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createMessageBus(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateMessageBusProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkCreateMessageBusProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateMessageBusProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkCreateMessageBusProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateMessageBus', () => { + it('invokes updateMessageBus without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateMessageBusRequest() + ); + request.messageBus ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateMessageBusRequest', + ['messageBus', 'name'] + ); + request.messageBus.name = defaultValue1; + const expectedHeaderRequestParams = `message_bus.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateMessageBus = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateMessageBus(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMessageBus without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateMessageBusRequest() + ); + request.messageBus ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateMessageBusRequest', + ['messageBus', 'name'] + ); + request.messageBus.name = defaultValue1; + const expectedHeaderRequestParams = `message_bus.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateMessageBus = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateMessageBus( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMessageBus with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateMessageBusRequest() + ); + request.messageBus ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateMessageBusRequest', + ['messageBus', 'name'] + ); + request.messageBus.name = defaultValue1; + const expectedHeaderRequestParams = `message_bus.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMessageBus = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateMessageBus(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMessageBus with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateMessageBusRequest() + ); + request.messageBus ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateMessageBusRequest', + ['messageBus', 'name'] + ); + request.messageBus.name = defaultValue1; + const expectedHeaderRequestParams = `message_bus.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMessageBus = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateMessageBus(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateMessageBusProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkUpdateMessageBusProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateMessageBusProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkUpdateMessageBusProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteMessageBus', () => { + it('invokes deleteMessageBus without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteMessageBusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteMessageBusRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteMessageBus = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteMessageBus(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMessageBus without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteMessageBusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteMessageBusRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteMessageBus = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteMessageBus( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IMessageBus, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMessageBus with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteMessageBusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteMessageBusRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMessageBus = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteMessageBus(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMessageBus with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteMessageBusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteMessageBusRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMessageBus = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteMessageBus(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteMessageBus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMessageBus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteMessageBusProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkDeleteMessageBusProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteMessageBusProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkDeleteMessageBusProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createEnrollment', () => { + it('invokes createEnrollment without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateEnrollmentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateEnrollmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnrollment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createEnrollment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnrollment without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateEnrollmentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateEnrollmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnrollment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEnrollment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnrollment with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateEnrollmentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateEnrollmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnrollment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createEnrollment(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnrollment with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateEnrollmentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateEnrollmentRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnrollment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createEnrollment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateEnrollmentProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkCreateEnrollmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateEnrollmentProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkCreateEnrollmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateEnrollment', () => { + it('invokes updateEnrollment without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateEnrollmentRequest() + ); + request.enrollment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateEnrollmentRequest', + ['enrollment', 'name'] + ); + request.enrollment.name = defaultValue1; + const expectedHeaderRequestParams = `enrollment.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnrollment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateEnrollment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnrollment without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateEnrollmentRequest() + ); + request.enrollment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateEnrollmentRequest', + ['enrollment', 'name'] + ); + request.enrollment.name = defaultValue1; + const expectedHeaderRequestParams = `enrollment.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnrollment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEnrollment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnrollment with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateEnrollmentRequest() + ); + request.enrollment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateEnrollmentRequest', + ['enrollment', 'name'] + ); + request.enrollment.name = defaultValue1; + const expectedHeaderRequestParams = `enrollment.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnrollment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateEnrollment(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnrollment with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateEnrollmentRequest() + ); + request.enrollment ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateEnrollmentRequest', + ['enrollment', 'name'] + ); + request.enrollment.name = defaultValue1; + const expectedHeaderRequestParams = `enrollment.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnrollment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateEnrollment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateEnrollmentProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkUpdateEnrollmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateEnrollmentProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkUpdateEnrollmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteEnrollment', () => { + it('invokes deleteEnrollment without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteEnrollmentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteEnrollmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnrollment = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteEnrollment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnrollment without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteEnrollmentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteEnrollmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnrollment = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEnrollment( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IEnrollment, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnrollment with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteEnrollmentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteEnrollmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnrollment = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteEnrollment(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnrollment with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteEnrollmentRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteEnrollmentRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnrollment = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteEnrollment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteEnrollment as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEnrollment as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteEnrollmentProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkDeleteEnrollmentProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteEnrollmentProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkDeleteEnrollmentProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createPipeline', () => { + it('invokes createPipeline without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreatePipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreatePipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createPipeline = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createPipeline(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPipeline without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreatePipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreatePipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createPipeline = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createPipeline( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPipeline with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreatePipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreatePipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPipeline = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createPipeline(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPipeline with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreatePipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreatePipelineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPipeline = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createPipeline(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createPipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreatePipelineProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkCreatePipelineProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreatePipelineProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkCreatePipelineProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updatePipeline', () => { + it('invokes updatePipeline without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdatePipelineRequest() + ); + request.pipeline ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdatePipelineRequest', + ['pipeline', 'name'] + ); + request.pipeline.name = defaultValue1; + const expectedHeaderRequestParams = `pipeline.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updatePipeline = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updatePipeline(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updatePipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePipeline without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdatePipelineRequest() + ); + request.pipeline ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdatePipelineRequest', + ['pipeline', 'name'] + ); + request.pipeline.name = defaultValue1; + const expectedHeaderRequestParams = `pipeline.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updatePipeline = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updatePipeline( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updatePipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePipeline with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdatePipelineRequest() + ); + request.pipeline ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdatePipelineRequest', + ['pipeline', 'name'] + ); + request.pipeline.name = defaultValue1; + const expectedHeaderRequestParams = `pipeline.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updatePipeline = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updatePipeline(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updatePipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePipeline with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdatePipelineRequest() + ); + request.pipeline ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdatePipelineRequest', + ['pipeline', 'name'] + ); + request.pipeline.name = defaultValue1; + const expectedHeaderRequestParams = `pipeline.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updatePipeline = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updatePipeline(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updatePipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdatePipelineProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkUpdatePipelineProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdatePipelineProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkUpdatePipelineProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deletePipeline', () => { + it('invokes deletePipeline without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeletePipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeletePipelineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePipeline = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deletePipeline(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deletePipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePipeline without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeletePipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeletePipelineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePipeline = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePipeline( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IPipeline, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deletePipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePipeline with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeletePipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeletePipelineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePipeline = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deletePipeline(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deletePipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePipeline with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeletePipelineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeletePipelineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePipeline = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deletePipeline(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deletePipeline as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePipeline as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeletePipelineProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkDeletePipelineProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeletePipelineProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkDeletePipelineProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createGoogleApiSource', () => { + it('invokes createGoogleApiSource without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createGoogleApiSource = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createGoogleApiSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGoogleApiSource without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createGoogleApiSource = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createGoogleApiSource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGoogleApiSource with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createGoogleApiSource = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createGoogleApiSource(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGoogleApiSource with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createGoogleApiSource = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createGoogleApiSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateGoogleApiSourceProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkCreateGoogleApiSourceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateGoogleApiSourceProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkCreateGoogleApiSourceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateGoogleApiSource', () => { + it('invokes updateGoogleApiSource without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest() + ); + request.googleApiSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest', + ['googleApiSource', 'name'] + ); + request.googleApiSource.name = defaultValue1; + const expectedHeaderRequestParams = `google_api_source.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateGoogleApiSource = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateGoogleApiSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleApiSource without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest() + ); + request.googleApiSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest', + ['googleApiSource', 'name'] + ); + request.googleApiSource.name = defaultValue1; + const expectedHeaderRequestParams = `google_api_source.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateGoogleApiSource = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateGoogleApiSource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleApiSource with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest() + ); + request.googleApiSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest', + ['googleApiSource', 'name'] + ); + request.googleApiSource.name = defaultValue1; + const expectedHeaderRequestParams = `google_api_source.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateGoogleApiSource = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateGoogleApiSource(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleApiSource with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest() + ); + request.googleApiSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest', + ['googleApiSource', 'name'] + ); + request.googleApiSource.name = defaultValue1; + const expectedHeaderRequestParams = `google_api_source.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateGoogleApiSource = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateGoogleApiSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateGoogleApiSourceProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkUpdateGoogleApiSourceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateGoogleApiSourceProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkUpdateGoogleApiSourceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteGoogleApiSource', () => { + it('invokes deleteGoogleApiSource without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteGoogleApiSource = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteGoogleApiSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGoogleApiSource without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteGoogleApiSource = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteGoogleApiSource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.eventarc.v1.IGoogleApiSource, + protos.google.cloud.eventarc.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGoogleApiSource with call error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteGoogleApiSource = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteGoogleApiSource(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGoogleApiSource with LRO error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteGoogleApiSource = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteGoogleApiSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteGoogleApiSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGoogleApiSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteGoogleApiSourceProgress without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkDeleteGoogleApiSourceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteGoogleApiSourceProgress with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + 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.checkDeleteGoogleApiSourceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listTriggers', () => { + it('invokes listTriggers without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListTriggersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListTriggersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + ]; + client.innerApiCalls.listTriggers = stubSimpleCall(expectedResponse); + const [response] = await client.listTriggers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTriggers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTriggers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTriggers without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListTriggersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListTriggersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + ]; + client.innerApiCalls.listTriggers = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTriggers( + request, + ( + err?: Error | null, + result?: protos.google.cloud.eventarc.v1.ITrigger[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTriggers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTriggers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTriggers with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListTriggersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListTriggersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTriggers = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listTriggers(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listTriggers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTriggers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTriggersStream without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListTriggersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListTriggersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + ]; + client.descriptors.page.listTriggers.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listTriggersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.eventarc.v1.Trigger[] = []; + stream.on( + 'data', + (response: protos.google.cloud.eventarc.v1.Trigger) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listTriggers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTriggers, request) + ); + assert( + (client.descriptors.page.listTriggers.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listTriggersStream with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListTriggersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListTriggersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTriggers.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listTriggersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.eventarc.v1.Trigger[] = []; + stream.on( + 'data', + (response: protos.google.cloud.eventarc.v1.Trigger) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listTriggers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTriggers, request) + ); + assert( + (client.descriptors.page.listTriggers.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listTriggers without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListTriggersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListTriggersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), + ]; + client.descriptors.page.listTriggers.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.eventarc.v1.ITrigger[] = []; + const iterable = client.listTriggersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listTriggers.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listTriggers.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listTriggers with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListTriggersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListTriggersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTriggers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listTriggersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.eventarc.v1.ITrigger[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listTriggers.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listTriggers.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listChannels', () => { + it('invokes listChannels without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + ]; + client.innerApiCalls.listChannels = stubSimpleCall(expectedResponse); + const [response] = await client.listChannels(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listChannels without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + ]; + client.innerApiCalls.listChannels = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listChannels( + request, + ( + err?: Error | null, + result?: protos.google.cloud.eventarc.v1.IChannel[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listChannels with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listChannels = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listChannels(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listChannels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listChannelsStream without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + ]; + client.descriptors.page.listChannels.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listChannelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.eventarc.v1.Channel[] = []; + stream.on( + 'data', + (response: protos.google.cloud.eventarc.v1.Channel) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listChannels.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listChannels, request) + ); + assert( + (client.descriptors.page.listChannels.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listChannelsStream with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listChannels.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listChannelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.eventarc.v1.Channel[] = []; + stream.on( + 'data', + (response: protos.google.cloud.eventarc.v1.Channel) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listChannels.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listChannels, request) + ); + assert( + (client.descriptors.page.listChannels.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listChannels without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + ]; + client.descriptors.page.listChannels.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.eventarc.v1.IChannel[] = []; + const iterable = client.listChannelsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listChannels.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listChannels.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listChannels with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listChannels.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listChannelsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.eventarc.v1.IChannel[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listChannels.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listChannels.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listProviders', () => { + it('invokes listProviders without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListProvidersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListProvidersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + ]; + client.innerApiCalls.listProviders = stubSimpleCall(expectedResponse); + const [response] = await client.listProviders(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listProviders as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listProviders as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProviders without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListProvidersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListProvidersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + ]; + client.innerApiCalls.listProviders = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listProviders( + request, + ( + err?: Error | null, + result?: protos.google.cloud.eventarc.v1.IProvider[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listProviders as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listProviders as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProviders with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListProvidersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListProvidersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listProviders = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listProviders(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listProviders as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listProviders as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProvidersStream without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListProvidersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListProvidersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + ]; + client.descriptors.page.listProviders.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listProvidersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.eventarc.v1.Provider[] = []; + stream.on( + 'data', + (response: protos.google.cloud.eventarc.v1.Provider) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listProviders.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listProviders, request) + ); + assert( + (client.descriptors.page.listProviders.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listProvidersStream with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListProvidersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListProvidersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listProviders.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listProvidersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.eventarc.v1.Provider[] = []; + stream.on( + 'data', + (response: protos.google.cloud.eventarc.v1.Provider) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listProviders.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listProviders, request) + ); + assert( + (client.descriptors.page.listProviders.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listProviders without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListProvidersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListProvidersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + ]; + client.descriptors.page.listProviders.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.eventarc.v1.IProvider[] = []; + const iterable = client.listProvidersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listProviders.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listProviders.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listProviders with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListProvidersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListProvidersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listProviders.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listProvidersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.eventarc.v1.IProvider[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listProviders.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listProviders.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listChannelConnections', () => { + it('invokes listChannelConnections without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + ]; + client.innerApiCalls.listChannelConnections = + stubSimpleCall(expectedResponse); + const [response] = await client.listChannelConnections(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listChannelConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listChannelConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listChannelConnections without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + ]; + client.innerApiCalls.listChannelConnections = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listChannelConnections( + request, + ( + err?: Error | null, + result?: protos.google.cloud.eventarc.v1.IChannelConnection[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listChannelConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listChannelConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listChannelConnections with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listChannelConnections = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listChannelConnections(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listChannelConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listChannelConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listChannelConnectionsStream without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + ]; + client.descriptors.page.listChannelConnections.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listChannelConnectionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.eventarc.v1.ChannelConnection[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.eventarc.v1.ChannelConnection) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listChannelConnections + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listChannelConnections, request) + ); + assert( + ( + client.descriptors.page.listChannelConnections + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listChannelConnectionsStream with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listChannelConnections.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listChannelConnectionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.eventarc.v1.ChannelConnection[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.eventarc.v1.ChannelConnection) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listChannelConnections + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listChannelConnections, request) + ); + assert( + ( + client.descriptors.page.listChannelConnections + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listChannelConnections without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + generateSampleMessage( + new protos.google.cloud.eventarc.v1.ChannelConnection() + ), + ]; + client.descriptors.page.listChannelConnections.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.eventarc.v1.IChannelConnection[] = + []; + const iterable = client.listChannelConnectionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listChannelConnections + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listChannelConnections + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listChannelConnections with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listChannelConnections.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listChannelConnectionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.eventarc.v1.IChannelConnection[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listChannelConnections + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listChannelConnections + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listMessageBuses', () => { + it('invokes listMessageBuses without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + ]; + client.innerApiCalls.listMessageBuses = stubSimpleCall(expectedResponse); + const [response] = await client.listMessageBuses(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMessageBuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMessageBuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessageBuses without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + ]; + client.innerApiCalls.listMessageBuses = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMessageBuses( + request, + ( + err?: Error | null, + result?: protos.google.cloud.eventarc.v1.IMessageBus[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMessageBuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMessageBuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessageBuses with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMessageBuses = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listMessageBuses(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listMessageBuses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMessageBuses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessageBusesStream without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + ]; + client.descriptors.page.listMessageBuses.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMessageBusesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.eventarc.v1.MessageBus[] = []; + stream.on( + 'data', + (response: protos.google.cloud.eventarc.v1.MessageBus) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listMessageBuses.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listMessageBuses, request) + ); + assert( + (client.descriptors.page.listMessageBuses.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listMessageBusesStream with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMessageBuses.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMessageBusesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.eventarc.v1.MessageBus[] = []; + stream.on( + 'data', + (response: protos.google.cloud.eventarc.v1.MessageBus) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listMessageBuses.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listMessageBuses, request) + ); + assert( + (client.descriptors.page.listMessageBuses.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listMessageBuses without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.MessageBus()), + ]; + client.descriptors.page.listMessageBuses.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.eventarc.v1.IMessageBus[] = []; + const iterable = client.listMessageBusesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listMessageBuses.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listMessageBuses.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listMessageBuses with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMessageBuses.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMessageBusesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.eventarc.v1.IMessageBus[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listMessageBuses.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listMessageBuses.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listMessageBusEnrollments', () => { + it('invokes listMessageBusEnrollments without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [new String(), new String(), new String()]; + client.innerApiCalls.listMessageBusEnrollments = + stubSimpleCall(expectedResponse); + const [response] = await client.listMessageBusEnrollments(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMessageBusEnrollments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMessageBusEnrollments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessageBusEnrollments without error using callback', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [new String(), new String(), new String()]; + client.innerApiCalls.listMessageBusEnrollments = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMessageBusEnrollments( + request, + (err?: Error | null, result?: string[] | null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMessageBusEnrollments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMessageBusEnrollments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessageBusEnrollments with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMessageBusEnrollments = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listMessageBusEnrollments(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listMessageBusEnrollments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMessageBusEnrollments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMessageBusEnrollmentsStream without error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [new String(), new String(), new String()]; + client.descriptors.page.listMessageBusEnrollments.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMessageBusEnrollmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: string[] = []; + stream.on('data', (response: string) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listMessageBusEnrollments + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMessageBusEnrollments, request) + ); + assert( + ( + client.descriptors.page.listMessageBusEnrollments + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMessageBusEnrollmentsStream with error', async () => { + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMessageBusEnrollments.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMessageBusEnrollmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: string[] = []; + stream.on('data', (response: string) => { + responses.push(response); + }); stream.on('end', () => { resolve(responses); }); @@ -2914,165 +7336,175 @@ describe('v1.EventarcClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listTriggers.createStream as SinonStub) + ( + client.descriptors.page.listMessageBusEnrollments + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listTriggers, request) + .calledWith(client.innerApiCalls.listMessageBusEnrollments, request) ); assert( - (client.descriptors.page.listTriggers.createStream as SinonStub) + ( + client.descriptors.page.listMessageBusEnrollments + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listTriggers without error', async () => { + it('uses async iteration with listMessageBusEnrollments without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListTriggersRequest() + new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListTriggersRequest', + '.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Trigger()), - ]; - client.descriptors.page.listTriggers.asyncIterate = + const expectedResponse = [new String(), new String(), new String()]; + client.descriptors.page.listMessageBusEnrollments.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.eventarc.v1.ITrigger[] = []; - const iterable = client.listTriggersAsync(request); + const responses: string[] = []; + const iterable = client.listMessageBusEnrollmentsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listTriggers.asyncIterate as SinonStub + client.descriptors.page.listMessageBusEnrollments + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listTriggers.asyncIterate as SinonStub) + ( + client.descriptors.page.listMessageBusEnrollments + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listTriggers with error', async () => { + it('uses async iteration with listMessageBusEnrollments with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListTriggersRequest() + new protos.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListTriggersRequest', + '.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listTriggers.asyncIterate = + client.descriptors.page.listMessageBusEnrollments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listTriggersAsync(request); + const iterable = client.listMessageBusEnrollmentsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.eventarc.v1.ITrigger[] = []; + const responses: string[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listTriggers.asyncIterate as SinonStub + client.descriptors.page.listMessageBusEnrollments + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listTriggers.asyncIterate as SinonStub) + ( + client.descriptors.page.listMessageBusEnrollments + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); - describe('listChannels', () => { - it('invokes listChannels without error', async () => { + describe('listEnrollments', () => { + it('invokes listEnrollments without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelsRequest() + new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelsRequest', + '.google.cloud.eventarc.v1.ListEnrollmentsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), ]; - client.innerApiCalls.listChannels = stubSimpleCall(expectedResponse); - const [response] = await client.listChannels(request); + client.innerApiCalls.listEnrollments = stubSimpleCall(expectedResponse); + const [response] = await client.listEnrollments(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.listEnrollments as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.listEnrollments as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listChannels without error using callback', async () => { + it('invokes listEnrollments without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelsRequest() + new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelsRequest', + '.google.cloud.eventarc.v1.ListEnrollmentsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), ]; - client.innerApiCalls.listChannels = + client.innerApiCalls.listEnrollments = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listChannels( + client.listEnrollments( request, ( err?: Error | null, - result?: protos.google.cloud.eventarc.v1.IChannel[] | null + result?: protos.google.cloud.eventarc.v1.IEnrollment[] | null ) => { if (err) { reject(err); @@ -3085,74 +7517,74 @@ describe('v1.EventarcClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.listEnrollments as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.listEnrollments as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listChannels with error', async () => { + it('invokes listEnrollments with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelsRequest() + new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelsRequest', + '.google.cloud.eventarc.v1.ListEnrollmentsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listChannels = stubSimpleCall( + client.innerApiCalls.listEnrollments = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listChannels(request), expectedError); + await assert.rejects(client.listEnrollments(request), expectedError); const actualRequest = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.listEnrollments as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listChannels as SinonStub + client.innerApiCalls.listEnrollments as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listChannelsStream without error', async () => { + it('invokes listEnrollmentsStream without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelsRequest() + new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelsRequest', + '.google.cloud.eventarc.v1.ListEnrollmentsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), ]; - client.descriptors.page.listChannels.createStream = + client.descriptors.page.listEnrollments.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listChannelsStream(request); + const stream = client.listEnrollmentsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.eventarc.v1.Channel[] = []; + const responses: protos.google.cloud.eventarc.v1.Enrollment[] = []; stream.on( 'data', - (response: protos.google.cloud.eventarc.v1.Channel) => { + (response: protos.google.cloud.eventarc.v1.Enrollment) => { responses.push(response); } ); @@ -3166,12 +7598,12 @@ describe('v1.EventarcClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listChannels.createStream as SinonStub) + (client.descriptors.page.listEnrollments.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listChannels, request) + .calledWith(client.innerApiCalls.listEnrollments, request) ); assert( - (client.descriptors.page.listChannels.createStream as SinonStub) + (client.descriptors.page.listEnrollments.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -3179,32 +7611,30 @@ describe('v1.EventarcClient', () => { ); }); - it('invokes listChannelsStream with error', async () => { + it('invokes listEnrollmentsStream with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelsRequest() + new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelsRequest', + '.google.cloud.eventarc.v1.ListEnrollmentsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listChannels.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listChannelsStream(request); + client.descriptors.page.listEnrollments.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listEnrollmentsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.eventarc.v1.Channel[] = []; + const responses: protos.google.cloud.eventarc.v1.Enrollment[] = []; stream.on( 'data', - (response: protos.google.cloud.eventarc.v1.Channel) => { + (response: protos.google.cloud.eventarc.v1.Enrollment) => { responses.push(response); } ); @@ -3217,12 +7647,12 @@ describe('v1.EventarcClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listChannels.createStream as SinonStub) + (client.descriptors.page.listEnrollments.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listChannels, request) + .calledWith(client.innerApiCalls.listEnrollments, request) ); assert( - (client.descriptors.page.listChannels.createStream as SinonStub) + (client.descriptors.page.listEnrollments.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -3230,42 +7660,42 @@ describe('v1.EventarcClient', () => { ); }); - it('uses async iteration with listChannels without error', async () => { + it('uses async iteration with listEnrollments without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelsRequest() + new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelsRequest', + '.google.cloud.eventarc.v1.ListEnrollmentsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Channel()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Enrollment()), ]; - client.descriptors.page.listChannels.asyncIterate = + client.descriptors.page.listEnrollments.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.eventarc.v1.IChannel[] = []; - const iterable = client.listChannelsAsync(request); + const responses: protos.google.cloud.eventarc.v1.IEnrollment[] = []; + const iterable = client.listEnrollmentsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listChannels.asyncIterate as SinonStub + client.descriptors.page.listEnrollments.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listChannels.asyncIterate as SinonStub) + (client.descriptors.page.listEnrollments.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -3273,39 +7703,39 @@ describe('v1.EventarcClient', () => { ); }); - it('uses async iteration with listChannels with error', async () => { + it('uses async iteration with listEnrollments with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelsRequest() + new protos.google.cloud.eventarc.v1.ListEnrollmentsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelsRequest', + '.google.cloud.eventarc.v1.ListEnrollmentsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listChannels.asyncIterate = + client.descriptors.page.listEnrollments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listChannelsAsync(request); + const iterable = client.listEnrollmentsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.eventarc.v1.IChannel[] = []; + const responses: protos.google.cloud.eventarc.v1.IEnrollment[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listChannels.asyncIterate as SinonStub + client.descriptors.page.listEnrollments.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listChannels.asyncIterate as SinonStub) + (client.descriptors.page.listEnrollments.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -3314,68 +7744,68 @@ describe('v1.EventarcClient', () => { }); }); - describe('listProviders', () => { - it('invokes listProviders without error', async () => { + describe('listPipelines', () => { + it('invokes listPipelines without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListProvidersRequest() + new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListProvidersRequest', + '.google.cloud.eventarc.v1.ListPipelinesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), ]; - client.innerApiCalls.listProviders = stubSimpleCall(expectedResponse); - const [response] = await client.listProviders(request); + client.innerApiCalls.listPipelines = stubSimpleCall(expectedResponse); + const [response] = await client.listPipelines(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listProviders as SinonStub + client.innerApiCalls.listPipelines as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listProviders as SinonStub + client.innerApiCalls.listPipelines as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProviders without error using callback', async () => { + it('invokes listPipelines without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListProvidersRequest() + new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListProvidersRequest', + '.google.cloud.eventarc.v1.ListPipelinesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), ]; - client.innerApiCalls.listProviders = + client.innerApiCalls.listPipelines = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listProviders( + client.listPipelines( request, ( err?: Error | null, - result?: protos.google.cloud.eventarc.v1.IProvider[] | null + result?: protos.google.cloud.eventarc.v1.IPipeline[] | null ) => { if (err) { reject(err); @@ -3388,74 +7818,74 @@ describe('v1.EventarcClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listProviders as SinonStub + client.innerApiCalls.listPipelines as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listProviders as SinonStub + client.innerApiCalls.listPipelines as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProviders with error', async () => { + it('invokes listPipelines with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListProvidersRequest() + new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListProvidersRequest', + '.google.cloud.eventarc.v1.ListPipelinesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listProviders = stubSimpleCall( + client.innerApiCalls.listPipelines = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listProviders(request), expectedError); + await assert.rejects(client.listPipelines(request), expectedError); const actualRequest = ( - client.innerApiCalls.listProviders as SinonStub + client.innerApiCalls.listPipelines as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listProviders as SinonStub + client.innerApiCalls.listPipelines as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProvidersStream without error', async () => { + it('invokes listPipelinesStream without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListProvidersRequest() + new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListProvidersRequest', + '.google.cloud.eventarc.v1.ListPipelinesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), ]; - client.descriptors.page.listProviders.createStream = + client.descriptors.page.listPipelines.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listProvidersStream(request); + const stream = client.listPipelinesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.eventarc.v1.Provider[] = []; + const responses: protos.google.cloud.eventarc.v1.Pipeline[] = []; stream.on( 'data', - (response: protos.google.cloud.eventarc.v1.Provider) => { + (response: protos.google.cloud.eventarc.v1.Pipeline) => { responses.push(response); } ); @@ -3469,12 +7899,12 @@ describe('v1.EventarcClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listProviders.createStream as SinonStub) + (client.descriptors.page.listPipelines.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listProviders, request) + .calledWith(client.innerApiCalls.listPipelines, request) ); assert( - (client.descriptors.page.listProviders.createStream as SinonStub) + (client.descriptors.page.listPipelines.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -3482,30 +7912,30 @@ describe('v1.EventarcClient', () => { ); }); - it('invokes listProvidersStream with error', async () => { + it('invokes listPipelinesStream with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListProvidersRequest() + new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListProvidersRequest', + '.google.cloud.eventarc.v1.ListPipelinesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listProviders.createStream = + client.descriptors.page.listPipelines.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listProvidersStream(request); + const stream = client.listPipelinesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.eventarc.v1.Provider[] = []; + const responses: protos.google.cloud.eventarc.v1.Pipeline[] = []; stream.on( 'data', - (response: protos.google.cloud.eventarc.v1.Provider) => { + (response: protos.google.cloud.eventarc.v1.Pipeline) => { responses.push(response); } ); @@ -3518,12 +7948,12 @@ describe('v1.EventarcClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listProviders.createStream as SinonStub) + (client.descriptors.page.listPipelines.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listProviders, request) + .calledWith(client.innerApiCalls.listPipelines, request) ); assert( - (client.descriptors.page.listProviders.createStream as SinonStub) + (client.descriptors.page.listPipelines.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -3531,42 +7961,42 @@ describe('v1.EventarcClient', () => { ); }); - it('uses async iteration with listProviders without error', async () => { + it('uses async iteration with listPipelines without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListProvidersRequest() + new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListProvidersRequest', + '.google.cloud.eventarc.v1.ListPipelinesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), - generateSampleMessage(new protos.google.cloud.eventarc.v1.Provider()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), + generateSampleMessage(new protos.google.cloud.eventarc.v1.Pipeline()), ]; - client.descriptors.page.listProviders.asyncIterate = + client.descriptors.page.listPipelines.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.eventarc.v1.IProvider[] = []; - const iterable = client.listProvidersAsync(request); + const responses: protos.google.cloud.eventarc.v1.IPipeline[] = []; + const iterable = client.listPipelinesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listProviders.asyncIterate as SinonStub + client.descriptors.page.listPipelines.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listProviders.asyncIterate as SinonStub) + (client.descriptors.page.listPipelines.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -3574,39 +8004,39 @@ describe('v1.EventarcClient', () => { ); }); - it('uses async iteration with listProviders with error', async () => { + it('uses async iteration with listPipelines with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListProvidersRequest() + new protos.google.cloud.eventarc.v1.ListPipelinesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListProvidersRequest', + '.google.cloud.eventarc.v1.ListPipelinesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listProviders.asyncIterate = + client.descriptors.page.listPipelines.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listProvidersAsync(request); + const iterable = client.listPipelinesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.eventarc.v1.IProvider[] = []; + const responses: protos.google.cloud.eventarc.v1.IPipeline[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listProviders.asyncIterate as SinonStub + client.descriptors.page.listPipelines.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listProviders.asyncIterate as SinonStub) + (client.descriptors.page.listPipelines.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -3615,81 +8045,81 @@ describe('v1.EventarcClient', () => { }); }); - describe('listChannelConnections', () => { - it('invokes listChannelConnections without error', async () => { + describe('listGoogleApiSources', () => { + it('invokes listGoogleApiSources without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + '.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), ]; - client.innerApiCalls.listChannelConnections = + client.innerApiCalls.listGoogleApiSources = stubSimpleCall(expectedResponse); - const [response] = await client.listChannelConnections(request); + const [response] = await client.listGoogleApiSources(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listChannelConnections as SinonStub + client.innerApiCalls.listGoogleApiSources as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listChannelConnections as SinonStub + client.innerApiCalls.listGoogleApiSources as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listChannelConnections without error using callback', async () => { + it('invokes listGoogleApiSources without error using callback', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + '.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), ]; - client.innerApiCalls.listChannelConnections = + client.innerApiCalls.listGoogleApiSources = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listChannelConnections( + client.listGoogleApiSources( request, ( err?: Error | null, - result?: protos.google.cloud.eventarc.v1.IChannelConnection[] | null + result?: protos.google.cloud.eventarc.v1.IGoogleApiSource[] | null ) => { if (err) { reject(err); @@ -3702,84 +8132,80 @@ describe('v1.EventarcClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listChannelConnections as SinonStub + client.innerApiCalls.listGoogleApiSources as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listChannelConnections as SinonStub + client.innerApiCalls.listGoogleApiSources as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listChannelConnections with error', async () => { + it('invokes listGoogleApiSources with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + '.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listChannelConnections = stubSimpleCall( + client.innerApiCalls.listGoogleApiSources = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.listChannelConnections(request), - expectedError - ); + await assert.rejects(client.listGoogleApiSources(request), expectedError); const actualRequest = ( - client.innerApiCalls.listChannelConnections as SinonStub + client.innerApiCalls.listGoogleApiSources as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listChannelConnections as SinonStub + client.innerApiCalls.listGoogleApiSources as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listChannelConnectionsStream without error', async () => { + it('invokes listGoogleApiSourcesStream without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + '.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), ]; - client.descriptors.page.listChannelConnections.createStream = + client.descriptors.page.listGoogleApiSources.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listChannelConnectionsStream(request); + const stream = client.listGoogleApiSourcesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.eventarc.v1.ChannelConnection[] = - []; + const responses: protos.google.cloud.eventarc.v1.GoogleApiSource[] = []; stream.on( 'data', - (response: protos.google.cloud.eventarc.v1.ChannelConnection) => { + (response: protos.google.cloud.eventarc.v1.GoogleApiSource) => { responses.push(response); } ); @@ -3792,51 +8218,44 @@ describe('v1.EventarcClient', () => { }); const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); - assert( - ( - client.descriptors.page.listChannelConnections - .createStream as SinonStub - ) + assert( + (client.descriptors.page.listGoogleApiSources.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listChannelConnections, request) + .calledWith(client.innerApiCalls.listGoogleApiSources, request) ); assert( - ( - client.descriptors.page.listChannelConnections - .createStream as SinonStub - ) + (client.descriptors.page.listGoogleApiSources.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); - it('invokes listChannelConnectionsStream with error', async () => { + it('invokes listGoogleApiSourcesStream with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + '.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listChannelConnections.createStream = + client.descriptors.page.listGoogleApiSources.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listChannelConnectionsStream(request); + const stream = client.listGoogleApiSourcesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.eventarc.v1.ChannelConnection[] = - []; + const responses: protos.google.cloud.eventarc.v1.GoogleApiSource[] = []; stream.on( 'data', - (response: protos.google.cloud.eventarc.v1.ChannelConnection) => { + (response: protos.google.cloud.eventarc.v1.GoogleApiSource) => { responses.push(response); } ); @@ -3849,100 +8268,89 @@ describe('v1.EventarcClient', () => { }); await assert.rejects(promise, expectedError); assert( - ( - client.descriptors.page.listChannelConnections - .createStream as SinonStub - ) + (client.descriptors.page.listGoogleApiSources.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listChannelConnections, request) + .calledWith(client.innerApiCalls.listGoogleApiSources, request) ); assert( - ( - client.descriptors.page.listChannelConnections - .createStream as SinonStub - ) + (client.descriptors.page.listGoogleApiSources.createStream as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); - it('uses async iteration with listChannelConnections without error', async () => { + it('uses async iteration with listGoogleApiSources without error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + '.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), generateSampleMessage( - new protos.google.cloud.eventarc.v1.ChannelConnection() + new protos.google.cloud.eventarc.v1.GoogleApiSource() ), ]; - client.descriptors.page.listChannelConnections.asyncIterate = + client.descriptors.page.listGoogleApiSources.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.eventarc.v1.IChannelConnection[] = - []; - const iterable = client.listChannelConnectionsAsync(request); + const responses: protos.google.cloud.eventarc.v1.IGoogleApiSource[] = []; + const iterable = client.listGoogleApiSourcesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listChannelConnections - .asyncIterate as SinonStub + client.descriptors.page.listGoogleApiSources.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listChannelConnections - .asyncIterate as SinonStub - ) + (client.descriptors.page.listGoogleApiSources.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); - it('uses async iteration with listChannelConnections with error', async () => { + it('uses async iteration with listGoogleApiSources with error', async () => { const client = new eventarcModule.v1.EventarcClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.eventarc.v1.ListChannelConnectionsRequest() + new protos.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.eventarc.v1.ListChannelConnectionsRequest', + '.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listChannelConnections.asyncIterate = + client.descriptors.page.listGoogleApiSources.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listChannelConnectionsAsync(request); + const iterable = client.listGoogleApiSourcesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.eventarc.v1.IChannelConnection[] = + const responses: protos.google.cloud.eventarc.v1.IGoogleApiSource[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -3950,20 +8358,16 @@ describe('v1.EventarcClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listChannelConnections - .asyncIterate as SinonStub + client.descriptors.page.listGoogleApiSources.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listChannelConnections - .asyncIterate as SinonStub - ) + (client.descriptors.page.listGoogleApiSources.asyncIterate as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); }); }); @@ -4937,6 +9341,135 @@ describe('v1.EventarcClient', () => { }); }); + describe('enrollment', () => { + const fakePath = '/rendered/path/enrollment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + enrollment: 'enrollmentValue', + }; + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.enrollmentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.enrollmentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('enrollmentPath', () => { + const result = client.enrollmentPath( + 'projectValue', + 'locationValue', + 'enrollmentValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.enrollmentPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEnrollmentName', () => { + const result = client.matchProjectFromEnrollmentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.enrollmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEnrollmentName', () => { + const result = client.matchLocationFromEnrollmentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.enrollmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEnrollmentFromEnrollmentName', () => { + const result = client.matchEnrollmentFromEnrollmentName(fakePath); + assert.strictEqual(result, 'enrollmentValue'); + assert( + (client.pathTemplates.enrollmentPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('googleApiSource', () => { + const fakePath = '/rendered/path/googleApiSource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + google_api_source: 'googleApiSourceValue', + }; + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.googleApiSourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.googleApiSourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('googleApiSourcePath', () => { + const result = client.googleApiSourcePath( + 'projectValue', + 'locationValue', + 'googleApiSourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.googleApiSourcePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromGoogleApiSourceName', () => { + const result = client.matchProjectFromGoogleApiSourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.googleApiSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromGoogleApiSourceName', () => { + const result = client.matchLocationFromGoogleApiSourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.googleApiSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGoogleApiSourceFromGoogleApiSourceName', () => { + const result = + client.matchGoogleApiSourceFromGoogleApiSourceName(fakePath); + assert.strictEqual(result, 'googleApiSourceValue'); + assert( + (client.pathTemplates.googleApiSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('googleChannelConfig', () => { const fakePath = '/rendered/path/googleChannelConfig'; const expectedParameters = { @@ -5048,6 +9581,134 @@ describe('v1.EventarcClient', () => { }); }); + describe('messageBus', () => { + const fakePath = '/rendered/path/messageBus'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + message_bus: 'messageBusValue', + }; + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.messageBusPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.messageBusPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('messageBusPath', () => { + const result = client.messageBusPath( + 'projectValue', + 'locationValue', + 'messageBusValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.messageBusPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMessageBusName', () => { + const result = client.matchProjectFromMessageBusName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.messageBusPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMessageBusName', () => { + const result = client.matchLocationFromMessageBusName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.messageBusPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMessageBusFromMessageBusName', () => { + const result = client.matchMessageBusFromMessageBusName(fakePath); + assert.strictEqual(result, 'messageBusValue'); + assert( + (client.pathTemplates.messageBusPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('pipeline', () => { + const fakePath = '/rendered/path/pipeline'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + pipeline: 'pipelineValue', + }; + const client = new eventarcModule.v1.EventarcClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.pipelinePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.pipelinePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('pipelinePath', () => { + const result = client.pipelinePath( + 'projectValue', + 'locationValue', + 'pipelineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.pipelinePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPipelineName', () => { + const result = client.matchProjectFromPipelineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.pipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPipelineName', () => { + const result = client.matchLocationFromPipelineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.pipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPipelineFromPipelineName', () => { + const result = client.matchPipelineFromPipelineName(fakePath); + assert.strictEqual(result, 'pipelineValue'); + assert( + (client.pathTemplates.pipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('project', () => { const fakePath = '/rendered/path/project'; const expectedParameters = {