Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

fix: update gapic-generator-java with mock service generation fixes #428

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
Expand Down Expand Up @@ -211,6 +212,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
@BetaApi
public final OperationsClient getHttpJsonOperationsClient() {
return httpJsonOperationsClient;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
@BetaApi
public final OperationsClient getHttpJsonOperationsClient() {
return httpJsonOperationsClient;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.location.MockLocations;
import com.google.common.collect.Lists;
import com.google.iam.v1.AuditConfig;
import com.google.iam.v1.Binding;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.GetPolicyOptions;
import com.google.iam.v1.MockIAMPolicy;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.iam.v1;
package com.google.cloud.security.privateca.v1;

import com.google.api.core.BetaApi;
import com.google.api.gax.grpc.testing.MockGrpcService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@
* limitations under the License.
*/

package com.google.iam.v1;
package com.google.cloud.security.privateca.v1;

import com.google.api.core.BetaApi;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.protobuf.AbstractMessage;
import io.grpc.stub.StreamObserver;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.cloud.location;
package com.google.cloud.security.privateca.v1;

import com.google.api.core.BetaApi;
import com.google.api.gax.grpc.testing.MockGrpcService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
* limitations under the License.
*/

package com.google.cloud.location;
package com.google.cloud.security.privateca.v1;

import com.google.api.core.BetaApi;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.location.LocationsGrpc.LocationsImplBase;
import com.google.protobuf.AbstractMessage;
import io.grpc.stub.StreamObserver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_async]
// [START privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_async]
import com.google.api.core.ApiFuture;
import com.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest;
import com.google.cloud.security.privateca.v1.CertificateAuthorityName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_lro_async]
// [START privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_lro_async]
import com.google.api.gax.longrunning.OperationFuture;
import com.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest;
import com.google.cloud.security.privateca.v1.CertificateAuthority;
Expand Down Expand Up @@ -56,5 +55,4 @@ public static void asyncActivateCertificateAuthorityLRO() throws Exception {
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_lro_async]
// [END privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_lro_async]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_sync]
import com.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest;
import com.google.cloud.security.privateca.v1.CertificateAuthority;
import com.google.cloud.security.privateca.v1.CertificateAuthorityName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_certificateauthorityname_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_certificateauthorityname_sync]
import com.google.cloud.security.privateca.v1.CertificateAuthority;
import com.google.cloud.security.privateca.v1.CertificateAuthorityName;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
Expand All @@ -41,5 +40,4 @@ public static void syncActivateCertificateAuthorityCertificateauthorityname() th
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_certificateauthorityname_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_certificateauthorityname_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_string_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_string_sync]
import com.google.cloud.security.privateca.v1.CertificateAuthority;
import com.google.cloud.security.privateca.v1.CertificateAuthorityName;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
Expand All @@ -42,5 +41,4 @@ public static void syncActivateCertificateAuthorityString() throws Exception {
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_string_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_activatecertificateauthority_string_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_create_setcredentialsprovider_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_create_setcredentialsprovider_sync]
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceSettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_create_setcredentialsprovider1_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_create_setcredentialsprovider1_sync]
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceSettings;

Expand All @@ -40,5 +39,4 @@ public static void syncCreateSetCredentialsProvider1() throws Exception {
CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_create_setcredentialsprovider1_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_create_setcredentialsprovider1_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_createcapool_locationnamecapoolstring_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_createcapool_locationnamecapoolstring_sync]
import com.google.cloud.security.privateca.v1.CaPool;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
import com.google.cloud.security.privateca.v1.LocationName;
Expand All @@ -41,5 +40,4 @@ public static void syncCreateCaPoolLocationnameCapoolString() throws Exception {
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_createcapool_locationnamecapoolstring_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_createcapool_locationnamecapoolstring_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_createcapool_stringcapoolstring_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_createcapool_stringcapoolstring_sync]
import com.google.cloud.security.privateca.v1.CaPool;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
import com.google.cloud.security.privateca.v1.LocationName;
Expand All @@ -41,5 +40,4 @@ public static void syncCreateCaPoolStringCapoolString() throws Exception {
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_createcapool_stringcapoolstring_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_createcapool_stringcapoolstring_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_createcertificate_capoolnamecertificatestring_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_createcertificate_capoolnamecertificatestring_sync]
import com.google.cloud.security.privateca.v1.CaPoolName;
import com.google.cloud.security.privateca.v1.Certificate;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
Expand All @@ -41,5 +40,4 @@ public static void syncCreateCertificateCapoolnameCertificateString() throws Exc
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_createcertificate_capoolnamecertificatestring_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_createcertificate_capoolnamecertificatestring_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_createcertificate_stringcertificatestring_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_createcertificate_stringcertificatestring_sync]
import com.google.cloud.security.privateca.v1.CaPoolName;
import com.google.cloud.security.privateca.v1.Certificate;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
Expand All @@ -41,5 +40,4 @@ public static void syncCreateCertificateStringCertificateString() throws Excepti
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_createcertificate_stringcertificatestring_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_createcertificate_stringcertificatestring_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_lro_async]
// [START privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_lro_async]
import com.google.api.gax.longrunning.OperationFuture;
import com.google.cloud.security.privateca.v1.CaPoolName;
import com.google.cloud.security.privateca.v1.CertificateAuthority;
Expand Down Expand Up @@ -52,5 +51,4 @@ public static void asyncCreateCertificateAuthorityLRO() throws Exception {
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_lro_async]
// [END privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_lro_async]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_capoolnamecertificateauthoritystring_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_capoolnamecertificateauthoritystring_sync]
import com.google.cloud.security.privateca.v1.CaPoolName;
import com.google.cloud.security.privateca.v1.CertificateAuthority;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
Expand All @@ -44,5 +43,4 @@ public static void syncCreateCertificateAuthorityCapoolnameCertificateauthorityS
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_capoolnamecertificateauthoritystring_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_capoolnamecertificateauthoritystring_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_stringcertificateauthoritystring_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_stringcertificateauthoritystring_sync]
import com.google.cloud.security.privateca.v1.CaPoolName;
import com.google.cloud.security.privateca.v1.CertificateAuthority;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
Expand All @@ -44,5 +43,4 @@ public static void syncCreateCertificateAuthorityStringCertificateauthorityStrin
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_stringcertificateauthoritystring_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_createcertificateauthority_stringcertificateauthoritystring_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_lro_async]
// [START privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_lro_async]
import com.google.api.gax.longrunning.OperationFuture;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
import com.google.cloud.security.privateca.v1.CertificateTemplate;
Expand Down Expand Up @@ -52,5 +51,4 @@ public static void asyncCreateCertificateTemplateLRO() throws Exception {
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_lro_async]
// [END privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_lro_async]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_locationnamecertificatetemplatestring_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_locationnamecertificatetemplatestring_sync]
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
import com.google.cloud.security.privateca.v1.CertificateTemplate;
import com.google.cloud.security.privateca.v1.LocationName;
Expand All @@ -44,5 +43,4 @@ public static void syncCreateCertificateTemplateLocationnameCertificatetemplateS
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_locationnamecertificatetemplatestring_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_locationnamecertificatetemplatestring_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_stringcertificatetemplatestring_sync]
// [START privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_stringcertificatetemplatestring_sync]
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
import com.google.cloud.security.privateca.v1.CertificateTemplate;
import com.google.cloud.security.privateca.v1.LocationName;
Expand All @@ -44,5 +43,4 @@ public static void syncCreateCertificateTemplateStringCertificatetemplateString(
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_stringcertificatetemplatestring_sync]
// [END privateca_v1_generated_certificateauthorityserviceclient_createcertificatetemplate_stringcertificatetemplatestring_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.google.cloud.security.privateca.v1.CaPoolName;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
import com.google.cloud.security.privateca.v1.DeleteCaPoolRequest;
import com.google.protobuf.Empty;

public class SyncDeleteCaPool {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// [START privateca_v1_generated_certificateauthorityserviceclient_deletecapool_capoolname_sync]
import com.google.cloud.security.privateca.v1.CaPoolName;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
import com.google.protobuf.Empty;

public class SyncDeleteCaPoolCapoolname {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// [START privateca_v1_generated_certificateauthorityserviceclient_deletecapool_string_sync]
import com.google.cloud.security.privateca.v1.CaPoolName;
import com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient;
import com.google.protobuf.Empty;

public class SyncDeleteCaPoolString {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

package com.google.cloud.security.privateca.v1.samples;

// [START
// privateca_v1_generated_certificateauthorityserviceclient_deletecertificateauthority_lro_async]
// [START privateca_v1_generated_certificateauthorityserviceclient_deletecertificateauthority_lro_async]
import com.google.api.gax.longrunning.OperationFuture;
import com.google.cloud.security.privateca.v1.CertificateAuthority;
import com.google.cloud.security.privateca.v1.CertificateAuthorityName;
Expand Down Expand Up @@ -55,5 +54,4 @@ public static void asyncDeleteCertificateAuthorityLRO() throws Exception {
}
}
}
// [END
// privateca_v1_generated_certificateauthorityserviceclient_deletecertificateauthority_lro_async]
// [END privateca_v1_generated_certificateauthorityserviceclient_deletecertificateauthority_lro_async]
Loading