-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: regenerate java-gke-connect-gateway generated samples (#8569)
- Loading branch information
Showing
27 changed files
with
686 additions
and
813 deletions.
There are no files selected for viewing
84 changes: 0 additions & 84 deletions
84
java-assured-workloads/samples/install-without-bom/pom.xml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...connect/gateway/v1beta1/gatewayserviceclient/create/SyncCreateSetCredentialsProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.gkeconnect.gateway.v1beta1.samples; | ||
|
||
// [START gateway_v1beta1_generated_gatewayserviceclient_create_setcredentialsprovider_sync] | ||
import com.google.api.gax.core.FixedCredentialsProvider; | ||
import com.google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient; | ||
import com.google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceSettings; | ||
import com.google.cloud.gkeconnect.gateway.v1beta1.myCredentials; | ||
|
||
public class SyncCreateSetCredentialsProvider { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateSetCredentialsProvider(); | ||
} | ||
|
||
public static void syncCreateSetCredentialsProvider() throws Exception { | ||
// This snippet has been automatically generated and should be regarded as a code template only. | ||
// It will require modifications to work: | ||
// - It may require correct/in-range values for request initialization. | ||
// - It may require specifying regional endpoints when creating the service client as shown in | ||
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library | ||
GatewayServiceSettings gatewayServiceSettings = | ||
GatewayServiceSettings.newBuilder() | ||
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) | ||
.build(); | ||
GatewayServiceClient gatewayServiceClient = GatewayServiceClient.create(gatewayServiceSettings); | ||
} | ||
} | ||
// [END gateway_v1beta1_generated_gatewayserviceclient_create_setcredentialsprovider_sync] |
41 changes: 41 additions & 0 deletions
41
...e/cloud/gkeconnect/gateway/v1beta1/gatewayserviceclient/create/SyncCreateSetEndpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.gkeconnect.gateway.v1beta1.samples; | ||
|
||
// [START gateway_v1beta1_generated_gatewayserviceclient_create_setendpoint_sync] | ||
import com.google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceClient; | ||
import com.google.cloud.gkeconnect.gateway.v1beta1.GatewayServiceSettings; | ||
import com.google.cloud.gkeconnect.gateway.v1beta1.myEndpoint; | ||
|
||
public class SyncCreateSetEndpoint { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateSetEndpoint(); | ||
} | ||
|
||
public static void syncCreateSetEndpoint() throws Exception { | ||
// This snippet has been automatically generated and should be regarded as a code template only. | ||
// It will require modifications to work: | ||
// - It may require correct/in-range values for request initialization. | ||
// - It may require specifying regional endpoints when creating the service client as shown in | ||
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library | ||
GatewayServiceSettings gatewayServiceSettings = | ||
GatewayServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); | ||
GatewayServiceClient gatewayServiceClient = GatewayServiceClient.create(gatewayServiceSettings); | ||
} | ||
} | ||
// [END gateway_v1beta1_generated_gatewayserviceclient_create_setendpoint_sync] |
Oops, something went wrong.