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.servicedirectory.v1beta1; 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/servicedirectory/v1beta1/endpoint.proto"; 24import "google/cloud/servicedirectory/v1beta1/namespace.proto"; 25import "google/cloud/servicedirectory/v1beta1/service.proto"; 26import "google/iam/v1/iam_policy.proto"; 27import "google/iam/v1/policy.proto"; 28import "google/protobuf/empty.proto"; 29import "google/protobuf/field_mask.proto"; 30 31option cc_enable_arenas = true; 32option csharp_namespace = "Google.Cloud.ServiceDirectory.V1Beta1"; 33option go_package = "cloud.google.com/go/servicedirectory/apiv1beta1/servicedirectorypb;servicedirectorypb"; 34option java_multiple_files = true; 35option java_outer_classname = "RegistrationServiceProto"; 36option java_package = "com.google.cloud.servicedirectory.v1beta1"; 37option php_namespace = "Google\\Cloud\\ServiceDirectory\\V1beta1"; 38option ruby_package = "Google::Cloud::ServiceDirectory::V1beta1"; 39 40// Service Directory API for registering services. It defines the following 41// resource model: 42// 43// - The API has a collection of 44// [Namespace][google.cloud.servicedirectory.v1beta1.Namespace] 45// resources, named `projects/*/locations/*/namespaces/*`. 46// 47// - Each Namespace has a collection of 48// [Service][google.cloud.servicedirectory.v1beta1.Service] resources, named 49// `projects/*/locations/*/namespaces/*/services/*`. 50// 51// - Each Service has a collection of 52// [Endpoint][google.cloud.servicedirectory.v1beta1.Endpoint] 53// resources, named 54// `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. 55service RegistrationService { 56 option (google.api.default_host) = "servicedirectory.googleapis.com"; 57 option (google.api.oauth_scopes) = 58 "https://www.googleapis.com/auth/cloud-platform"; 59 60 // Creates a namespace, and returns the new namespace. 61 rpc CreateNamespace(CreateNamespaceRequest) returns (Namespace) { 62 option (google.api.http) = { 63 post: "/v1beta1/{parent=projects/*/locations/*}/namespaces" 64 body: "namespace" 65 }; 66 option (google.api.method_signature) = "parent,namespace,namespace_id"; 67 } 68 69 // Lists all namespaces. 70 rpc ListNamespaces(ListNamespacesRequest) returns (ListNamespacesResponse) { 71 option (google.api.http) = { 72 get: "/v1beta1/{parent=projects/*/locations/*}/namespaces" 73 }; 74 option (google.api.method_signature) = "parent"; 75 } 76 77 // Gets a namespace. 78 rpc GetNamespace(GetNamespaceRequest) returns (Namespace) { 79 option (google.api.http) = { 80 get: "/v1beta1/{name=projects/*/locations/*/namespaces/*}" 81 }; 82 option (google.api.method_signature) = "name"; 83 } 84 85 // Updates a namespace. 86 rpc UpdateNamespace(UpdateNamespaceRequest) returns (Namespace) { 87 option (google.api.http) = { 88 patch: "/v1beta1/{namespace.name=projects/*/locations/*/namespaces/*}" 89 body: "namespace" 90 }; 91 option (google.api.method_signature) = "namespace,update_mask"; 92 } 93 94 // Deletes a namespace. This also deletes all services and endpoints in 95 // the namespace. 96 rpc DeleteNamespace(DeleteNamespaceRequest) returns (google.protobuf.Empty) { 97 option (google.api.http) = { 98 delete: "/v1beta1/{name=projects/*/locations/*/namespaces/*}" 99 }; 100 option (google.api.method_signature) = "name"; 101 } 102 103 // Creates a service, and returns the new service. 104 rpc CreateService(CreateServiceRequest) returns (Service) { 105 option (google.api.http) = { 106 post: "/v1beta1/{parent=projects/*/locations/*/namespaces/*}/services" 107 body: "service" 108 }; 109 option (google.api.method_signature) = "parent,service,service_id"; 110 } 111 112 // Lists all services belonging to a namespace. 113 rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { 114 option (google.api.http) = { 115 get: "/v1beta1/{parent=projects/*/locations/*/namespaces/*}/services" 116 }; 117 option (google.api.method_signature) = "parent"; 118 } 119 120 // Gets a service. 121 rpc GetService(GetServiceRequest) returns (Service) { 122 option (google.api.http) = { 123 get: "/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}" 124 }; 125 option (google.api.method_signature) = "name"; 126 } 127 128 // Updates a service. 129 rpc UpdateService(UpdateServiceRequest) returns (Service) { 130 option (google.api.http) = { 131 patch: "/v1beta1/{service.name=projects/*/locations/*/namespaces/*/services/*}" 132 body: "service" 133 }; 134 option (google.api.method_signature) = "service,update_mask"; 135 } 136 137 // Deletes a service. This also deletes all endpoints associated with 138 // the service. 139 rpc DeleteService(DeleteServiceRequest) returns (google.protobuf.Empty) { 140 option (google.api.http) = { 141 delete: "/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*}" 142 }; 143 option (google.api.method_signature) = "name"; 144 } 145 146 // Creates an endpoint, and returns the new endpoint. 147 rpc CreateEndpoint(CreateEndpointRequest) returns (Endpoint) { 148 option (google.api.http) = { 149 post: "/v1beta1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints" 150 body: "endpoint" 151 }; 152 option (google.api.method_signature) = "parent,endpoint,endpoint_id"; 153 } 154 155 // Lists all endpoints. 156 rpc ListEndpoints(ListEndpointsRequest) returns (ListEndpointsResponse) { 157 option (google.api.http) = { 158 get: "/v1beta1/{parent=projects/*/locations/*/namespaces/*/services/*}/endpoints" 159 }; 160 option (google.api.method_signature) = "parent"; 161 } 162 163 // Gets an endpoint. 164 rpc GetEndpoint(GetEndpointRequest) returns (Endpoint) { 165 option (google.api.http) = { 166 get: "/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}" 167 }; 168 option (google.api.method_signature) = "name"; 169 } 170 171 // Updates an endpoint. 172 rpc UpdateEndpoint(UpdateEndpointRequest) returns (Endpoint) { 173 option (google.api.http) = { 174 patch: "/v1beta1/{endpoint.name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}" 175 body: "endpoint" 176 }; 177 option (google.api.method_signature) = "endpoint,update_mask"; 178 } 179 180 // Deletes an endpoint. 181 rpc DeleteEndpoint(DeleteEndpointRequest) returns (google.protobuf.Empty) { 182 option (google.api.http) = { 183 delete: "/v1beta1/{name=projects/*/locations/*/namespaces/*/services/*/endpoints/*}" 184 }; 185 option (google.api.method_signature) = "name"; 186 } 187 188 // Gets the IAM Policy for a resource 189 rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) 190 returns (google.iam.v1.Policy) { 191 option (google.api.http) = { 192 post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*}:getIamPolicy" 193 body: "*" 194 additional_bindings { 195 post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:getIamPolicy" 196 body: "*" 197 } 198 additional_bindings { 199 post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*/workloads/*}:getIamPolicy" 200 body: "*" 201 } 202 }; 203 } 204 205 // Sets the IAM Policy for a resource 206 rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) 207 returns (google.iam.v1.Policy) { 208 option (google.api.http) = { 209 post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*}:setIamPolicy" 210 body: "*" 211 additional_bindings { 212 post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:setIamPolicy" 213 body: "*" 214 } 215 additional_bindings { 216 post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*/workloads/*}:setIamPolicy" 217 body: "*" 218 } 219 }; 220 } 221 222 // Tests IAM permissions for a resource (namespace, service or 223 // service workload only). 224 rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) 225 returns (google.iam.v1.TestIamPermissionsResponse) { 226 option (google.api.http) = { 227 post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*}:testIamPermissions" 228 body: "*" 229 additional_bindings { 230 post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*/services/*}:testIamPermissions" 231 body: "*" 232 } 233 additional_bindings { 234 post: "/v1beta1/{resource=projects/*/locations/*/namespaces/*/workloads/*}:testIamPermissions" 235 body: "*" 236 } 237 }; 238 } 239} 240 241// The request message for 242// [RegistrationService.CreateNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.CreateNamespace]. 243message CreateNamespaceRequest { 244 // Required. The resource name of the project and location the namespace 245 // will be created in. 246 string parent = 1 [ 247 (google.api.field_behavior) = REQUIRED, 248 (google.api.resource_reference) = { 249 type: "locations.googleapis.com/Location" 250 } 251 ]; 252 253 // Required. The Resource ID must be 1-63 characters long, and comply with 254 // <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>. 255 // Specifically, the name must be 1-63 characters long and match the regular 256 // expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first 257 // character must be a lowercase letter, and all following characters must 258 // be a dash, lowercase letter, or digit, except the last character, which 259 // cannot be a dash. 260 string namespace_id = 2 [(google.api.field_behavior) = REQUIRED]; 261 262 // Required. A namespace with initial fields set. 263 Namespace namespace = 3 [(google.api.field_behavior) = REQUIRED]; 264} 265 266// The request message for 267// [RegistrationService.ListNamespaces][google.cloud.servicedirectory.v1beta1.RegistrationService.ListNamespaces]. 268message ListNamespacesRequest { 269 // Required. The resource name of the project and location whose namespaces 270 // you'd like to list. 271 string parent = 1 [ 272 (google.api.field_behavior) = REQUIRED, 273 (google.api.resource_reference) = { 274 type: "locations.googleapis.com/Location" 275 } 276 ]; 277 278 // Optional. The maximum number of items to return. 279 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 280 281 // Optional. The next_page_token value returned from a previous List request, 282 // if any. 283 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 284 285 // Optional. The filter to list results by. 286 // 287 // General `filter` string syntax: 288 // `<field> <operator> <value> (<logical connector>)` 289 // 290 // * `<field>` can be `name`, `labels.<key>` for map field, or 291 // `attributes.<field>` for attributes field 292 // * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` 293 // means `HAS`, and is roughly the same as `=` 294 // * `<value>` must be the same data type as field 295 // * `<logical connector>` can be `AND`, `OR`, `NOT` 296 // 297 // Examples of valid filters: 298 // 299 // * `labels.owner` returns namespaces that have a label with the key 300 // `owner`, this is the same as `labels:owner` 301 // * `labels.owner=sd` returns namespaces that have key/value `owner=sd` 302 // * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` 303 // returns namespaces that have name that is alphabetically later than the 304 // string, so "namespace-e" is returned but "namespace-a" is not 305 // * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have 306 // `owner` in label key but value is not `sd` AND have key/value `foo=bar` 307 // * `doesnotexist.foo=bar` returns an empty list. Note that namespace 308 // doesn't have a field called "doesnotexist". Since the filter does not 309 // match any namespaces, it returns no results 310 // * `attributes.managed_registration=true` returns namespaces that are 311 // managed by a GCP product or service 312 // 313 // For more information about filtering, see 314 // [API Filtering](https://aip.dev/160). 315 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 316 317 // Optional. The order to list results by. 318 // 319 // General `order_by` string syntax: `<field> (<asc|desc>) (,)` 320 // 321 // * `<field>` allows value: `name` 322 // * `<asc|desc>` ascending or descending order by `<field>`. If this is 323 // left blank, `asc` is used 324 // 325 // Note that an empty `order_by` string results in default order, which is 326 // order by `name` in ascending order. 327 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 328} 329 330// The response message for 331// [RegistrationService.ListNamespaces][google.cloud.servicedirectory.v1beta1.RegistrationService.ListNamespaces]. 332message ListNamespacesResponse { 333 // The list of namespaces. 334 repeated Namespace namespaces = 1; 335 336 // Token to retrieve the next page of results, or empty if there are no 337 // more results in the list. 338 string next_page_token = 2; 339} 340 341// The request message for 342// [RegistrationService.GetNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.GetNamespace]. 343message GetNamespaceRequest { 344 // Required. The name of the namespace to retrieve. 345 string name = 1 [ 346 (google.api.field_behavior) = REQUIRED, 347 (google.api.resource_reference) = { 348 type: "servicedirectory.googleapis.com/Namespace" 349 } 350 ]; 351} 352 353// The request message for 354// [RegistrationService.UpdateNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateNamespace]. 355message UpdateNamespaceRequest { 356 // Required. The updated namespace. 357 Namespace namespace = 1 [(google.api.field_behavior) = REQUIRED]; 358 359 // Required. List of fields to be updated in this request. 360 google.protobuf.FieldMask update_mask = 2 361 [(google.api.field_behavior) = REQUIRED]; 362} 363 364// The request message for 365// [RegistrationService.DeleteNamespace][google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteNamespace]. 366message DeleteNamespaceRequest { 367 // Required. The name of the namespace to delete. 368 string name = 1 [ 369 (google.api.field_behavior) = REQUIRED, 370 (google.api.resource_reference) = { 371 type: "servicedirectory.googleapis.com/Namespace" 372 } 373 ]; 374} 375 376// The request message for 377// [RegistrationService.CreateService][google.cloud.servicedirectory.v1beta1.RegistrationService.CreateService]. 378message CreateServiceRequest { 379 // Required. The resource name of the namespace this service will belong to. 380 string parent = 1 [ 381 (google.api.field_behavior) = REQUIRED, 382 (google.api.resource_reference) = { 383 type: "servicedirectory.googleapis.com/Namespace" 384 } 385 ]; 386 387 // Required. The Resource ID must be 1-63 characters long, and comply with 388 // <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>. 389 // Specifically, the name must be 1-63 characters long and match the regular 390 // expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first 391 // character must be a lowercase letter, and all following characters must 392 // be a dash, lowercase letter, or digit, except the last character, which 393 // cannot be a dash. 394 string service_id = 2 [(google.api.field_behavior) = REQUIRED]; 395 396 // Required. A service with initial fields set. 397 Service service = 3 [(google.api.field_behavior) = REQUIRED]; 398} 399 400// The request message for 401// [RegistrationService.ListServices][google.cloud.servicedirectory.v1beta1.RegistrationService.ListServices]. 402message ListServicesRequest { 403 // Required. The resource name of the namespace whose services you'd 404 // like to list. 405 string parent = 1 [ 406 (google.api.field_behavior) = REQUIRED, 407 (google.api.resource_reference) = { 408 type: "servicedirectory.googleapis.com/Namespace" 409 } 410 ]; 411 412 // Optional. The maximum number of items to return. 413 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 414 415 // Optional. The next_page_token value returned from a previous List request, 416 // if any. 417 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 418 419 // Optional. The filter to list results by. 420 // 421 // General `filter` string syntax: 422 // `<field> <operator> <value> (<logical connector>)` 423 // 424 // * `<field>` can be `name` or `metadata.<key>` for map field 425 // * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` 426 // means `HAS`, and is roughly the same as `=` 427 // * `<value>` must be the same data type as field 428 // * `<logical connector>` can be `AND`, `OR`, `NOT` 429 // 430 // Examples of valid filters: 431 // 432 // * `metadata.owner` returns services that have a metadata with the key 433 // `owner`, this is the same as `metadata:owner` 434 // * `metadata.protocol=gRPC` returns services that have key/value 435 // `protocol=gRPC` 436 // * 437 // `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` 438 // returns services that have name that is alphabetically later than the 439 // string, so "service-e" is returned but "service-a" is not 440 // * `metadata.owner!=sd AND metadata.foo=bar` returns services that have 441 // `owner` in metadata key but value is not `sd` AND have key/value 442 // `foo=bar` 443 // * `doesnotexist.foo=bar` returns an empty list. Note that service 444 // doesn't have a field called "doesnotexist". Since the filter does not 445 // match any services, it returns no results 446 // * `attributes.managed_registration=true` returns services that are 447 // managed 448 // by a GCP product or service 449 // 450 // For more information about filtering, see 451 // [API Filtering](https://aip.dev/160). 452 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 453 454 // Optional. The order to list results by. 455 // 456 // General `order_by` string syntax: `<field> (<asc|desc>) (,)` 457 // 458 // * `<field>` allows value: `name` 459 // * `<asc|desc>` ascending or descending order by `<field>`. If this is 460 // left blank, `asc` is used 461 // 462 // Note that an empty `order_by` string results in default order, which is 463 // order by `name` in ascending order. 464 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 465} 466 467// The response message for 468// [RegistrationService.ListServices][google.cloud.servicedirectory.v1beta1.RegistrationService.ListServices]. 469message ListServicesResponse { 470 // The list of services. 471 repeated Service services = 1; 472 473 // Token to retrieve the next page of results, or empty if there are no 474 // more results in the list. 475 string next_page_token = 2; 476} 477 478// The request message for 479// [RegistrationService.GetService][google.cloud.servicedirectory.v1beta1.RegistrationService.GetService]. 480// This should not be used for looking up a service. Instead, use the `resolve` 481// method as it contains all endpoints and associated metadata. 482message GetServiceRequest { 483 // Required. The name of the service to get. 484 string name = 1 [ 485 (google.api.field_behavior) = REQUIRED, 486 (google.api.resource_reference) = { 487 type: "servicedirectory.googleapis.com/Service" 488 } 489 ]; 490} 491 492// The request message for 493// [RegistrationService.UpdateService][google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateService]. 494message UpdateServiceRequest { 495 // Required. The updated service. 496 Service service = 1 [(google.api.field_behavior) = REQUIRED]; 497 498 // Required. List of fields to be updated in this request. 499 google.protobuf.FieldMask update_mask = 2 500 [(google.api.field_behavior) = REQUIRED]; 501} 502 503// The request message for 504// [RegistrationService.DeleteService][google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteService]. 505message DeleteServiceRequest { 506 // Required. The name of the service to delete. 507 string name = 1 [ 508 (google.api.field_behavior) = REQUIRED, 509 (google.api.resource_reference) = { 510 type: "servicedirectory.googleapis.com/Service" 511 } 512 ]; 513} 514 515// The request message for 516// [RegistrationService.CreateEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.CreateEndpoint]. 517message CreateEndpointRequest { 518 // Required. The resource name of the service that this endpoint provides. 519 string parent = 1 [ 520 (google.api.field_behavior) = REQUIRED, 521 (google.api.resource_reference) = { 522 type: "servicedirectory.googleapis.com/Service" 523 } 524 ]; 525 526 // Required. The Resource ID must be 1-63 characters long, and comply with 527 // <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>. 528 // Specifically, the name must be 1-63 characters long and match the regular 529 // expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first 530 // character must be a lowercase letter, and all following characters must 531 // be a dash, lowercase letter, or digit, except the last character, which 532 // cannot be a dash. 533 string endpoint_id = 2 [(google.api.field_behavior) = REQUIRED]; 534 535 // Required. A endpoint with initial fields set. 536 Endpoint endpoint = 3 [(google.api.field_behavior) = REQUIRED]; 537} 538 539// The request message for 540// [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints]. 541message ListEndpointsRequest { 542 // Required. The resource name of the service whose endpoints you'd like to 543 // list. 544 string parent = 1 [ 545 (google.api.field_behavior) = REQUIRED, 546 (google.api.resource_reference) = { 547 type: "servicedirectory.googleapis.com/Service" 548 } 549 ]; 550 551 // Optional. The maximum number of items to return. 552 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 553 554 // Optional. The next_page_token value returned from a previous List request, 555 // if any. 556 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 557 558 // Optional. The filter to list results by. 559 // 560 // General `filter` string syntax: 561 // `<field> <operator> <value> (<logical connector>)` 562 // 563 // * `<field>` can be `name`, `address`, `port`, `metadata.<key>` for map 564 // field, or `attributes.<field>` for attributes field 565 // * `<operator>` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` 566 // means `HAS`, and is roughly the same as `=` 567 // * `<value>` must be the same data type as field 568 // * `<logical connector>` can be `AND`, `OR`, `NOT` 569 // 570 // Examples of valid filters: 571 // 572 // * `metadata.owner` returns endpoints that have a metadata with the key 573 // `owner`, this is the same as `metadata:owner` 574 // * `metadata.protocol=gRPC` returns endpoints that have key/value 575 // `protocol=gRPC` 576 // * `address=192.108.1.105` returns endpoints that have this address 577 // * `port>8080` returns endpoints that have port number larger than 8080 578 // * 579 // `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` 580 // returns endpoints that have name that is alphabetically later than the 581 // string, so "endpoint-e" is returned but "endpoint-a" is not 582 // * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have 583 // `owner` in metadata key but value is not `sd` AND have key/value 584 // `foo=bar` 585 // * `doesnotexist.foo=bar` returns an empty list. Note that endpoint 586 // doesn't have a field called "doesnotexist". Since the filter does not 587 // match any endpoints, it returns no results 588 // * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_ 589 // IP` returns endpoints with the corresponding kubernetes_resource_type 590 // 591 // For more information about filtering, see 592 // [API Filtering](https://aip.dev/160). 593 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 594 595 // Optional. The order to list results by. 596 // 597 // General `order_by` string syntax: `<field> (<asc|desc>) (,)` 598 // 599 // * `<field>` allows values: `name`, `address`, `port` 600 // * `<asc|desc>` ascending or descending order by `<field>`. If this is 601 // left blank, `asc` is used 602 // 603 // Note that an empty `order_by` string results in default order, which is 604 // order by `name` in ascending order. 605 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 606} 607 608// The response message for 609// [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints]. 610message ListEndpointsResponse { 611 // The list of endpoints. 612 repeated Endpoint endpoints = 1; 613 614 // Token to retrieve the next page of results, or empty if there are no 615 // more results in the list. 616 string next_page_token = 2; 617} 618 619// The request message for 620// [RegistrationService.GetEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.GetEndpoint]. 621// This should not be used to lookup endpoints at runtime. Instead, use 622// the `resolve` method. 623message GetEndpointRequest { 624 // Required. The name of the endpoint to get. 625 string name = 1 [ 626 (google.api.field_behavior) = REQUIRED, 627 (google.api.resource_reference) = { 628 type: "servicedirectory.googleapis.com/Endpoint" 629 } 630 ]; 631} 632 633// The request message for 634// [RegistrationService.UpdateEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.UpdateEndpoint]. 635message UpdateEndpointRequest { 636 // Required. The updated endpoint. 637 Endpoint endpoint = 1 [(google.api.field_behavior) = REQUIRED]; 638 639 // Required. List of fields to be updated in this request. 640 google.protobuf.FieldMask update_mask = 2 641 [(google.api.field_behavior) = REQUIRED]; 642} 643 644// The request message for 645// [RegistrationService.DeleteEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.DeleteEndpoint]. 646message DeleteEndpointRequest { 647 // Required. The name of the endpoint to delete. 648 string name = 1 [ 649 (google.api.field_behavior) = REQUIRED, 650 (google.api.resource_reference) = { 651 type: "servicedirectory.googleapis.com/Endpoint" 652 } 653 ]; 654} 655