1// Copyright 2022 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.eventarc.v1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/cloud/eventarc/v1/channel.proto"; 24import "google/cloud/eventarc/v1/channel_connection.proto"; 25import "google/cloud/eventarc/v1/discovery.proto"; 26import "google/cloud/eventarc/v1/google_channel_config.proto"; 27import "google/cloud/eventarc/v1/trigger.proto"; 28import "google/longrunning/operations.proto"; 29import "google/protobuf/field_mask.proto"; 30import "google/protobuf/timestamp.proto"; 31 32option csharp_namespace = "Google.Cloud.Eventarc.V1"; 33option go_package = "cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb"; 34option java_multiple_files = true; 35option java_outer_classname = "EventarcProto"; 36option java_package = "com.google.cloud.eventarc.v1"; 37option php_namespace = "Google\\Cloud\\Eventarc\\V1"; 38option ruby_package = "Google::Cloud::Eventarc::V1"; 39 40// Eventarc allows users to subscribe to various events that are provided by 41// Google Cloud services and forward them to supported destinations. 42service Eventarc { 43 option (google.api.default_host) = "eventarc.googleapis.com"; 44 option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; 45 46 // Get a single trigger. 47 rpc GetTrigger(GetTriggerRequest) returns (Trigger) { 48 option (google.api.http) = { 49 get: "/v1/{name=projects/*/locations/*/triggers/*}" 50 }; 51 option (google.api.method_signature) = "name"; 52 } 53 54 // List triggers. 55 rpc ListTriggers(ListTriggersRequest) returns (ListTriggersResponse) { 56 option (google.api.http) = { 57 get: "/v1/{parent=projects/*/locations/*}/triggers" 58 }; 59 option (google.api.method_signature) = "parent"; 60 } 61 62 // Create a new trigger in a particular project and location. 63 rpc CreateTrigger(CreateTriggerRequest) returns (google.longrunning.Operation) { 64 option (google.api.http) = { 65 post: "/v1/{parent=projects/*/locations/*}/triggers" 66 body: "trigger" 67 }; 68 option (google.api.method_signature) = "parent,trigger,trigger_id"; 69 option (google.longrunning.operation_info) = { 70 response_type: "Trigger" 71 metadata_type: "OperationMetadata" 72 }; 73 } 74 75 // Update a single trigger. 76 rpc UpdateTrigger(UpdateTriggerRequest) returns (google.longrunning.Operation) { 77 option (google.api.http) = { 78 patch: "/v1/{trigger.name=projects/*/locations/*/triggers/*}" 79 body: "trigger" 80 }; 81 option (google.api.method_signature) = "trigger,update_mask,allow_missing"; 82 option (google.longrunning.operation_info) = { 83 response_type: "Trigger" 84 metadata_type: "OperationMetadata" 85 }; 86 } 87 88 // Delete a single trigger. 89 rpc DeleteTrigger(DeleteTriggerRequest) returns (google.longrunning.Operation) { 90 option (google.api.http) = { 91 delete: "/v1/{name=projects/*/locations/*/triggers/*}" 92 }; 93 option (google.api.method_signature) = "name,allow_missing"; 94 option (google.longrunning.operation_info) = { 95 response_type: "Trigger" 96 metadata_type: "OperationMetadata" 97 }; 98 } 99 100 // Get a single Channel. 101 rpc GetChannel(GetChannelRequest) returns (Channel) { 102 option (google.api.http) = { 103 get: "/v1/{name=projects/*/locations/*/channels/*}" 104 }; 105 option (google.api.method_signature) = "name"; 106 } 107 108 // List channels. 109 rpc ListChannels(ListChannelsRequest) returns (ListChannelsResponse) { 110 option (google.api.http) = { 111 get: "/v1/{parent=projects/*/locations/*}/channels" 112 }; 113 option (google.api.method_signature) = "parent"; 114 } 115 116 // Create a new channel in a particular project and location. 117 rpc CreateChannel(CreateChannelRequest) returns (google.longrunning.Operation) { 118 option (google.api.http) = { 119 post: "/v1/{parent=projects/*/locations/*}/channels" 120 body: "channel" 121 }; 122 option (google.api.method_signature) = "parent,channel,channel_id"; 123 option (google.longrunning.operation_info) = { 124 response_type: "Channel" 125 metadata_type: "OperationMetadata" 126 }; 127 } 128 129 // Update a single channel. 130 rpc UpdateChannel(UpdateChannelRequest) returns (google.longrunning.Operation) { 131 option (google.api.http) = { 132 patch: "/v1/{channel.name=projects/*/locations/*/channels/*}" 133 body: "channel" 134 }; 135 option (google.api.method_signature) = "channel,update_mask"; 136 option (google.longrunning.operation_info) = { 137 response_type: "Channel" 138 metadata_type: "OperationMetadata" 139 }; 140 } 141 142 // Delete a single channel. 143 rpc DeleteChannel(DeleteChannelRequest) returns (google.longrunning.Operation) { 144 option (google.api.http) = { 145 delete: "/v1/{name=projects/*/locations/*/channels/*}" 146 }; 147 option (google.api.method_signature) = "name"; 148 option (google.longrunning.operation_info) = { 149 response_type: "Channel" 150 metadata_type: "OperationMetadata" 151 }; 152 } 153 154 // Get a single Provider. 155 rpc GetProvider(GetProviderRequest) returns (Provider) { 156 option (google.api.http) = { 157 get: "/v1/{name=projects/*/locations/*/providers/*}" 158 }; 159 option (google.api.method_signature) = "name"; 160 } 161 162 // List providers. 163 rpc ListProviders(ListProvidersRequest) returns (ListProvidersResponse) { 164 option (google.api.http) = { 165 get: "/v1/{parent=projects/*/locations/*}/providers" 166 }; 167 option (google.api.method_signature) = "parent"; 168 } 169 170 // Get a single ChannelConnection. 171 rpc GetChannelConnection(GetChannelConnectionRequest) returns (ChannelConnection) { 172 option (google.api.http) = { 173 get: "/v1/{name=projects/*/locations/*/channelConnections/*}" 174 }; 175 option (google.api.method_signature) = "name"; 176 } 177 178 // List channel connections. 179 rpc ListChannelConnections(ListChannelConnectionsRequest) returns (ListChannelConnectionsResponse) { 180 option (google.api.http) = { 181 get: "/v1/{parent=projects/*/locations/*}/channelConnections" 182 }; 183 option (google.api.method_signature) = "parent"; 184 } 185 186 // Create a new ChannelConnection in a particular project and location. 187 rpc CreateChannelConnection(CreateChannelConnectionRequest) returns (google.longrunning.Operation) { 188 option (google.api.http) = { 189 post: "/v1/{parent=projects/*/locations/*}/channelConnections" 190 body: "channel_connection" 191 }; 192 option (google.api.method_signature) = "parent,channel_connection,channel_connection_id"; 193 option (google.longrunning.operation_info) = { 194 response_type: "ChannelConnection" 195 metadata_type: "OperationMetadata" 196 }; 197 } 198 199 // Delete a single ChannelConnection. 200 rpc DeleteChannelConnection(DeleteChannelConnectionRequest) returns (google.longrunning.Operation) { 201 option (google.api.http) = { 202 delete: "/v1/{name=projects/*/locations/*/channelConnections/*}" 203 }; 204 option (google.api.method_signature) = "name"; 205 option (google.longrunning.operation_info) = { 206 response_type: "ChannelConnection" 207 metadata_type: "OperationMetadata" 208 }; 209 } 210 211 // Get a GoogleChannelConfig 212 rpc GetGoogleChannelConfig(GetGoogleChannelConfigRequest) returns (GoogleChannelConfig) { 213 option (google.api.http) = { 214 get: "/v1/{name=projects/*/locations/*/googleChannelConfig}" 215 }; 216 option (google.api.method_signature) = "name"; 217 } 218 219 // Update a single GoogleChannelConfig 220 rpc UpdateGoogleChannelConfig(UpdateGoogleChannelConfigRequest) returns (GoogleChannelConfig) { 221 option (google.api.http) = { 222 patch: "/v1/{google_channel_config.name=projects/*/locations/*/googleChannelConfig}" 223 body: "google_channel_config" 224 }; 225 option (google.api.method_signature) = "google_channel_config,update_mask"; 226 } 227} 228 229// The request message for the GetTrigger method. 230message GetTriggerRequest { 231 // Required. The name of the trigger to get. 232 string name = 1 [ 233 (google.api.field_behavior) = REQUIRED, 234 (google.api.resource_reference) = { 235 type: "eventarc.googleapis.com/Trigger" 236 } 237 ]; 238} 239 240// The request message for the ListTriggers method. 241message ListTriggersRequest { 242 // Required. The parent collection to list triggers on. 243 string parent = 1 [ 244 (google.api.field_behavior) = REQUIRED, 245 (google.api.resource_reference) = { 246 child_type: "eventarc.googleapis.com/Trigger" 247 } 248 ]; 249 250 // The maximum number of triggers to return on each page. 251 // 252 // Note: The service may send fewer. 253 int32 page_size = 2; 254 255 // The page token; provide the value from the `next_page_token` field in a 256 // previous `ListTriggers` call to retrieve the subsequent page. 257 // 258 // When paginating, all other parameters provided to `ListTriggers` must match 259 // the call that provided the page token. 260 string page_token = 3; 261 262 // The sorting order of the resources returned. Value should be a 263 // comma-separated list of fields. The default sorting order is ascending. To 264 // specify descending order for a field, append a `desc` suffix; for example: 265 // `name desc, trigger_id`. 266 string order_by = 4; 267 268 // Filter field. Used to filter the Triggers to be listed. Possible filters 269 // are described in https://google.aip.dev/160. For example, using 270 // "?filter=destination:gke" would list only Triggers with a gke destination. 271 string filter = 5; 272} 273 274// The response message for the `ListTriggers` method. 275message ListTriggersResponse { 276 // The requested triggers, up to the number specified in `page_size`. 277 repeated Trigger triggers = 1; 278 279 // A page token that can be sent to `ListTriggers` to request the next page. 280 // If this is empty, then there are no more pages. 281 string next_page_token = 2; 282 283 // Unreachable resources, if any. 284 repeated string unreachable = 3; 285} 286 287// The request message for the CreateTrigger method. 288message CreateTriggerRequest { 289 // Required. The parent collection in which to add this trigger. 290 string parent = 1 [ 291 (google.api.field_behavior) = REQUIRED, 292 (google.api.resource_reference) = { 293 child_type: "eventarc.googleapis.com/Trigger" 294 } 295 ]; 296 297 // Required. The trigger to create. 298 Trigger trigger = 2 [(google.api.field_behavior) = REQUIRED]; 299 300 // Required. The user-provided ID to be assigned to the trigger. 301 string trigger_id = 3 [(google.api.field_behavior) = REQUIRED]; 302 303 // Required. If set, validate the request and preview the review, but do not 304 // post it. 305 bool validate_only = 4 [(google.api.field_behavior) = REQUIRED]; 306} 307 308// The request message for the UpdateTrigger method. 309message UpdateTriggerRequest { 310 // The trigger to be updated. 311 Trigger trigger = 1; 312 313 // The fields to be updated; only fields explicitly provided are updated. 314 // If no field mask is provided, all provided fields in the request are 315 // updated. To update all fields, provide a field mask of "*". 316 google.protobuf.FieldMask update_mask = 2; 317 318 // If set to true, and the trigger is not found, a new trigger will be 319 // created. In this situation, `update_mask` is ignored. 320 bool allow_missing = 3; 321 322 // Required. If set, validate the request and preview the review, but do not 323 // post it. 324 bool validate_only = 4 [(google.api.field_behavior) = REQUIRED]; 325} 326 327// The request message for the DeleteTrigger method. 328message DeleteTriggerRequest { 329 // Required. The name of the trigger to be deleted. 330 string name = 1 [ 331 (google.api.field_behavior) = REQUIRED, 332 (google.api.resource_reference) = { 333 type: "eventarc.googleapis.com/Trigger" 334 } 335 ]; 336 337 // If provided, the trigger will only be deleted if the etag matches the 338 // current etag on the resource. 339 string etag = 2; 340 341 // If set to true, and the trigger is not found, the request will succeed 342 // but no action will be taken on the server. 343 bool allow_missing = 3; 344 345 // Required. If set, validate the request and preview the review, but do not 346 // post it. 347 bool validate_only = 4 [(google.api.field_behavior) = REQUIRED]; 348} 349 350// The request message for the GetChannel method. 351message GetChannelRequest { 352 // Required. The name of the channel to get. 353 string name = 1 [ 354 (google.api.field_behavior) = REQUIRED, 355 (google.api.resource_reference) = { 356 type: "eventarc.googleapis.com/Channel" 357 } 358 ]; 359} 360 361// The request message for the ListChannels method. 362message ListChannelsRequest { 363 // Required. The parent collection to list channels on. 364 string parent = 1 [ 365 (google.api.field_behavior) = REQUIRED, 366 (google.api.resource_reference) = { 367 child_type: "eventarc.googleapis.com/Channel" 368 } 369 ]; 370 371 // The maximum number of channels to return on each page. 372 // 373 // Note: The service may send fewer. 374 int32 page_size = 2; 375 376 // The page token; provide the value from the `next_page_token` field in a 377 // previous `ListChannels` call to retrieve the subsequent page. 378 // 379 // When paginating, all other parameters provided to `ListChannels` must 380 // match the call that provided the page token. 381 string page_token = 3; 382 383 // The sorting order of the resources returned. Value should be a 384 // comma-separated list of fields. The default sorting order is ascending. To 385 // specify descending order for a field, append a `desc` suffix; for example: 386 // `name desc, channel_id`. 387 string order_by = 4; 388} 389 390// The response message for the `ListChannels` method. 391message ListChannelsResponse { 392 // The requested channels, up to the number specified in `page_size`. 393 repeated Channel channels = 1; 394 395 // A page token that can be sent to `ListChannels` to request the next page. 396 // If this is empty, then there are no more pages. 397 string next_page_token = 2; 398 399 // Unreachable resources, if any. 400 repeated string unreachable = 3; 401} 402 403// The request message for the CreateChannel method. 404message CreateChannelRequest { 405 // Required. The parent collection in which to add this channel. 406 string parent = 1 [ 407 (google.api.field_behavior) = REQUIRED, 408 (google.api.resource_reference) = { 409 child_type: "eventarc.googleapis.com/Channel" 410 } 411 ]; 412 413 // Required. The channel to create. 414 Channel channel = 2 [(google.api.field_behavior) = REQUIRED]; 415 416 // Required. The user-provided ID to be assigned to the channel. 417 string channel_id = 3 [(google.api.field_behavior) = REQUIRED]; 418 419 // Required. If set, validate the request and preview the review, but do not 420 // post it. 421 bool validate_only = 4 [(google.api.field_behavior) = REQUIRED]; 422} 423 424// The request message for the UpdateChannel method. 425message UpdateChannelRequest { 426 // The channel to be updated. 427 Channel channel = 1; 428 429 // The fields to be updated; only fields explicitly provided are updated. 430 // If no field mask is provided, all provided fields in the request are 431 // updated. To update all fields, provide a field mask of "*". 432 google.protobuf.FieldMask update_mask = 2; 433 434 // Required. If set, validate the request and preview the review, but do not 435 // post it. 436 bool validate_only = 3 [(google.api.field_behavior) = REQUIRED]; 437} 438 439// The request message for the DeleteChannel method. 440message DeleteChannelRequest { 441 // Required. The name of the channel to be deleted. 442 string name = 1 [ 443 (google.api.field_behavior) = REQUIRED, 444 (google.api.resource_reference) = { 445 type: "eventarc.googleapis.com/Channel" 446 } 447 ]; 448 449 // Required. If set, validate the request and preview the review, but do not 450 // post it. 451 bool validate_only = 2 [(google.api.field_behavior) = REQUIRED]; 452} 453 454// The request message for the GetProvider method. 455message GetProviderRequest { 456 // Required. The name of the provider to get. 457 string name = 1 [ 458 (google.api.field_behavior) = REQUIRED, 459 (google.api.resource_reference) = { 460 type: "eventarc.googleapis.com/Provider" 461 } 462 ]; 463} 464 465// The request message for the ListProviders method. 466message ListProvidersRequest { 467 // Required. The parent of the provider to get. 468 string parent = 1 [ 469 (google.api.field_behavior) = REQUIRED, 470 (google.api.resource_reference) = { 471 child_type: "eventarc.googleapis.com/Provider" 472 } 473 ]; 474 475 // The maximum number of providers to return on each page. 476 int32 page_size = 2; 477 478 // The page token; provide the value from the `next_page_token` field in a 479 // previous `ListProviders` call to retrieve the subsequent page. 480 // 481 // When paginating, all other parameters provided to `ListProviders` must 482 // match the call that provided the page token. 483 string page_token = 3; 484 485 // The sorting order of the resources returned. Value should be a 486 // comma-separated list of fields. The default sorting oder is ascending. To 487 // specify descending order for a field, append a `desc` suffix; for example: 488 // `name desc, _id`. 489 string order_by = 4; 490 491 // The filter field that the list request will filter on. 492 string filter = 5; 493} 494 495// The response message for the `ListProviders` method. 496message ListProvidersResponse { 497 // The requested providers, up to the number specified in `page_size`. 498 repeated Provider providers = 1; 499 500 // A page token that can be sent to `ListProviders` to request the next page. 501 // If this is empty, then there are no more pages. 502 string next_page_token = 2; 503 504 // Unreachable resources, if any. 505 repeated string unreachable = 3; 506} 507 508// The request message for the GetChannelConnection method. 509message GetChannelConnectionRequest { 510 // Required. The name of the channel connection to get. 511 string name = 1 [ 512 (google.api.field_behavior) = REQUIRED, 513 (google.api.resource_reference) = { 514 type: "eventarc.googleapis.com/ChannelConnection" 515 } 516 ]; 517} 518 519// The request message for the ListChannelConnections method. 520message ListChannelConnectionsRequest { 521 // Required. The parent collection from which to list channel connections. 522 string parent = 1 [ 523 (google.api.field_behavior) = REQUIRED, 524 (google.api.resource_reference) = { 525 child_type: "eventarc.googleapis.com/ChannelConnection" 526 } 527 ]; 528 529 // The maximum number of channel connections to return on each page. 530 // 531 // Note: The service may send fewer responses. 532 int32 page_size = 2; 533 534 // The page token; provide the value from the `next_page_token` field in a 535 // previous `ListChannelConnections` call to retrieve the subsequent page. 536 // 537 // When paginating, all other parameters provided to `ListChannelConnetions` 538 // match the call that provided the page token. 539 string page_token = 3; 540} 541 542// The response message for the `ListChannelConnections` method. 543message ListChannelConnectionsResponse { 544 // The requested channel connections, up to the number specified in 545 // `page_size`. 546 repeated ChannelConnection channel_connections = 1; 547 548 // A page token that can be sent to `ListChannelConnections` to request the 549 // next page. 550 // If this is empty, then there are no more pages. 551 string next_page_token = 2; 552 553 // Unreachable resources, if any. 554 repeated string unreachable = 3; 555} 556 557// The request message for the CreateChannelConnection method. 558message CreateChannelConnectionRequest { 559 // Required. The parent collection in which to add this channel connection. 560 string parent = 1 [ 561 (google.api.field_behavior) = REQUIRED, 562 (google.api.resource_reference) = { 563 child_type: "eventarc.googleapis.com/ChannelConnection" 564 } 565 ]; 566 567 // Required. Channel connection to create. 568 ChannelConnection channel_connection = 2 [(google.api.field_behavior) = REQUIRED]; 569 570 // Required. The user-provided ID to be assigned to the channel connection. 571 string channel_connection_id = 3 [(google.api.field_behavior) = REQUIRED]; 572} 573 574// The request message for the DeleteChannelConnection method. 575message DeleteChannelConnectionRequest { 576 // Required. The name of the channel connection to delete. 577 string name = 1 [ 578 (google.api.field_behavior) = REQUIRED, 579 (google.api.resource_reference) = { 580 type: "eventarc.googleapis.com/ChannelConnection" 581 } 582 ]; 583} 584 585// The request message for the UpdateGoogleChannelConfig method. 586message UpdateGoogleChannelConfigRequest { 587 // Required. The config to be updated. 588 GoogleChannelConfig google_channel_config = 1 [(google.api.field_behavior) = REQUIRED]; 589 590 // The fields to be updated; only fields explicitly provided are updated. 591 // If no field mask is provided, all provided fields in the request are 592 // updated. To update all fields, provide a field mask of "*". 593 google.protobuf.FieldMask update_mask = 2; 594} 595 596// The request message for the GetGoogleChannelConfig method. 597message GetGoogleChannelConfigRequest { 598 // Required. The name of the config to get. 599 string name = 1 [ 600 (google.api.field_behavior) = REQUIRED, 601 (google.api.resource_reference) = { 602 type: "eventarc.googleapis.com/GoogleChannelConfig" 603 } 604 ]; 605} 606 607// Represents the metadata of the long-running operation. 608message OperationMetadata { 609 // Output only. The time the operation was created. 610 google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 611 612 // Output only. The time the operation finished running. 613 google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 614 615 // Output only. Server-defined resource path for the target of the operation. 616 string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 617 618 // Output only. Name of the verb executed by the operation. 619 string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 620 621 // Output only. Human-readable status of the operation, if any. 622 string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 623 624 // Output only. Identifies whether the user has requested cancellation 625 // of the operation. Operations that have successfully been cancelled 626 // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, 627 // corresponding to `Code.CANCELLED`. 628 bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 629 630 // Output only. API version used to start the operation. 631 string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 632} 633