This repository has been archived by the owner on Jul 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update gapic-generator-java with mock service generation fixes (#…
…249) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 457524730 Source-Link: googleapis/googleapis@917e7f2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2497f9a069d3f6b2d6810d5a4e239cda1e7e5a39 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjQ5N2Y5YTA2OWQzZjZiMmQ2ODEwZDVhNGUyMzljZGExZTdlNWEzOSJ9
- Loading branch information
1 parent
2a5c691
commit 41f6804
Showing
88 changed files
with
3,632 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
41 changes: 41 additions & 0 deletions
41
...om/google/cloud/gkehub/v1alpha2/gkehubclient/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,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.gkehub.v1alpha2.samples; | ||
|
||
// [START gkehub_v1alpha2_generated_gkehubclient_create_setcredentialsprovider_sync] | ||
import com.google.api.gax.core.FixedCredentialsProvider; | ||
import com.google.cloud.gkehub.v1alpha2.GkeHubClient; | ||
import com.google.cloud.gkehub.v1alpha2.GkeHubSettings; | ||
import com.google.cloud.gkehub.v1alpha2.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 for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
GkeHubSettings gkeHubSettings = | ||
GkeHubSettings.newBuilder() | ||
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) | ||
.build(); | ||
GkeHubClient gkeHubClient = GkeHubClient.create(gkeHubSettings); | ||
} | ||
} | ||
// [END gkehub_v1alpha2_generated_gkehubclient_create_setcredentialsprovider_sync] |
40 changes: 40 additions & 0 deletions
40
...m/google/cloud/gkehub/v1alpha2/gkehubclient/create/SyncCreateSetCredentialsProvider1.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,40 @@ | ||
/* | ||
* 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.gkehub.v1alpha2.samples; | ||
|
||
// [START gkehub_v1alpha2_generated_gkehubclient_create_setcredentialsprovider1_sync] | ||
import com.google.cloud.gkehub.v1alpha2.GkeHubClient; | ||
import com.google.cloud.gkehub.v1alpha2.GkeHubSettings; | ||
|
||
public class SyncCreateSetCredentialsProvider1 { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateSetCredentialsProvider1(); | ||
} | ||
|
||
public static void syncCreateSetCredentialsProvider1() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
GkeHubSettings gkeHubSettings = | ||
GkeHubSettings.newBuilder() | ||
.setTransportChannelProvider( | ||
GkeHubSettings.defaultHttpJsonTransportProviderBuilder().build()) | ||
.build(); | ||
GkeHubClient gkeHubClient = GkeHubClient.create(gkeHubSettings); | ||
} | ||
} | ||
// [END gkehub_v1alpha2_generated_gkehubclient_create_setcredentialsprovider1_sync] |
37 changes: 37 additions & 0 deletions
37
...generated/com/google/cloud/gkehub/v1alpha2/gkehubclient/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,37 @@ | ||
/* | ||
* 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.gkehub.v1alpha2.samples; | ||
|
||
// [START gkehub_v1alpha2_generated_gkehubclient_create_setendpoint_sync] | ||
import com.google.cloud.gkehub.v1alpha2.GkeHubClient; | ||
import com.google.cloud.gkehub.v1alpha2.GkeHubSettings; | ||
import com.google.cloud.gkehub.v1alpha2.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 for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
GkeHubSettings gkeHubSettings = GkeHubSettings.newBuilder().setEndpoint(myEndpoint).build(); | ||
GkeHubClient gkeHubClient = GkeHubClient.create(gkeHubSettings); | ||
} | ||
} | ||
// [END gkehub_v1alpha2_generated_gkehubclient_create_setendpoint_sync] |
49 changes: 49 additions & 0 deletions
49
...com/google/cloud/gkehub/v1alpha2/gkehubclient/createmembership/AsyncCreateMembership.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,49 @@ | ||
/* | ||
* 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.gkehub.v1alpha2.samples; | ||
|
||
// [START gkehub_v1alpha2_generated_gkehubclient_createmembership_async] | ||
import com.google.api.core.ApiFuture; | ||
import com.google.cloud.gkehub.v1alpha2.CreateMembershipRequest; | ||
import com.google.cloud.gkehub.v1alpha2.GkeHubClient; | ||
import com.google.cloud.gkehub.v1alpha2.LocationName; | ||
import com.google.cloud.gkehub.v1alpha2.Membership; | ||
import com.google.longrunning.Operation; | ||
|
||
public class AsyncCreateMembership { | ||
|
||
public static void main(String[] args) throws Exception { | ||
asyncCreateMembership(); | ||
} | ||
|
||
public static void asyncCreateMembership() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (GkeHubClient gkeHubClient = GkeHubClient.create()) { | ||
CreateMembershipRequest request = | ||
CreateMembershipRequest.newBuilder() | ||
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) | ||
.setMembershipId("membershipId517665681") | ||
.setResource(Membership.newBuilder().build()) | ||
.build(); | ||
ApiFuture<Operation> future = gkeHubClient.createMembershipCallable().futureCall(request); | ||
// Do something. | ||
Operation response = future.get(); | ||
} | ||
} | ||
} | ||
// [END gkehub_v1alpha2_generated_gkehubclient_createmembership_async] |
50 changes: 50 additions & 0 deletions
50
.../google/cloud/gkehub/v1alpha2/gkehubclient/createmembership/AsyncCreateMembershipLRO.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,50 @@ | ||
/* | ||
* 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.gkehub.v1alpha2.samples; | ||
|
||
// [START gkehub_v1alpha2_generated_gkehubclient_createmembership_lro_async] | ||
import com.google.api.gax.longrunning.OperationFuture; | ||
import com.google.cloud.gkehub.v1alpha2.CreateMembershipRequest; | ||
import com.google.cloud.gkehub.v1alpha2.GkeHubClient; | ||
import com.google.cloud.gkehub.v1alpha2.LocationName; | ||
import com.google.cloud.gkehub.v1alpha2.Membership; | ||
import com.google.cloud.gkehub.v1alpha2.OperationMetadata; | ||
|
||
public class AsyncCreateMembershipLRO { | ||
|
||
public static void main(String[] args) throws Exception { | ||
asyncCreateMembershipLRO(); | ||
} | ||
|
||
public static void asyncCreateMembershipLRO() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (GkeHubClient gkeHubClient = GkeHubClient.create()) { | ||
CreateMembershipRequest request = | ||
CreateMembershipRequest.newBuilder() | ||
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) | ||
.setMembershipId("membershipId517665681") | ||
.setResource(Membership.newBuilder().build()) | ||
.build(); | ||
OperationFuture<Membership, OperationMetadata> future = | ||
gkeHubClient.createMembershipOperationCallable().futureCall(request); | ||
// Do something. | ||
Membership response = future.get(); | ||
} | ||
} | ||
} | ||
// [END gkehub_v1alpha2_generated_gkehubclient_createmembership_lro_async] |
45 changes: 45 additions & 0 deletions
45
.../com/google/cloud/gkehub/v1alpha2/gkehubclient/createmembership/SyncCreateMembership.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,45 @@ | ||
/* | ||
* 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.gkehub.v1alpha2.samples; | ||
|
||
// [START gkehub_v1alpha2_generated_gkehubclient_createmembership_sync] | ||
import com.google.cloud.gkehub.v1alpha2.CreateMembershipRequest; | ||
import com.google.cloud.gkehub.v1alpha2.GkeHubClient; | ||
import com.google.cloud.gkehub.v1alpha2.LocationName; | ||
import com.google.cloud.gkehub.v1alpha2.Membership; | ||
|
||
public class SyncCreateMembership { | ||
|
||
public static void main(String[] args) throws Exception { | ||
syncCreateMembership(); | ||
} | ||
|
||
public static void syncCreateMembership() throws Exception { | ||
// This snippet has been automatically generated for illustrative purposes only. | ||
// It may require modifications to work in your environment. | ||
try (GkeHubClient gkeHubClient = GkeHubClient.create()) { | ||
CreateMembershipRequest request = | ||
CreateMembershipRequest.newBuilder() | ||
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) | ||
.setMembershipId("membershipId517665681") | ||
.setResource(Membership.newBuilder().build()) | ||
.build(); | ||
Membership response = gkeHubClient.createMembershipAsync(request).get(); | ||
} | ||
} | ||
} | ||
// [END gkehub_v1alpha2_generated_gkehubclient_createmembership_sync] |
Oops, something went wrong.