Skip to content

Commit f9bbbca

Browse files
fix!: Removed resource definition of Compute API resources and incorrect resource references that used them (#58)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 459444490 Source-Link: googleapis/googleapis@24f0736 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cd5440ba0eed0fc86bc3a510ba5a1dfba82c82b0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2Q1NDQwYmEwZWVkMGZjODZiYzNhNTEwYmE1YTFkZmJhODJjODJiMCJ9
1 parent 7a1ba5d commit f9bbbca

File tree

20 files changed

+1478
-292
lines changed

20 files changed

+1478
-292
lines changed

java-certificate-manager/google-cloud-certificate-manager/pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@
4141
<groupId>com.google.api.grpc</groupId>
4242
<artifactId>proto-google-common-protos</artifactId>
4343
</dependency>
44-
44+
<dependency>
45+
<groupId>com.google.api.grpc</groupId>
46+
<artifactId>grpc-google-common-protos</artifactId>
47+
</dependency>
4548
<dependency>
4649
<groupId>com.google.api.grpc</groupId>
4750
<artifactId>proto-google-cloud-certificate-manager-v1</artifactId>

java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerClient.java

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
import com.google.api.gax.rpc.UnaryCallable;
3131
import com.google.cloud.certificatemanager.v1.stub.CertificateManagerStub;
3232
import com.google.cloud.certificatemanager.v1.stub.CertificateManagerStubSettings;
33+
import com.google.cloud.location.GetLocationRequest;
34+
import com.google.cloud.location.ListLocationsRequest;
35+
import com.google.cloud.location.ListLocationsResponse;
36+
import com.google.cloud.location.Location;
3337
import com.google.common.util.concurrent.MoreExecutors;
3438
import com.google.longrunning.Operation;
3539
import com.google.protobuf.Empty;
@@ -2958,6 +2962,148 @@ public final OperationFuture<Empty, OperationMetadata> deleteDnsAuthorizationAsy
29582962
return stub.deleteDnsAuthorizationCallable();
29592963
}
29602964

2965+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
2966+
/**
2967+
* Lists information about the supported locations for this service.
2968+
*
2969+
* <p>Sample code:
2970+
*
2971+
* <pre>{@code
2972+
* // This snippet has been automatically generated for illustrative purposes only.
2973+
* // It may require modifications to work in your environment.
2974+
* try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
2975+
* ListLocationsRequest request =
2976+
* ListLocationsRequest.newBuilder()
2977+
* .setName("name3373707")
2978+
* .setFilter("filter-1274492040")
2979+
* .setPageSize(883849137)
2980+
* .setPageToken("pageToken873572522")
2981+
* .build();
2982+
* for (Location element : certificateManagerClient.listLocations(request).iterateAll()) {
2983+
* // doThingsWith(element);
2984+
* }
2985+
* }
2986+
* }</pre>
2987+
*
2988+
* @param request The request object containing all of the parameters for the API call.
2989+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2990+
*/
2991+
public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
2992+
return listLocationsPagedCallable().call(request);
2993+
}
2994+
2995+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
2996+
/**
2997+
* Lists information about the supported locations for this service.
2998+
*
2999+
* <p>Sample code:
3000+
*
3001+
* <pre>{@code
3002+
* // This snippet has been automatically generated for illustrative purposes only.
3003+
* // It may require modifications to work in your environment.
3004+
* try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
3005+
* ListLocationsRequest request =
3006+
* ListLocationsRequest.newBuilder()
3007+
* .setName("name3373707")
3008+
* .setFilter("filter-1274492040")
3009+
* .setPageSize(883849137)
3010+
* .setPageToken("pageToken873572522")
3011+
* .build();
3012+
* ApiFuture<Location> future =
3013+
* certificateManagerClient.listLocationsPagedCallable().futureCall(request);
3014+
* // Do something.
3015+
* for (Location element : future.get().iterateAll()) {
3016+
* // doThingsWith(element);
3017+
* }
3018+
* }
3019+
* }</pre>
3020+
*/
3021+
public final UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
3022+
listLocationsPagedCallable() {
3023+
return stub.listLocationsPagedCallable();
3024+
}
3025+
3026+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
3027+
/**
3028+
* Lists information about the supported locations for this service.
3029+
*
3030+
* <p>Sample code:
3031+
*
3032+
* <pre>{@code
3033+
* // This snippet has been automatically generated for illustrative purposes only.
3034+
* // It may require modifications to work in your environment.
3035+
* try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
3036+
* ListLocationsRequest request =
3037+
* ListLocationsRequest.newBuilder()
3038+
* .setName("name3373707")
3039+
* .setFilter("filter-1274492040")
3040+
* .setPageSize(883849137)
3041+
* .setPageToken("pageToken873572522")
3042+
* .build();
3043+
* while (true) {
3044+
* ListLocationsResponse response =
3045+
* certificateManagerClient.listLocationsCallable().call(request);
3046+
* for (Location element : response.getLocationsList()) {
3047+
* // doThingsWith(element);
3048+
* }
3049+
* String nextPageToken = response.getNextPageToken();
3050+
* if (!Strings.isNullOrEmpty(nextPageToken)) {
3051+
* request = request.toBuilder().setPageToken(nextPageToken).build();
3052+
* } else {
3053+
* break;
3054+
* }
3055+
* }
3056+
* }
3057+
* }</pre>
3058+
*/
3059+
public final UnaryCallable<ListLocationsRequest, ListLocationsResponse> listLocationsCallable() {
3060+
return stub.listLocationsCallable();
3061+
}
3062+
3063+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
3064+
/**
3065+
* Gets information about a location.
3066+
*
3067+
* <p>Sample code:
3068+
*
3069+
* <pre>{@code
3070+
* // This snippet has been automatically generated for illustrative purposes only.
3071+
* // It may require modifications to work in your environment.
3072+
* try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
3073+
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
3074+
* Location response = certificateManagerClient.getLocation(request);
3075+
* }
3076+
* }</pre>
3077+
*
3078+
* @param request The request object containing all of the parameters for the API call.
3079+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3080+
*/
3081+
public final Location getLocation(GetLocationRequest request) {
3082+
return getLocationCallable().call(request);
3083+
}
3084+
3085+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
3086+
/**
3087+
* Gets information about a location.
3088+
*
3089+
* <p>Sample code:
3090+
*
3091+
* <pre>{@code
3092+
* // This snippet has been automatically generated for illustrative purposes only.
3093+
* // It may require modifications to work in your environment.
3094+
* try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
3095+
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
3096+
* ApiFuture<Location> future =
3097+
* certificateManagerClient.getLocationCallable().futureCall(request);
3098+
* // Do something.
3099+
* Location response = future.get();
3100+
* }
3101+
* }</pre>
3102+
*/
3103+
public final UnaryCallable<GetLocationRequest, Location> getLocationCallable() {
3104+
return stub.getLocationCallable();
3105+
}
3106+
29613107
@Override
29623108
public final void close() {
29633109
stub.close();
@@ -3328,4 +3474,80 @@ protected ListDnsAuthorizationsFixedSizeCollection createCollection(
33283474
return new ListDnsAuthorizationsFixedSizeCollection(pages, collectionSize);
33293475
}
33303476
}
3477+
3478+
public static class ListLocationsPagedResponse
3479+
extends AbstractPagedListResponse<
3480+
ListLocationsRequest,
3481+
ListLocationsResponse,
3482+
Location,
3483+
ListLocationsPage,
3484+
ListLocationsFixedSizeCollection> {
3485+
3486+
public static ApiFuture<ListLocationsPagedResponse> createAsync(
3487+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
3488+
ApiFuture<ListLocationsResponse> futureResponse) {
3489+
ApiFuture<ListLocationsPage> futurePage =
3490+
ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
3491+
return ApiFutures.transform(
3492+
futurePage,
3493+
input -> new ListLocationsPagedResponse(input),
3494+
MoreExecutors.directExecutor());
3495+
}
3496+
3497+
private ListLocationsPagedResponse(ListLocationsPage page) {
3498+
super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
3499+
}
3500+
}
3501+
3502+
public static class ListLocationsPage
3503+
extends AbstractPage<
3504+
ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
3505+
3506+
private ListLocationsPage(
3507+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
3508+
ListLocationsResponse response) {
3509+
super(context, response);
3510+
}
3511+
3512+
private static ListLocationsPage createEmptyPage() {
3513+
return new ListLocationsPage(null, null);
3514+
}
3515+
3516+
@Override
3517+
protected ListLocationsPage createPage(
3518+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
3519+
ListLocationsResponse response) {
3520+
return new ListLocationsPage(context, response);
3521+
}
3522+
3523+
@Override
3524+
public ApiFuture<ListLocationsPage> createPageAsync(
3525+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
3526+
ApiFuture<ListLocationsResponse> futureResponse) {
3527+
return super.createPageAsync(context, futureResponse);
3528+
}
3529+
}
3530+
3531+
public static class ListLocationsFixedSizeCollection
3532+
extends AbstractFixedSizeCollection<
3533+
ListLocationsRequest,
3534+
ListLocationsResponse,
3535+
Location,
3536+
ListLocationsPage,
3537+
ListLocationsFixedSizeCollection> {
3538+
3539+
private ListLocationsFixedSizeCollection(List<ListLocationsPage> pages, int collectionSize) {
3540+
super(pages, collectionSize);
3541+
}
3542+
3543+
private static ListLocationsFixedSizeCollection createEmptyCollection() {
3544+
return new ListLocationsFixedSizeCollection(null, 0);
3545+
}
3546+
3547+
@Override
3548+
protected ListLocationsFixedSizeCollection createCollection(
3549+
List<ListLocationsPage> pages, int collectionSize) {
3550+
return new ListLocationsFixedSizeCollection(pages, collectionSize);
3551+
}
3552+
}
33313553
}

java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerSettings.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapsPagedResponse;
2121
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse;
2222
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse;
23+
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListLocationsPagedResponse;
2324

2425
import com.google.api.core.ApiFunction;
2526
import com.google.api.core.BetaApi;
@@ -35,6 +36,10 @@
3536
import com.google.api.gax.rpc.TransportChannelProvider;
3637
import com.google.api.gax.rpc.UnaryCallSettings;
3738
import com.google.cloud.certificatemanager.v1.stub.CertificateManagerStubSettings;
39+
import com.google.cloud.location.GetLocationRequest;
40+
import com.google.cloud.location.ListLocationsRequest;
41+
import com.google.cloud.location.ListLocationsResponse;
42+
import com.google.cloud.location.Location;
3843
import com.google.longrunning.Operation;
3944
import com.google.protobuf.Empty;
4045
import java.io.IOException;
@@ -286,6 +291,17 @@ public UnaryCallSettings<DeleteCertificateMapRequest, Operation> deleteCertifica
286291
.deleteDnsAuthorizationOperationSettings();
287292
}
288293

294+
/** Returns the object with the settings used for calls to listLocations. */
295+
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
296+
listLocationsSettings() {
297+
return ((CertificateManagerStubSettings) getStubSettings()).listLocationsSettings();
298+
}
299+
300+
/** Returns the object with the settings used for calls to getLocation. */
301+
public UnaryCallSettings<GetLocationRequest, Location> getLocationSettings() {
302+
return ((CertificateManagerStubSettings) getStubSettings()).getLocationSettings();
303+
}
304+
289305
public static final CertificateManagerSettings create(CertificateManagerStubSettings stub)
290306
throws IOException {
291307
return new CertificateManagerSettings.Builder(stub.toBuilder()).build();
@@ -608,6 +624,18 @@ public UnaryCallSettings.Builder<GetCertificateRequest, Certificate> getCertific
608624
return getStubSettingsBuilder().deleteDnsAuthorizationOperationSettings();
609625
}
610626

627+
/** Returns the builder for the settings used for calls to listLocations. */
628+
public PagedCallSettings.Builder<
629+
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
630+
listLocationsSettings() {
631+
return getStubSettingsBuilder().listLocationsSettings();
632+
}
633+
634+
/** Returns the builder for the settings used for calls to getLocation. */
635+
public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettings() {
636+
return getStubSettingsBuilder().getLocationSettings();
637+
}
638+
611639
@Override
612640
public CertificateManagerSettings build() throws IOException {
613641
return new CertificateManagerSettings(this);

java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/gapic_metadata.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
"GetDnsAuthorization": {
4747
"methods": ["getDnsAuthorization", "getDnsAuthorization", "getDnsAuthorization", "getDnsAuthorizationCallable"]
4848
},
49+
"GetLocation": {
50+
"methods": ["getLocation", "getLocationCallable"]
51+
},
4952
"ListCertificateMapEntries": {
5053
"methods": ["listCertificateMapEntries", "listCertificateMapEntries", "listCertificateMapEntries", "listCertificateMapEntriesPagedCallable", "listCertificateMapEntriesCallable"]
5154
},
@@ -58,6 +61,9 @@
5861
"ListDnsAuthorizations": {
5962
"methods": ["listDnsAuthorizations", "listDnsAuthorizations", "listDnsAuthorizations", "listDnsAuthorizationsPagedCallable", "listDnsAuthorizationsCallable"]
6063
},
64+
"ListLocations": {
65+
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
66+
},
6167
"UpdateCertificate": {
6268
"methods": ["updateCertificateAsync", "updateCertificateAsync", "updateCertificateOperationCallable", "updateCertificateCallable"]
6369
},

java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStub.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapsPagedResponse;
2121
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse;
2222
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse;
23+
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListLocationsPagedResponse;
2324

2425
import com.google.api.gax.core.BackgroundResource;
2526
import com.google.api.gax.rpc.OperationCallable;
@@ -53,6 +54,10 @@
5354
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest;
5455
import com.google.cloud.certificatemanager.v1.UpdateCertificateRequest;
5556
import com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest;
57+
import com.google.cloud.location.GetLocationRequest;
58+
import com.google.cloud.location.ListLocationsRequest;
59+
import com.google.cloud.location.ListLocationsResponse;
60+
import com.google.cloud.location.Location;
5661
import com.google.longrunning.Operation;
5762
import com.google.longrunning.stub.OperationsStub;
5863
import com.google.protobuf.Empty;
@@ -257,6 +262,19 @@ public UnaryCallable<DeleteDnsAuthorizationRequest, Operation> deleteDnsAuthoriz
257262
throw new UnsupportedOperationException("Not implemented: deleteDnsAuthorizationCallable()");
258263
}
259264

265+
public UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
266+
listLocationsPagedCallable() {
267+
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
268+
}
269+
270+
public UnaryCallable<ListLocationsRequest, ListLocationsResponse> listLocationsCallable() {
271+
throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
272+
}
273+
274+
public UnaryCallable<GetLocationRequest, Location> getLocationCallable() {
275+
throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
276+
}
277+
260278
@Override
261279
public abstract void close();
262280
}

0 commit comments

Comments
 (0)