1// Copyright 2023 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.apphub.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/apphub/v1/application.proto"; 24import "google/cloud/apphub/v1/service.proto"; 25import "google/cloud/apphub/v1/service_project_attachment.proto"; 26import "google/cloud/apphub/v1/workload.proto"; 27import "google/longrunning/operations.proto"; 28import "google/protobuf/empty.proto"; 29import "google/protobuf/field_mask.proto"; 30import "google/protobuf/timestamp.proto"; 31 32option csharp_namespace = "Google.Cloud.AppHub.V1"; 33option go_package = "cloud.google.com/go/apphub/apiv1/apphubpb;apphubpb"; 34option java_multiple_files = true; 35option java_outer_classname = "ApphubServiceProto"; 36option java_package = "com.google.cloud.apphub.v1"; 37option php_namespace = "Google\\Cloud\\AppHub\\V1"; 38option ruby_package = "Google::Cloud::AppHub::V1"; 39 40// The App Hub API allows you to manage App Hub resources. 41service AppHub { 42 option (google.api.default_host) = "apphub.googleapis.com"; 43 option (google.api.oauth_scopes) = 44 "https://www.googleapis.com/auth/cloud-platform"; 45 46 // Lists a service project attachment for a given service project. You can 47 // call this API from any project to find if it is attached to a host project. 48 rpc LookupServiceProjectAttachment(LookupServiceProjectAttachmentRequest) 49 returns (LookupServiceProjectAttachmentResponse) { 50 option (google.api.http) = { 51 get: "/v1/{name=projects/*/locations/*}:lookupServiceProjectAttachment" 52 }; 53 option (google.api.method_signature) = "name"; 54 } 55 56 // Lists service projects attached to the host project. 57 rpc ListServiceProjectAttachments(ListServiceProjectAttachmentsRequest) 58 returns (ListServiceProjectAttachmentsResponse) { 59 option (google.api.http) = { 60 get: "/v1/{parent=projects/*/locations/*}/serviceProjectAttachments" 61 }; 62 option (google.api.method_signature) = "parent"; 63 } 64 65 // Attaches a service project to the host project. 66 rpc CreateServiceProjectAttachment(CreateServiceProjectAttachmentRequest) 67 returns (google.longrunning.Operation) { 68 option (google.api.http) = { 69 post: "/v1/{parent=projects/*/locations/*}/serviceProjectAttachments" 70 body: "service_project_attachment" 71 }; 72 option (google.api.method_signature) = 73 "parent,service_project_attachment,service_project_attachment_id"; 74 option (google.longrunning.operation_info) = { 75 response_type: "ServiceProjectAttachment" 76 metadata_type: "OperationMetadata" 77 }; 78 } 79 80 // Gets a service project attachment. 81 rpc GetServiceProjectAttachment(GetServiceProjectAttachmentRequest) 82 returns (ServiceProjectAttachment) { 83 option (google.api.http) = { 84 get: "/v1/{name=projects/*/locations/*/serviceProjectAttachments/*}" 85 }; 86 option (google.api.method_signature) = "name"; 87 } 88 89 // Deletes a service project attachment. 90 rpc DeleteServiceProjectAttachment(DeleteServiceProjectAttachmentRequest) 91 returns (google.longrunning.Operation) { 92 option (google.api.http) = { 93 delete: "/v1/{name=projects/*/locations/*/serviceProjectAttachments/*}" 94 }; 95 option (google.api.method_signature) = "name"; 96 option (google.longrunning.operation_info) = { 97 response_type: "google.protobuf.Empty" 98 metadata_type: "OperationMetadata" 99 }; 100 } 101 102 // Detaches a service project from a host project. 103 // You can call this API from any service project without needing access to 104 // the host project that it is attached to. 105 rpc DetachServiceProjectAttachment(DetachServiceProjectAttachmentRequest) 106 returns (DetachServiceProjectAttachmentResponse) { 107 option (google.api.http) = { 108 post: "/v1/{name=projects/*/locations/*}:detachServiceProjectAttachment" 109 body: "*" 110 }; 111 option (google.api.method_signature) = "name"; 112 } 113 114 // Lists Discovered Services that can be added to an Application in a host 115 // project and location. 116 rpc ListDiscoveredServices(ListDiscoveredServicesRequest) 117 returns (ListDiscoveredServicesResponse) { 118 option (google.api.http) = { 119 get: "/v1/{parent=projects/*/locations/*}/discoveredServices" 120 }; 121 option (google.api.method_signature) = "parent"; 122 } 123 124 // Gets a Discovered Service in a host project and location. 125 rpc GetDiscoveredService(GetDiscoveredServiceRequest) 126 returns (DiscoveredService) { 127 option (google.api.http) = { 128 get: "/v1/{name=projects/*/locations/*/discoveredServices/*}" 129 }; 130 option (google.api.method_signature) = "name"; 131 } 132 133 // Lists a Discovered Service in a host project and location, with a 134 // given resource URI. 135 rpc LookupDiscoveredService(LookupDiscoveredServiceRequest) 136 returns (LookupDiscoveredServiceResponse) { 137 option (google.api.http) = { 138 get: "/v1/{parent=projects/*/locations/*}/discoveredServices:lookup" 139 }; 140 option (google.api.method_signature) = "parent,uri"; 141 } 142 143 // Lists Services in an Application. 144 rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { 145 option (google.api.http) = { 146 get: "/v1/{parent=projects/*/locations/*/applications/*}/services" 147 }; 148 option (google.api.method_signature) = "parent"; 149 } 150 151 // Creates a Service in an Application. 152 rpc CreateService(CreateServiceRequest) 153 returns (google.longrunning.Operation) { 154 option (google.api.http) = { 155 post: "/v1/{parent=projects/*/locations/*/applications/*}/services" 156 body: "service" 157 }; 158 option (google.api.method_signature) = "parent,service,service_id"; 159 option (google.longrunning.operation_info) = { 160 response_type: "Service" 161 metadata_type: "OperationMetadata" 162 }; 163 } 164 165 // Gets a Service in an Application. 166 rpc GetService(GetServiceRequest) returns (Service) { 167 option (google.api.http) = { 168 get: "/v1/{name=projects/*/locations/*/applications/*/services/*}" 169 }; 170 option (google.api.method_signature) = "name"; 171 } 172 173 // Updates a Service in an Application. 174 rpc UpdateService(UpdateServiceRequest) 175 returns (google.longrunning.Operation) { 176 option (google.api.http) = { 177 patch: "/v1/{service.name=projects/*/locations/*/applications/*/services/*}" 178 body: "service" 179 }; 180 option (google.api.method_signature) = "service,update_mask"; 181 option (google.longrunning.operation_info) = { 182 response_type: "Service" 183 metadata_type: "OperationMetadata" 184 }; 185 } 186 187 // Deletes a Service from an Application. 188 rpc DeleteService(DeleteServiceRequest) 189 returns (google.longrunning.Operation) { 190 option (google.api.http) = { 191 delete: "/v1/{name=projects/*/locations/*/applications/*/services/*}" 192 }; 193 option (google.api.method_signature) = "name"; 194 option (google.longrunning.operation_info) = { 195 response_type: "google.protobuf.Empty" 196 metadata_type: "OperationMetadata" 197 }; 198 } 199 200 // Lists Discovered Workloads that can be added to an Application in a host 201 // project and location. 202 rpc ListDiscoveredWorkloads(ListDiscoveredWorkloadsRequest) 203 returns (ListDiscoveredWorkloadsResponse) { 204 option (google.api.http) = { 205 get: "/v1/{parent=projects/*/locations/*}/discoveredWorkloads" 206 }; 207 option (google.api.method_signature) = "parent"; 208 } 209 210 // Gets a Discovered Workload in a host project and location. 211 rpc GetDiscoveredWorkload(GetDiscoveredWorkloadRequest) 212 returns (DiscoveredWorkload) { 213 option (google.api.http) = { 214 get: "/v1/{name=projects/*/locations/*/discoveredWorkloads/*}" 215 }; 216 option (google.api.method_signature) = "name"; 217 } 218 219 // Lists a Discovered Workload in a host project and location, with a 220 // given resource URI. 221 rpc LookupDiscoveredWorkload(LookupDiscoveredWorkloadRequest) 222 returns (LookupDiscoveredWorkloadResponse) { 223 option (google.api.http) = { 224 get: "/v1/{parent=projects/*/locations/*}/discoveredWorkloads:lookup" 225 }; 226 option (google.api.method_signature) = "parent,uri"; 227 } 228 229 // Lists Workloads in an Application. 230 rpc ListWorkloads(ListWorkloadsRequest) returns (ListWorkloadsResponse) { 231 option (google.api.http) = { 232 get: "/v1/{parent=projects/*/locations/*/applications/*}/workloads" 233 }; 234 option (google.api.method_signature) = "parent"; 235 } 236 237 // Creates a Workload in an Application. 238 rpc CreateWorkload(CreateWorkloadRequest) 239 returns (google.longrunning.Operation) { 240 option (google.api.http) = { 241 post: "/v1/{parent=projects/*/locations/*/applications/*}/workloads" 242 body: "workload" 243 }; 244 option (google.api.method_signature) = "parent,workload,workload_id"; 245 option (google.longrunning.operation_info) = { 246 response_type: "Workload" 247 metadata_type: "OperationMetadata" 248 }; 249 } 250 251 // Gets a Workload in an Application. 252 rpc GetWorkload(GetWorkloadRequest) returns (Workload) { 253 option (google.api.http) = { 254 get: "/v1/{name=projects/*/locations/*/applications/*/workloads/*}" 255 }; 256 option (google.api.method_signature) = "name"; 257 } 258 259 // Updates a Workload in an Application. 260 rpc UpdateWorkload(UpdateWorkloadRequest) 261 returns (google.longrunning.Operation) { 262 option (google.api.http) = { 263 patch: "/v1/{workload.name=projects/*/locations/*/applications/*/workloads/*}" 264 body: "workload" 265 }; 266 option (google.api.method_signature) = "workload,update_mask"; 267 option (google.longrunning.operation_info) = { 268 response_type: "Workload" 269 metadata_type: "OperationMetadata" 270 }; 271 } 272 273 // Deletes a Workload from an Application. 274 rpc DeleteWorkload(DeleteWorkloadRequest) 275 returns (google.longrunning.Operation) { 276 option (google.api.http) = { 277 delete: "/v1/{name=projects/*/locations/*/applications/*/workloads/*}" 278 }; 279 option (google.api.method_signature) = "name"; 280 option (google.longrunning.operation_info) = { 281 response_type: "google.protobuf.Empty" 282 metadata_type: "OperationMetadata" 283 }; 284 } 285 286 // Lists Applications in a host project and location. 287 rpc ListApplications(ListApplicationsRequest) 288 returns (ListApplicationsResponse) { 289 option (google.api.http) = { 290 get: "/v1/{parent=projects/*/locations/*}/applications" 291 }; 292 option (google.api.method_signature) = "parent"; 293 } 294 295 // Creates an Application in a host project and location. 296 rpc CreateApplication(CreateApplicationRequest) 297 returns (google.longrunning.Operation) { 298 option (google.api.http) = { 299 post: "/v1/{parent=projects/*/locations/*}/applications" 300 body: "application" 301 }; 302 option (google.api.method_signature) = "parent,application,application_id"; 303 option (google.longrunning.operation_info) = { 304 response_type: "Application" 305 metadata_type: "OperationMetadata" 306 }; 307 } 308 309 // Gets an Application in a host project and location. 310 rpc GetApplication(GetApplicationRequest) returns (Application) { 311 option (google.api.http) = { 312 get: "/v1/{name=projects/*/locations/*/applications/*}" 313 }; 314 option (google.api.method_signature) = "name"; 315 } 316 317 // Updates an Application in a host project and location. 318 rpc UpdateApplication(UpdateApplicationRequest) 319 returns (google.longrunning.Operation) { 320 option (google.api.http) = { 321 patch: "/v1/{application.name=projects/*/locations/*/applications/*}" 322 body: "application" 323 }; 324 option (google.api.method_signature) = "application,update_mask"; 325 option (google.longrunning.operation_info) = { 326 response_type: "Application" 327 metadata_type: "OperationMetadata" 328 }; 329 } 330 331 // Deletes an Application in a host project and location. 332 rpc DeleteApplication(DeleteApplicationRequest) 333 returns (google.longrunning.Operation) { 334 option (google.api.http) = { 335 delete: "/v1/{name=projects/*/locations/*/applications/*}" 336 }; 337 option (google.api.method_signature) = "name"; 338 option (google.longrunning.operation_info) = { 339 response_type: "google.protobuf.Empty" 340 metadata_type: "OperationMetadata" 341 }; 342 } 343} 344 345// Request for LookupServiceProjectAttachment. 346message LookupServiceProjectAttachmentRequest { 347 // Required. Service project ID and location to lookup service project 348 // attachment for. Only global location is supported. Expected format: 349 // `projects/{project}/locations/{location}`. 350 string name = 1 [ 351 (google.api.field_behavior) = REQUIRED, 352 (google.api.resource_reference) = { 353 type: "locations.googleapis.com/Location" 354 } 355 ]; 356} 357 358// Response for LookupServiceProjectAttachment. 359message LookupServiceProjectAttachmentResponse { 360 // Service project attachment for a project if exists, empty otherwise. 361 ServiceProjectAttachment service_project_attachment = 1; 362} 363 364// Request for ListServiceProjectAttachments. 365message ListServiceProjectAttachmentsRequest { 366 // Required. Host project ID and location to list service project attachments. 367 // Only global location is supported. Expected format: 368 // `projects/{project}/locations/{location}`. 369 string parent = 1 [ 370 (google.api.field_behavior) = REQUIRED, 371 (google.api.resource_reference) = { 372 child_type: "apphub.googleapis.com/ServiceProjectAttachment" 373 } 374 ]; 375 376 // Optional. Requested page size. Server may return fewer items than 377 // requested. If unspecified, server will pick an appropriate default. 378 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 379 380 // Optional. A token identifying a page of results the server should return. 381 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 382 383 // Optional. Filtering results. 384 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 385 386 // Optional. Hint for how to order the results. 387 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 388} 389 390// Response for ListServiceProjectAttachments. 391message ListServiceProjectAttachmentsResponse { 392 // List of service project attachments. 393 repeated ServiceProjectAttachment service_project_attachments = 1; 394 395 // A token identifying a page of results the server should return. 396 string next_page_token = 2; 397 398 // Locations that could not be reached. 399 repeated string unreachable = 3; 400} 401 402// Request for CreateServiceProjectAttachment. 403message CreateServiceProjectAttachmentRequest { 404 // Required. Host project ID and location to which service project is being 405 // attached. Only global location is supported. Expected format: 406 // `projects/{project}/locations/{location}`. 407 string parent = 1 [ 408 (google.api.field_behavior) = REQUIRED, 409 (google.api.resource_reference) = { 410 child_type: "apphub.googleapis.com/ServiceProjectAttachment" 411 } 412 ]; 413 414 // Required. The service project attachment identifier must contain the 415 // project id of the service project specified in the 416 // service_project_attachment.service_project field. 417 string service_project_attachment_id = 2 418 [(google.api.field_behavior) = REQUIRED]; 419 420 // Required. The resource being created. 421 ServiceProjectAttachment service_project_attachment = 3 422 [(google.api.field_behavior) = REQUIRED]; 423 424 // Optional. An optional request ID to identify requests. Specify a unique 425 // request ID so that if you must retry your request, the server will know to 426 // ignore the request if it has already been completed. The server will 427 // guarantee that for at least 60 minutes since the first request. 428 // 429 // For example, consider a situation where you make an initial request and the 430 // request times out. If you make the request again with the same request 431 // ID, the server can check if original operation with the same request ID 432 // was received, and if so, will ignore the second request. This prevents 433 // clients from accidentally creating duplicate commitments. 434 // 435 // The request ID must be a valid UUID with the exception that zero UUID is 436 // not supported (00000000-0000-0000-0000-000000000000). 437 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 438} 439 440// Request for GetServiceProjectAttachment. 441message GetServiceProjectAttachmentRequest { 442 // Required. Fully qualified name of the service project attachment to 443 // retrieve. Expected format: 444 // `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. 445 string name = 1 [ 446 (google.api.field_behavior) = REQUIRED, 447 (google.api.resource_reference) = { 448 type: "apphub.googleapis.com/ServiceProjectAttachment" 449 } 450 ]; 451} 452 453// Request for DeleteServiceProjectAttachment. 454message DeleteServiceProjectAttachmentRequest { 455 // Required. Fully qualified name of the service project attachment to delete. 456 // Expected format: 457 // `projects/{project}/locations/{location}/serviceProjectAttachments/{serviceProjectAttachment}`. 458 string name = 1 [ 459 (google.api.field_behavior) = REQUIRED, 460 (google.api.resource_reference) = { 461 type: "apphub.googleapis.com/ServiceProjectAttachment" 462 } 463 ]; 464 465 // Optional. An optional request ID to identify requests. Specify a unique 466 // request ID so that if you must retry your request, the server will know to 467 // ignore the request if it has already been completed. The server will 468 // guarantee that for at least 60 minutes after the first request. 469 // 470 // For example, consider a situation where you make an initial request and the 471 // request times out. If you make the request again with the same request 472 // ID, the server can check if original operation with the same request ID 473 // was received, and if so, will ignore the second request. This prevents 474 // clients from accidentally creating duplicate commitments. 475 // 476 // The request ID must be a valid UUID with the exception that zero UUID is 477 // not supported (00000000-0000-0000-0000-000000000000). 478 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 479} 480 481// Request for DetachServiceProjectAttachment. 482message DetachServiceProjectAttachmentRequest { 483 // Required. Service project id and location to detach from a host project. 484 // Only global location is supported. Expected format: 485 // `projects/{project}/locations/{location}`. 486 string name = 1 [ 487 (google.api.field_behavior) = REQUIRED, 488 (google.api.resource_reference) = { 489 type: "locations.googleapis.com/Location" 490 } 491 ]; 492} 493 494// Response for DetachServiceProjectAttachment. 495message DetachServiceProjectAttachmentResponse {} 496 497// Request for ListServices. 498message ListServicesRequest { 499 // Required. Fully qualified name of the parent Application to list Services 500 // for. Expected format: 501 // `projects/{project}/locations/{location}/applications/{application}`. 502 string parent = 1 [ 503 (google.api.field_behavior) = REQUIRED, 504 (google.api.resource_reference) = { 505 child_type: "apphub.googleapis.com/Service" 506 } 507 ]; 508 509 // Optional. Requested page size. Server may return fewer items than 510 // requested. If unspecified, server will pick an appropriate default. 511 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 512 513 // Optional. A token identifying a page of results the server should return. 514 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 515 516 // Optional. Filtering results 517 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 518 519 // Optional. Hint for how to order the results 520 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 521} 522 523// Response for ListServices. 524message ListServicesResponse { 525 // List of Services. 526 repeated Service services = 1; 527 528 // A token identifying a page of results the server should return. 529 string next_page_token = 2; 530 531 // Locations that could not be reached. 532 repeated string unreachable = 3; 533} 534 535// Request for ListDiscoveredServices. 536message ListDiscoveredServicesRequest { 537 // Required. Project and location to list Discovered Services on. 538 // Expected format: `projects/{project}/locations/{location}`. 539 string parent = 1 [ 540 (google.api.field_behavior) = REQUIRED, 541 (google.api.resource_reference) = { 542 child_type: "apphub.googleapis.com/DiscoveredService" 543 } 544 ]; 545 546 // Optional. Requested page size. Server may return fewer items than 547 // requested. If unspecified, server will pick an appropriate default. 548 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 549 550 // Optional. A token identifying a page of results the server should return. 551 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 552 553 // Optional. Filtering results. 554 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 555 556 // Optional. Hint for how to order the results. 557 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 558} 559 560// Response for ListDiscoveredServices. 561message ListDiscoveredServicesResponse { 562 // List of Discovered Services. 563 repeated DiscoveredService discovered_services = 1; 564 565 // A token identifying a page of results the server should return. 566 string next_page_token = 2; 567 568 // Locations that could not be reached. 569 repeated string unreachable = 3; 570} 571 572// Request for CreateService. 573message CreateServiceRequest { 574 // Required. Fully qualified name of the parent Application to create the 575 // Service in. Expected format: 576 // `projects/{project}/locations/{location}/applications/{application}`. 577 string parent = 1 [ 578 (google.api.field_behavior) = REQUIRED, 579 (google.api.resource_reference) = { 580 child_type: "apphub.googleapis.com/Service" 581 } 582 ]; 583 584 // Required. The Service identifier. 585 // Must contain only lowercase letters, numbers 586 // or hyphens, with the first character a letter, the last a letter or a 587 // number, and a 63 character maximum. 588 string service_id = 2 [(google.api.field_behavior) = REQUIRED]; 589 590 // Required. The resource being created. 591 Service service = 3 [(google.api.field_behavior) = REQUIRED]; 592 593 // Optional. An optional request ID to identify requests. Specify a unique 594 // request ID so that if you must retry your request, the server will know to 595 // ignore the request if it has already been completed. The server will 596 // guarantee that for at least 60 minutes since the first request. 597 // 598 // For example, consider a situation where you make an initial request and the 599 // request times out. If you make the request again with the same request 600 // ID, the server can check if original operation with the same request ID 601 // was received, and if so, will ignore the second request. This prevents 602 // clients from accidentally creating duplicate commitments. 603 // 604 // The request ID must be a valid UUID with the exception that zero UUID is 605 // not supported (00000000-0000-0000-0000-000000000000). 606 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 607} 608 609// Request for GetService. 610message GetServiceRequest { 611 // Required. Fully qualified name of the Service to fetch. 612 // Expected format: 613 // `projects/{project}/locations/{location}/applications/{application}/services/{service}`. 614 string name = 1 [ 615 (google.api.field_behavior) = REQUIRED, 616 (google.api.resource_reference) = { type: "apphub.googleapis.com/Service" } 617 ]; 618} 619 620// Request for GetDiscoveredService. 621message GetDiscoveredServiceRequest { 622 // Required. Fully qualified name of the Discovered Service to fetch. 623 // Expected format: 624 // `projects/{project}/locations/{location}/discoveredServices/{discoveredService}`. 625 string name = 1 [ 626 (google.api.field_behavior) = REQUIRED, 627 (google.api.resource_reference) = { 628 type: "apphub.googleapis.com/DiscoveredService" 629 } 630 ]; 631} 632 633// Request for LookupDiscoveredService. 634message LookupDiscoveredServiceRequest { 635 // Required. Host project ID and location to lookup Discovered Service in. 636 // Expected format: `projects/{project}/locations/{location}`. 637 string parent = 1 [ 638 (google.api.field_behavior) = REQUIRED, 639 (google.api.resource_reference) = { 640 child_type: "apphub.googleapis.com/DiscoveredService" 641 } 642 ]; 643 644 // Required. Resource URI to find DiscoveredService for. 645 // Accepts both project number and project ID and does translation when 646 // needed. 647 string uri = 2 [(google.api.field_behavior) = REQUIRED]; 648} 649 650// Response for LookupDiscoveredService. 651message LookupDiscoveredServiceResponse { 652 // Discovered Service if exists, empty otherwise. 653 DiscoveredService discovered_service = 1; 654} 655 656// Request for UpdateService. 657message UpdateServiceRequest { 658 // Required. Field mask is used to specify the fields to be overwritten in the 659 // Service resource by the update. 660 // The fields specified in the update_mask are relative to the resource, not 661 // the full request. 662 // The API changes the values of the fields as specified in the update_mask. 663 // The API ignores the values of all fields not covered by the update_mask. 664 // You can also unset a field by not specifying it in the updated message, but 665 // adding the field to the mask. This clears whatever value the field 666 // previously had. 667 google.protobuf.FieldMask update_mask = 1 668 [(google.api.field_behavior) = REQUIRED]; 669 670 // Required. The resource being updated. 671 Service service = 2 [(google.api.field_behavior) = REQUIRED]; 672 673 // Optional. An optional request ID to identify requests. Specify a unique 674 // request ID so that if you must retry your request, the server will know to 675 // ignore the request if it has already been completed. The server will 676 // guarantee that for at least 60 minutes since the first request. 677 // 678 // For example, consider a situation where you make an initial request and the 679 // request times out. If you make the request again with the same request 680 // ID, the server can check if original operation with the same request ID 681 // was received, and if so, will ignore the second request. This prevents 682 // clients from accidentally creating duplicate commitments. 683 // 684 // The request ID must be a valid UUID with the exception that zero UUID is 685 // not supported (00000000-0000-0000-0000-000000000000). 686 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 687} 688 689// Request for DeleteService. 690message DeleteServiceRequest { 691 // Required. Fully qualified name of the Service to delete from an 692 // Application. Expected format: 693 // `projects/{project}/locations/{location}/applications/{application}/services/{service}`. 694 string name = 1 [ 695 (google.api.field_behavior) = REQUIRED, 696 (google.api.resource_reference) = { type: "apphub.googleapis.com/Service" } 697 ]; 698 699 // Optional. An optional request ID to identify requests. Specify a unique 700 // request ID so that if you must retry your request, the server will know to 701 // ignore the request if it has already been completed. The server will 702 // guarantee that for at least 60 minutes after the first request. 703 // 704 // For example, consider a situation where you make an initial request and the 705 // request times out. If you make the request again with the same request 706 // ID, the server can check if original operation with the same request ID 707 // was received, and if so, will ignore the second request. This prevents 708 // clients from accidentally creating duplicate commitments. 709 // 710 // The request ID must be a valid UUID with the exception that zero UUID is 711 // not supported (00000000-0000-0000-0000-000000000000). 712 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 713} 714 715// Request for ListApplications. 716message ListApplicationsRequest { 717 // Required. Project and location to list Applications on. 718 // Expected format: `projects/{project}/locations/{location}`. 719 string parent = 1 [ 720 (google.api.field_behavior) = REQUIRED, 721 (google.api.resource_reference) = { 722 child_type: "apphub.googleapis.com/Application" 723 } 724 ]; 725 726 // Optional. Requested page size. Server may return fewer items than 727 // requested. If unspecified, server will pick an appropriate default. 728 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 729 730 // Optional. A token identifying a page of results the server should return. 731 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 732 733 // Optional. Filtering results. 734 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 735 736 // Optional. Hint for how to order the results. 737 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 738} 739 740// Response for ListApplications. 741message ListApplicationsResponse { 742 // List of Applications. 743 repeated Application applications = 1; 744 745 // A token identifying a page of results the server should return. 746 string next_page_token = 2; 747 748 // Locations that could not be reached. 749 repeated string unreachable = 3; 750} 751 752// Request for CreateApplication. 753message CreateApplicationRequest { 754 // Required. Project and location to create Application in. 755 // Expected format: `projects/{project}/locations/{location}`. 756 string parent = 1 [ 757 (google.api.field_behavior) = REQUIRED, 758 (google.api.resource_reference) = { 759 child_type: "apphub.googleapis.com/Application" 760 } 761 ]; 762 763 // Required. The Application identifier. 764 // Must contain only lowercase letters, numbers 765 // or hyphens, with the first character a letter, the last a letter or a 766 // number, and a 63 character maximum. 767 string application_id = 2 [(google.api.field_behavior) = REQUIRED]; 768 769 // Required. The resource being created 770 Application application = 3 [(google.api.field_behavior) = REQUIRED]; 771 772 // Optional. An optional request ID to identify requests. Specify a unique 773 // request ID so that if you must retry your request, the server will know to 774 // ignore the request if it has already been completed. The server will 775 // guarantee that for at least 60 minutes since the first request. 776 // 777 // For example, consider a situation where you make an initial request and the 778 // request times out. If you make the request again with the same request 779 // ID, the server can check if original operation with the same request ID 780 // was received, and if so, will ignore the second request. This prevents 781 // clients from accidentally creating duplicate commitments. 782 // 783 // The request ID must be a valid UUID with the exception that zero UUID is 784 // not supported (00000000-0000-0000-0000-000000000000). 785 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 786} 787 788// Request for GetApplication. 789message GetApplicationRequest { 790 // Required. Fully qualified name of the Application to fetch. 791 // Expected format: 792 // `projects/{project}/locations/{location}/applications/{application}`. 793 string name = 1 [ 794 (google.api.field_behavior) = REQUIRED, 795 (google.api.resource_reference) = { 796 type: "apphub.googleapis.com/Application" 797 } 798 ]; 799} 800 801// Request for UpdateApplication. 802message UpdateApplicationRequest { 803 // Required. Field mask is used to specify the fields to be overwritten in the 804 // Application resource by the update. 805 // The fields specified in the update_mask are relative to the resource, not 806 // the full request. 807 // The API changes the values of the fields as specified in the update_mask. 808 // The API ignores the values of all fields not covered by the update_mask. 809 // You can also unset a field by not specifying it in the updated message, but 810 // adding the field to the mask. This clears whatever value the field 811 // previously had. 812 google.protobuf.FieldMask update_mask = 1 813 [(google.api.field_behavior) = REQUIRED]; 814 815 // Required. The resource being updated. 816 Application application = 2 [(google.api.field_behavior) = REQUIRED]; 817 818 // Optional. An optional request ID to identify requests. Specify a unique 819 // request ID so that if you must retry your request, the server will know to 820 // ignore the request if it has already been completed. The server will 821 // guarantee that for at least 60 minutes since the first request. 822 // 823 // For example, consider a situation where you make an initial request and the 824 // request times out. If you make the request again with the same request 825 // ID, the server can check if original operation with the same request ID 826 // was received, and if so, will ignore the second request. This prevents 827 // clients from accidentally creating duplicate commitments. 828 // 829 // The request ID must be a valid UUID with the exception that zero UUID is 830 // not supported (00000000-0000-0000-0000-000000000000). 831 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 832} 833 834// Request for DeleteApplication. 835message DeleteApplicationRequest { 836 // Required. Fully qualified name of the Application to delete. 837 // Expected format: 838 // `projects/{project}/locations/{location}/applications/{application}`. 839 string name = 1 [ 840 (google.api.field_behavior) = REQUIRED, 841 (google.api.resource_reference) = { 842 type: "apphub.googleapis.com/Application" 843 } 844 ]; 845 846 // Optional. An optional request ID to identify requests. Specify a unique 847 // request ID so that if you must retry your request, the server will know to 848 // ignore the request if it has already been completed. The server will 849 // guarantee that for at least 60 minutes after the first request. 850 // 851 // For example, consider a situation where you make an initial request and the 852 // request times out. If you make the request again with the same request 853 // ID, the server can check if original operation with the same request ID 854 // was received, and if so, will ignore the second request. This prevents 855 // clients from accidentally creating duplicate commitments. 856 // 857 // The request ID must be a valid UUID with the exception that zero UUID is 858 // not supported (00000000-0000-0000-0000-000000000000). 859 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 860} 861 862// Request for ListWorkloads. 863message ListWorkloadsRequest { 864 // Required. Fully qualified name of the parent Application to list Workloads 865 // for. Expected format: 866 // `projects/{project}/locations/{location}/applications/{application}`. 867 string parent = 1 [ 868 (google.api.field_behavior) = REQUIRED, 869 (google.api.resource_reference) = { 870 child_type: "apphub.googleapis.com/Workload" 871 } 872 ]; 873 874 // Optional. Requested page size. Server may return fewer items than 875 // requested. If unspecified, server will pick an appropriate default. 876 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 877 878 // Optional. A token identifying a page of results the server should return. 879 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 880 881 // Optional. Filtering results. 882 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 883 884 // Optional. Hint for how to order the results. 885 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 886} 887 888// Response for ListWorkloads. 889message ListWorkloadsResponse { 890 // List of Workloads. 891 repeated Workload workloads = 1; 892 893 // A token identifying a page of results the server should return. 894 string next_page_token = 2; 895 896 // Locations that could not be reached. 897 repeated string unreachable = 3; 898} 899 900// Request for ListDiscoveredWorkloads. 901message ListDiscoveredWorkloadsRequest { 902 // Required. Project and location to list Discovered Workloads on. 903 // Expected format: `projects/{project}/locations/{location}`. 904 string parent = 1 [ 905 (google.api.field_behavior) = REQUIRED, 906 (google.api.resource_reference) = { 907 child_type: "apphub.googleapis.com/DiscoveredWorkload" 908 } 909 ]; 910 911 // Optional. Requested page size. Server may return fewer items than 912 // requested. If unspecified, server will pick an appropriate default. 913 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 914 915 // Optional. A token identifying a page of results the server should return. 916 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 917 918 // Optional. Filtering results. 919 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 920 921 // Optional. Hint for how to order the results. 922 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 923} 924 925// Response for ListDiscoveredWorkloads. 926message ListDiscoveredWorkloadsResponse { 927 // List of Discovered Workloads. 928 repeated DiscoveredWorkload discovered_workloads = 1; 929 930 // A token identifying a page of results the server should return. 931 string next_page_token = 2; 932 933 // Locations that could not be reached. 934 repeated string unreachable = 3; 935} 936 937// Request for CreateWorkload. 938message CreateWorkloadRequest { 939 // Required. Fully qualified name of the Application to create Workload in. 940 // Expected format: 941 // `projects/{project}/locations/{location}/applications/{application}`. 942 string parent = 1 [ 943 (google.api.field_behavior) = REQUIRED, 944 (google.api.resource_reference) = { 945 child_type: "apphub.googleapis.com/Workload" 946 } 947 ]; 948 949 // Required. The Workload identifier. 950 // Must contain only lowercase letters, numbers 951 // or hyphens, with the first character a letter, the last a letter or a 952 // number, and a 63 character maximum. 953 string workload_id = 2 [(google.api.field_behavior) = REQUIRED]; 954 955 // Required. The resource being created. 956 Workload workload = 3 [(google.api.field_behavior) = REQUIRED]; 957 958 // Optional. An optional request ID to identify requests. Specify a unique 959 // request ID so that if you must retry your request, the server will know to 960 // ignore the request if it has already been completed. The server will 961 // guarantee that for at least 60 minutes since the first request. 962 // 963 // For example, consider a situation where you make an initial request and the 964 // request times out. If you make the request again with the same request 965 // ID, the server can check if original operation with the same request ID 966 // was received, and if so, will ignore the second request. This prevents 967 // clients from accidentally creating duplicate commitments. 968 // 969 // The request ID must be a valid UUID with the exception that zero UUID is 970 // not supported (00000000-0000-0000-0000-000000000000). 971 string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 972} 973 974// Request for GetWorkload. 975message GetWorkloadRequest { 976 // Required. Fully qualified name of the Workload to fetch. 977 // Expected format: 978 // `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. 979 string name = 1 [ 980 (google.api.field_behavior) = REQUIRED, 981 (google.api.resource_reference) = { type: "apphub.googleapis.com/Workload" } 982 ]; 983} 984 985// Request for GetDiscoveredWorkload. 986message GetDiscoveredWorkloadRequest { 987 // Required. Fully qualified name of the Discovered Workload to fetch. 988 // Expected format: 989 // `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWorkload}`. 990 string name = 1 [ 991 (google.api.field_behavior) = REQUIRED, 992 (google.api.resource_reference) = { 993 type: "apphub.googleapis.com/DiscoveredWorkload" 994 } 995 ]; 996} 997 998// Request for LookupDiscoveredWorkload. 999message LookupDiscoveredWorkloadRequest { 1000 // Required. Host project ID and location to lookup Discovered Workload in. 1001 // Expected format: `projects/{project}/locations/{location}`. 1002 string parent = 1 [ 1003 (google.api.field_behavior) = REQUIRED, 1004 (google.api.resource_reference) = { 1005 child_type: "apphub.googleapis.com/DiscoveredWorkload" 1006 } 1007 ]; 1008 1009 // Required. Resource URI to find Discovered Workload for. 1010 // Accepts both project number and project ID and does translation when 1011 // needed. 1012 string uri = 2 [(google.api.field_behavior) = REQUIRED]; 1013} 1014 1015// Response for LookupDiscoveredWorkload. 1016message LookupDiscoveredWorkloadResponse { 1017 // Discovered Workload if exists, empty otherwise. 1018 DiscoveredWorkload discovered_workload = 1; 1019} 1020 1021// Request for UpdateWorkload. 1022message UpdateWorkloadRequest { 1023 // Required. Field mask is used to specify the fields to be overwritten in the 1024 // Workload resource by the update. 1025 // The fields specified in the update_mask are relative to the resource, not 1026 // the full request. 1027 // The API changes the values of the fields as specified in the update_mask. 1028 // The API ignores the values of all fields not covered by the update_mask. 1029 // You can also unset a field by not specifying it in the updated message, but 1030 // adding the field to the mask. This clears whatever value the field 1031 // previously had. 1032 google.protobuf.FieldMask update_mask = 1 1033 [(google.api.field_behavior) = REQUIRED]; 1034 1035 // Required. The resource being updated. 1036 Workload workload = 2 [(google.api.field_behavior) = REQUIRED]; 1037 1038 // Optional. An optional request ID to identify requests. Specify a unique 1039 // request ID so that if you must retry your request, the server will know to 1040 // ignore the request if it has already been completed. The server will 1041 // guarantee that for at least 60 minutes since the first request. 1042 // 1043 // For example, consider a situation where you make an initial request and the 1044 // request times out. If you make the request again with the same request 1045 // ID, the server can check if original operation with the same request ID 1046 // was received, and if so, will ignore the second request. This prevents 1047 // clients from accidentally creating duplicate commitments. 1048 // 1049 // The request ID must be a valid UUID with the exception that zero UUID is 1050 // not supported (00000000-0000-0000-0000-000000000000). 1051 string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 1052} 1053 1054// Request for DeleteWorkload. 1055message DeleteWorkloadRequest { 1056 // Required. Fully qualified name of the Workload to delete from an 1057 // Application. Expected format: 1058 // `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. 1059 string name = 1 [ 1060 (google.api.field_behavior) = REQUIRED, 1061 (google.api.resource_reference) = { type: "apphub.googleapis.com/Workload" } 1062 ]; 1063 1064 // Optional. An optional request ID to identify requests. Specify a unique 1065 // request ID so that if you must retry your request, the server will know to 1066 // ignore the request if it has already been completed. The server will 1067 // guarantee that for at least 60 minutes after the first request. 1068 // 1069 // For example, consider a situation where you make an initial request and the 1070 // request times out. If you make the request again with the same request 1071 // ID, the server can check if original operation with the same request ID 1072 // was received, and if so, will ignore the second request. This prevents 1073 // clients from accidentally creating duplicate commitments. 1074 // 1075 // The request ID must be a valid UUID with the exception that zero UUID is 1076 // not supported (00000000-0000-0000-0000-000000000000). 1077 string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; 1078} 1079 1080// Represents the metadata of the long-running operation. 1081message OperationMetadata { 1082 // Output only. The time the operation was created. 1083 google.protobuf.Timestamp create_time = 1 1084 [(google.api.field_behavior) = OUTPUT_ONLY]; 1085 1086 // Output only. The time the operation finished running. 1087 google.protobuf.Timestamp end_time = 2 1088 [(google.api.field_behavior) = OUTPUT_ONLY]; 1089 1090 // Output only. Server-defined resource path for the target of the operation. 1091 string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 1092 1093 // Output only. Name of the verb executed by the operation. 1094 string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 1095 1096 // Output only. Human-readable status of the operation, if any. 1097 string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 1098 1099 // Output only. Identifies whether the user has requested cancellation 1100 // of the operation. Operations that have been cancelled successfully 1101 // have [Operation.error][] value with a 1102 // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to 1103 // `Code.CANCELLED`. 1104 bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 1105 1106 // Output only. API version used to start the operation. 1107 string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 1108} 1109