• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /**
18  * A client to Service Directory API
19  *
20  * <p>The interfaces provided are listed below, along with usage samples.
21  *
22  * <p>======================= LookupServiceClient =======================
23  *
24  * <p>Service Description: Service Directory API for looking up service data at runtime.
25  *
26  * <p>Sample for LookupServiceClient:
27  *
28  * <pre>{@code
29  * // This snippet has been automatically generated and should be regarded as a code template only.
30  * // It will require modifications to work:
31  * // - It may require correct/in-range values for request initialization.
32  * // - It may require specifying regional endpoints when creating the service client as shown in
33  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
34  * try (LookupServiceClient lookupServiceClient = LookupServiceClient.create()) {
35  *   ResolveServiceRequest request =
36  *       ResolveServiceRequest.newBuilder()
37  *           .setName(
38  *               ServiceName.of("[PROJECT]", "[LOCATION]", "[NAMESPACE]", "[SERVICE]").toString())
39  *           .setMaxEndpoints(2074789987)
40  *           .setEndpointFilter("endpointFilter-1834249875")
41  *           .build();
42  *   ResolveServiceResponse response = lookupServiceClient.resolveService(request);
43  * }
44  * }</pre>
45  *
46  * <p>======================= RegistrationServiceClient =======================
47  *
48  * <p>Service Description: Service Directory API for registering services. It defines the following
49  * resource model:
50  *
51  * <p>- The API has a collection of [Namespace][google.cloud.servicedirectory.v1.Namespace]
52  * resources, named `projects/&#42;/locations/&#42;/namespaces/&#42;`.
53  *
54  * <p>- Each Namespace has a collection of [Service][google.cloud.servicedirectory.v1.Service]
55  * resources, named `projects/&#42;/locations/&#42;/namespaces/&#42;/services/&#42;`.
56  *
57  * <p>- Each Service has a collection of [Endpoint][google.cloud.servicedirectory.v1.Endpoint]
58  * resources, named
59  * `projects/&#42;/locations/&#42;/namespaces/&#42;/services/&#42;/endpoints/&#42;`.
60  *
61  * <p>Sample for RegistrationServiceClient:
62  *
63  * <pre>{@code
64  * // This snippet has been automatically generated and should be regarded as a code template only.
65  * // It will require modifications to work:
66  * // - It may require correct/in-range values for request initialization.
67  * // - It may require specifying regional endpoints when creating the service client as shown in
68  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
69  * try (RegistrationServiceClient registrationServiceClient = RegistrationServiceClient.create()) {
70  *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
71  *   Namespace namespace = Namespace.newBuilder().build();
72  *   String namespaceId = "namespaceId790852566";
73  *   Namespace response =
74  *       registrationServiceClient.createNamespace(parent, namespace, namespaceId);
75  * }
76  * }</pre>
77  */
78 @Generated("by gapic-generator-java")
79 package com.google.cloud.servicedirectory.v1;
80 
81 import javax.annotation.Generated;
82