registration_service.proto 23 KB

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