Skip to content

Commit f6506b9

Browse files
authored
docs: regenerate java-gke-connect-gateway generated samples (#8569)
1 parent 1582b23 commit f6506b9

File tree

27 files changed

+686
-813
lines changed

27 files changed

+686
-813
lines changed

‎java-assured-workloads/samples/install-without-bom/pom.xml‎

Lines changed: 0 additions & 84 deletions
This file was deleted.

‎java-assured-workloads/samples/pom.xml‎

Lines changed: 0 additions & 56 deletions
This file was deleted.

‎java-assured-workloads/samples/snapshot/pom.xml‎

Lines changed: 0 additions & 83 deletions
This file was deleted.

‎java-assured-workloads/samples/snippets/pom.xml‎

Lines changed: 0 additions & 47 deletions
This file was deleted.

‎java-gke-connect-gateway/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file:
2222
<dependency>
2323
<groupId>com.google.cloud</groupId>
2424
<artifactId>google-cloud-gke-connect-gateway</artifactId>
25-
<version>0.4.5</version>
25+
<version>0.4.6</version>
2626
</dependency>
2727
```
2828

2929
If you are using Gradle without BOM, add this to your dependencies:
3030

3131
```Groovy
32-
implementation 'com.google.cloud:google-cloud-gke-connect-gateway:0.4.5'
32+
implementation 'com.google.cloud:google-cloud-gke-connect-gateway:0.4.6'
3333
```
3434

3535
If you are using SBT, add this to your dependencies:
3636

3737
```Scala
38-
libraryDependencies += "com.google.cloud" % "google-cloud-gke-connect-gateway" % "0.4.5"
38+
libraryDependencies += "com.google.cloud" % "google-cloud-gke-connect-gateway" % "0.4.6"
3939
```
4040

4141
## Authentication
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
package com.google.cloud.gkeconnect.gateway.v1beta1.samples;
18+
19+
// [START gateway_v1beta1_generated_gatewayserviceclient_create_setcredentialsprovider_sync]
20+
import com.google.api.gax.core.FixedCredentialsProvider;
21+
import com.google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient;
22+
import com.google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceSettings;
23+
import com.google.cloud.gkeconnect.gateway.v1beta1.myCredentials;
24+
25+
public class SyncCreateSetCredentialsProvider {
26+
27+
public static void main(String[] args) throws Exception {
28+
syncCreateSetCredentialsProvider();
29+
}
30+
31+
public static void syncCreateSetCredentialsProvider() throws Exception {
32+
// This snippet has been automatically generated and should be regarded as a code template only.
33+
// It will require modifications to work:
34+
// - It may require correct/in-range values for request initialization.
35+
// - It may require specifying regional endpoints when creating the service client as shown in
36+
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
37+
GatewayServiceSettings gatewayServiceSettings =
38+
GatewayServiceSettings.newBuilder()
39+
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
40+
.build();
41+
GatewayServiceClient gatewayServiceClient = GatewayServiceClient.create(gatewayServiceSettings);
42+
}
43+
}
44+
// [END gateway_v1beta1_generated_gatewayserviceclient_create_setcredentialsprovider_sync]
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
package com.google.cloud.gkeconnect.gateway.v1beta1.samples;
18+
19+
// [START gateway_v1beta1_generated_gatewayserviceclient_create_setendpoint_sync]
20+
import com.google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient;
21+
import com.google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceSettings;
22+
import com.google.cloud.gkeconnect.gateway.v1beta1.myEndpoint;
23+
24+
public class SyncCreateSetEndpoint {
25+
26+
public static void main(String[] args) throws Exception {
27+
syncCreateSetEndpoint();
28+
}
29+
30+
public static void syncCreateSetEndpoint() throws Exception {
31+
// This snippet has been automatically generated and should be regarded as a code template only.
32+
// It will require modifications to work:
33+
// - It may require correct/in-range values for request initialization.
34+
// - It may require specifying regional endpoints when creating the service client as shown in
35+
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
36+
GatewayServiceSettings gatewayServiceSettings =
37+
GatewayServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
38+
GatewayServiceClient gatewayServiceClient = GatewayServiceClient.create(gatewayServiceSettings);
39+
}
40+
}
41+
// [END gateway_v1beta1_generated_gatewayserviceclient_create_setendpoint_sync]

0 commit comments

Comments
 (0)